Fio Banka API
Rework of Honza Javorek's fiobank, with the following upgrades:
- Parse both account info and transactions in 1 request. This is particularly useful as Fio banka allows only 1 request per 30 seconds.
- Known error states are covered by exceptions for fine-grade error handling.
- Fetch data in all supported formats (including PDF).
- New design allows to support other end points than account.
- Safer data types: money as
decimal.Decimalinstead offloat, data stored astyping.NamedTupleinstead ofdict.
[!NOTE] Merchant transaction report and order upload are not implemented. Feel free to send a PR.
Quick example
>>> import fio_banka, datetime
>>> account = fio_banka.Account("my-API-token")
>>> transaction_report = account.fetch_transaction_report_for_period(
... datetime.date(2023, 1, 1),
... datetime.date(2023, 1, 2),
... fio_banka.TransactionReportFmt.JSON
... )
>>> account.parse_account_info(transaction_report) # JSON only
AccountInfo(
account_id='2000000000',
bank_id='2010',
currency='CZK',
iban='CZ1000000000002000000000',
...
)
>>> next(iter(account.parse_transactions(transaction_report))) # JSON only
Transaction(
transaction_id='10000000000',
date=datetime.date(2023, 1, 1),
amount=Decimal('2000.0'),
currency='CZK',
account_id=None,
...
Documentation
For full description see the module docstring.
API documentation by Fio banka:
- Specification (Czech only)
- XSD Schema
Installation
pip install fio-banka
Contributing
Set up development environment via Pipenv:
pipenv sync --dev
pipenv run pre-commit install
Run tests:
pytest
Use Conventional Commits.
I highly recommend to follow Test-Driven Development (revisited). Actually, all existing tests follow it.
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for fio-banka 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fio_banka-3.0.1.tar.gz | 23.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fio_banka-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / fio_banka-3.0.1.tar.gz
| Download URL | fio_banka-3.0.1.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7b1a5668acfef93a56ed674e71801efdfd33ca009df4e532f1b48308207eaf3
|
|
BLAKE2b-256 checksum How to use checksums |
c924eb6ec64c3c8446fd7abd1277f46aecdd0571442cd4540cf7143c540f0a49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / fio_banka-3.0.1-py3-none-any.whl
| Download URL | fio_banka-3.0.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37a395278049ddb8271d3d95aafccfc57957d68a574fefee5131f99cf9361959
|
|
BLAKE2b-256 checksum How to use checksums |
171015cae9d153e625fa33406df98cfe6e1f7cb79d3f2bcc3f607537015b130f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|