Metadata-Version: 2.1
Name: py-parser-sber
Version: 0.4.0
Summary: Simple parser of Sberbank, using selenium
Home-page: https://github.com/Niccolum/py_parse_sber
Author: Nikolai Vidov
Author-email: lastsal@mail.ru
License: MIT
Keywords: parser sber Sberbank
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests (==2.22.0)
Requires-Dist: selenium (==3.141.0)
Provides-Extra: all
Requires-Dist: cohesion ; extra == 'all'
Requires-Dist: flake8 ; extra == 'all'
Requires-Dist: flake8-broken-line ; extra == 'all'
Requires-Dist: flake8-bugbear ; extra == 'all'
Requires-Dist: flake8-builtins ; extra == 'all'
Requires-Dist: flake8-cognitive-complexity ; extra == 'all'
Requires-Dist: flake8-comprehensions ; extra == 'all'
Requires-Dist: flake8-docstrings ; extra == 'all'
Requires-Dist: flake8-fixme ; extra == 'all'
Requires-Dist: flake8-import-order ; extra == 'all'
Requires-Dist: flake8-mutable ; extra == 'all'
Requires-Dist: flake8-mypy ; extra == 'all'
Requires-Dist: flake8-print ; extra == 'all'
Requires-Dist: pep8-naming ; extra == 'all'
Requires-Dist: radon ; extra == 'all'
Requires-Dist: bandit ; extra == 'all'
Requires-Dist: Sphinx ; extra == 'all'
Requires-Dist: pytest ; extra == 'all'
Provides-Extra: docs
Requires-Dist: Sphinx ; extra == 'docs'
Provides-Extra: static_analysis
Requires-Dist: cohesion ; extra == 'static_analysis'
Requires-Dist: flake8 ; extra == 'static_analysis'
Requires-Dist: flake8-broken-line ; extra == 'static_analysis'
Requires-Dist: flake8-bugbear ; extra == 'static_analysis'
Requires-Dist: flake8-builtins ; extra == 'static_analysis'
Requires-Dist: flake8-cognitive-complexity ; extra == 'static_analysis'
Requires-Dist: flake8-comprehensions ; extra == 'static_analysis'
Requires-Dist: flake8-docstrings ; extra == 'static_analysis'
Requires-Dist: flake8-fixme ; extra == 'static_analysis'
Requires-Dist: flake8-import-order ; extra == 'static_analysis'
Requires-Dist: flake8-mutable ; extra == 'static_analysis'
Requires-Dist: flake8-mypy ; extra == 'static_analysis'
Requires-Dist: flake8-print ; extra == 'static_analysis'
Requires-Dist: pep8-naming ; extra == 'static_analysis'
Requires-Dist: radon ; extra == 'static_analysis'
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'
Provides-Extra: vulnerability_check
Requires-Dist: bandit ; extra == 'vulnerability_check'

# Py_parse_sber

## Overview

It's simple parser of Sberbank, using selenium (firefox geckodriver), where you can see your account currency
and transactions for some period.

## Getting Started
### Requirements

Python 3.6+

### Install

The quick way:
```bash
pip install py-parse-sber
```

Desired way:
```bash
python3 -m venv venv
source venv/bin/activate
pip install py-parse-sber
```

### Preparing:

#### Install geckodriver

Download [geckodriver](https://github.com/mozilla/geckodriver/releases) and unzip it
Make sure it’s in your PATH, e. g., place it in /usr/bin or /usr/local/bin.

Failure to observe this step will give you an error selenium.common.exceptions.WebDriverException: 
Message: ‘geckodriver’ executable needs to be in PATH.

#### Run receiving web server

Py_parse_sber will send parsed info to web server.
See contracts detail in [contracts.yml](https://github.com/Niccolum/py_parse_sber/blob/master/contracts.yml),
which your web server will have to implement for accepting data correct. 
(for standard was taken project [BudgetTracker](https://github.com/DiverOfDark/BudgetTracker) and his 
[api](https://github.com/DiverOfDark/BudgetTracker#%D0%B8%D1%81%D1%82%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%D0%B8-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85))

#### Requirement environment variables

```bash
LOGIN  # your sberbank account login
PASSWORD # your sberbank account password
SERVER_URL # main URL where the data will be sent. Example: localhost (or service name in docker-compose.yml)
SEND_ACCOUNT_URL # url 'path' part, where account information will be sent. Example: /send_account
SEND_PAYMENT_URL # url 'path' part, where transaction information will be sent. Example: /send_payment
```

#### Optional environment variables
```bash
SERVER_SCHEME # Scheme of SERVER_URL, http/https. Default http
SERVER_PORT # Port of SERVER_URL. Default 80
DAYS # period in days to indicate parser restart. Can be used with HOURS.
HOURS # period in hours to indicate parser restart. Can be used with DAYS.
```
If any of their not set - used 1 day by default.

## Linux example
```bash
export LOGIN=login
export PASSWORD=password
export SERVER_URL=localhost
export SERVER_PORT=8080
export SEND_ACCOUNT_URL=/send_account
export SEND_PAYMENT_URL=/send_payment

py_parser_sber_run_once # for one-time launch
# or
py_parser_sber_run_infinite # for run in loop with a given period
```

## Authors

*   **Nikolai Vidov** - *maintainer* - [Niccolum](https://github.com/Niccolum)

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/Niccolum/py_parse_sber/blob/master/LICENSE.md) file for details


