Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honzajavorek/fiobank
Fio Bank API in Python
https://github.com/honzajavorek/fiobank
Last synced: about 5 hours ago
JSON representation
Fio Bank API in Python
- Host: GitHub
- URL: https://github.com/honzajavorek/fiobank
- Owner: honzajavorek
- License: isc
- Created: 2013-05-08T17:44:01.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T11:29:20.000Z (5 months ago)
- Last Synced: 2024-09-21T15:25:20.463Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 379 KB
- Stars: 37
- Watchers: 3
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
fiobank
=======|PyPI version| |Build Status| |Test Coverage|
`Fio Bank API `__
in Python.Installation
------------.. code:: sh
$ pip install fiobank
Usage
-----First, get your API token.
.. image:: token.png
Initialization of the client:
.. code:: python
>>> from fiobank import FioBank
>>> client = FioBank(token='...', decimal=True)Account information:
.. code:: python
>>> client.info()
{
'currency': 'CZK',
'account_number_full': 'XXXXXXXXXX/2010',
'balance': Decimal('42.00'),
'account_number': 'XXXXXXXXXX',
'bank_code': '2010'
}Listing transactions within a period:
.. code:: python
>>> gen = client.period('2013-01-20', '2013-03-20')
>>> list(gen)[0]
{
'comment': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'recipient_message': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'user_identification': 'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka 2769.00 CZK',
'currency': 'CZK',
'amount': Decimal('-2769.0'),
'instruction_id': 'XXXXXXXXXX',
'executor': 'Vilém Fusek',
'date': datetime.date(2013, 1, 20),
'type': 'Platba kartou',
'transaction_id': 'XXXXXXXXXX'
}Listing transactions from a single account statement:
.. code:: python
>>> client.statement(2013, 1) # 1 is January only by coincidence - arguments mean 'first statement of 2013'
Listing the latest transactions:
.. code:: python
>>> client.last() # return transactions added from last listing
>>> client.last(from_id='...') # sets cursor to given transaction_id and returns following transactions
>>> client.last(from_date='2013-03-01') # sets cursor to given date and returns following transactionsConflict Error
--------------`Fio API documentation `__
(Section 8.2) states that a single token should be used only once per
30s. Otherwise, an HTTP 409 Conflict will be returned and
``fiobank.ThrottlingError`` will be raised.Contributing
------------.. code:: shell
$ pip install -e .[tests]
$ pytestChangelog
---------See `GitHub Releases `_.
License: ISC
------------© 2024 Honza Javorek [email protected]
This work is licensed under the `ISC
license `__... |PyPI version| image:: https://badge.fury.io/py/fiobank.svg
:target: https://badge.fury.io/py/fiobank
.. |Build Status| image:: https://github.com/honzajavorek/fiobank/actions/workflows/test.yml/badge.svg
:target: https://github.com/honzajavorek/fiobank/actions/workflows/test.yml
.. |Test Coverage| image:: https://coveralls.io/repos/github/honzajavorek/fiobank/badge.svg?branch=master
:target: https://coveralls.io/github/honzajavorek/fiobank?branch=master