diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 09:05:58 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 09:05:58 +0000 |
commit | abf205d10d0f39ee7a637649ad158ab95171b1fd (patch) | |
tree | be101bc4480824bfefcfda535e64924808fa3b1f /python-banrural-bank-parser-gt.spec | |
parent | 27e0ba6078f189319aa1d2175b304da2057a23d3 (diff) |
automatic import of python-banrural-bank-parser-gtopeneuler20.03
Diffstat (limited to 'python-banrural-bank-parser-gt.spec')
-rw-r--r-- | python-banrural-bank-parser-gt.spec | 382 |
1 files changed, 382 insertions, 0 deletions
diff --git a/python-banrural-bank-parser-gt.spec b/python-banrural-bank-parser-gt.spec new file mode 100644 index 0000000..0e76b67 --- /dev/null +++ b/python-banrural-bank-parser-gt.spec @@ -0,0 +1,382 @@ +%global _empty_manifest_terminate_build 0 +Name: python-banrural-bank-parser-gt +Version: 0.4.4 +Release: 1 +Summary: Banrural Parser +License: MIT License +URL: https://github.com/gt-banks-parser/banks-parser-base +Source0: https://mirrors.aliyun.com/pypi/web/packages/f1/ad/0f335d141d8428410ad3b8d0eeca31c0326e9736f3266354002f7454cffc/banrural_bank_parser_gt-0.4.4.tar.gz +BuildArch: noarch + +Requires: python3-bank-base-gt + +%description +# Banrural Scrapper + +Python library to scrap Banrural Website + +The intended use of this library is to make it easy to access Banrural bank data to allow the automatisation of processes that currently banks doesn't allow. + + +## How to use it + +### Installation + +`pip install banrural-scrapper-gt` + +If you are using requirements.txt just add `banrural-scrapper-gt` into the file + + +### Usage + +#### Precautions + +- Don't access to Banrural website or mobile app while executing some script usign this library. +- Login with the library will fail if you are logged in from the website or mobile app. + +#### Login + +The recommended method for login is using `with` statement of Python. We initialize the class in the with and will make automatically login with the provided credentials and will logout after finishing all the work and if some exception happens we ensure that logout method is called. + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + # Do your work here + +# We are logout now +``` + +#### Get accounts + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() # Fetch all accounts + for a in accounts: + print(a) + +``` + +#### Get movements + +We can retrieve the movements of an account using `fetch_movements` method in `BanruralBankAccount` + +```python +import datetime +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") + +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() + for a in accounts: + mov = a.fetch_movements( + datetime.date.today() - datetime.timedelta(days=60), + datetime.date.today() + datetime.timedelta(days=1), + ) + for m in mov: + print(m) +``` + + +#### Logout + +It's important to logout after you finish your operations otherwise you can lock yourself and that won't allow you to login from the website, that's due security protections of Banrural. + +Even though `with` statement is the recommended way to make sure logout method is called. You can also execute it manually. + +```python + bank = BanruralBank(credentials) + try: + bank.login() + # Do your work + except: + pass + finally: + bank.logout() +``` + +### Contributing + +1. Fork it +2. Create your feature branch +3. Commit your changes +4. Push your branch +5. Create a pull request + +### FAQ + +- Why I need to enter my credentials? It is safe? + - We need your credentials to authenticate in the bank, those credentials are not stored in any place. This is open source library so you can check the code. +- Can you make some program for me using this library? + - Of course, this library provides a base for another utilities and potentially any thing that is on the website of banrural is under subject for automatization, if you need some customization or build a program on top of this library please contact me at dev at csimon (dot) dev and I will be happy to help you. + + + +%package -n python3-banrural-bank-parser-gt +Summary: Banrural Parser +Provides: python-banrural-bank-parser-gt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-banrural-bank-parser-gt +# Banrural Scrapper + +Python library to scrap Banrural Website + +The intended use of this library is to make it easy to access Banrural bank data to allow the automatisation of processes that currently banks doesn't allow. + + +## How to use it + +### Installation + +`pip install banrural-scrapper-gt` + +If you are using requirements.txt just add `banrural-scrapper-gt` into the file + + +### Usage + +#### Precautions + +- Don't access to Banrural website or mobile app while executing some script usign this library. +- Login with the library will fail if you are logged in from the website or mobile app. + +#### Login + +The recommended method for login is using `with` statement of Python. We initialize the class in the with and will make automatically login with the provided credentials and will logout after finishing all the work and if some exception happens we ensure that logout method is called. + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + # Do your work here + +# We are logout now +``` + +#### Get accounts + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() # Fetch all accounts + for a in accounts: + print(a) + +``` + +#### Get movements + +We can retrieve the movements of an account using `fetch_movements` method in `BanruralBankAccount` + +```python +import datetime +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") + +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() + for a in accounts: + mov = a.fetch_movements( + datetime.date.today() - datetime.timedelta(days=60), + datetime.date.today() + datetime.timedelta(days=1), + ) + for m in mov: + print(m) +``` + + +#### Logout + +It's important to logout after you finish your operations otherwise you can lock yourself and that won't allow you to login from the website, that's due security protections of Banrural. + +Even though `with` statement is the recommended way to make sure logout method is called. You can also execute it manually. + +```python + bank = BanruralBank(credentials) + try: + bank.login() + # Do your work + except: + pass + finally: + bank.logout() +``` + +### Contributing + +1. Fork it +2. Create your feature branch +3. Commit your changes +4. Push your branch +5. Create a pull request + +### FAQ + +- Why I need to enter my credentials? It is safe? + - We need your credentials to authenticate in the bank, those credentials are not stored in any place. This is open source library so you can check the code. +- Can you make some program for me using this library? + - Of course, this library provides a base for another utilities and potentially any thing that is on the website of banrural is under subject for automatization, if you need some customization or build a program on top of this library please contact me at dev at csimon (dot) dev and I will be happy to help you. + + + +%package help +Summary: Development documents and examples for banrural-bank-parser-gt +Provides: python3-banrural-bank-parser-gt-doc +%description help +# Banrural Scrapper + +Python library to scrap Banrural Website + +The intended use of this library is to make it easy to access Banrural bank data to allow the automatisation of processes that currently banks doesn't allow. + + +## How to use it + +### Installation + +`pip install banrural-scrapper-gt` + +If you are using requirements.txt just add `banrural-scrapper-gt` into the file + + +### Usage + +#### Precautions + +- Don't access to Banrural website or mobile app while executing some script usign this library. +- Login with the library will fail if you are logged in from the website or mobile app. + +#### Login + +The recommended method for login is using `with` statement of Python. We initialize the class in the with and will make automatically login with the provided credentials and will logout after finishing all the work and if some exception happens we ensure that logout method is called. + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + # Do your work here + +# We are logout now +``` + +#### Get accounts + +```python +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin + +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() # Fetch all accounts + for a in accounts: + print(a) + +``` + +#### Get movements + +We can retrieve the movements of an account using `fetch_movements` method in `BanruralBankAccount` + +```python +import datetime +from banrural_bank_gt import BanruralBank, UserPasswordBankLogin +credentials = UserPasswordBankLogin(username="ENTER YOUR USERNAME", password="ENTER YOUR PASSWORD") + +with BanruralBank(credentials) as connection: + accounts = connection.fetch_accounts() + for a in accounts: + mov = a.fetch_movements( + datetime.date.today() - datetime.timedelta(days=60), + datetime.date.today() + datetime.timedelta(days=1), + ) + for m in mov: + print(m) +``` + + +#### Logout + +It's important to logout after you finish your operations otherwise you can lock yourself and that won't allow you to login from the website, that's due security protections of Banrural. + +Even though `with` statement is the recommended way to make sure logout method is called. You can also execute it manually. + +```python + bank = BanruralBank(credentials) + try: + bank.login() + # Do your work + except: + pass + finally: + bank.logout() +``` + +### Contributing + +1. Fork it +2. Create your feature branch +3. Commit your changes +4. Push your branch +5. Create a pull request + +### FAQ + +- Why I need to enter my credentials? It is safe? + - We need your credentials to authenticate in the bank, those credentials are not stored in any place. This is open source library so you can check the code. +- Can you make some program for me using this library? + - Of course, this library provides a base for another utilities and potentially any thing that is on the website of banrural is under subject for automatization, if you need some customization or build a program on top of this library please contact me at dev at csimon (dot) dev and I will be happy to help you. + + + +%prep +%autosetup -n banrural_bank_parser_gt-0.4.4 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-banrural-bank-parser-gt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.4-1 +- Package Spec generated |