Skip to main content

Fio Bank API in Python

Project description

PyPI version Build Status

Fio Bank API in Python.

Installation

$ pip install fiobank

Usage

First, get your API token. Initialization of the client:

>>> from fiobank import FioBank
>>> client = FioBank(token='...')

Account information:

>>> client.info()
{'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'}

Listing transactions within a time period:

>>> gen = client.period('2013-01-20', '2013-03-20')
>>> list(gen)[0]
{'comment': u'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka  2769.00 CZK', 'recipient_message': u'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka  2769.00 CZK', 'user_identifiaction': u'N\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \u010d\xe1stka  2769.00 CZK', 'currency': 'CZK', 'amount': -2769.0, 'instruction_id': 'XXXXXXXXXX', 'executor': u'Vilém Fusek', 'date': datetime.date(2013, 1, 20), 'type': u'Platba kartou', 'transaction_id': 'XXXXXXXXXX'}

Listing transactions from a single account statement:

>>> client.statement(2013, 1)  # 1 is January only by coincidence - arguments mean 'first statement of 2013'

Listing latest transactions:

>>> 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 transactions

Conflict Error

Fio API documentation (Section 8.2) states that a single token should be used only once per 30s. Otherwise a HTTP 409 Conflict will be returned and fiobank.ThrottlingError will be raised.

License: ISC

© 2013-? Honza Javorek mail@honzajavorek.cz

This work is licensed under ISC license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fiobank-1.2.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

fiobank-1.2.0-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fiobank-1.2.0.tar.gz.

File metadata

  • Download URL: fiobank-1.2.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fiobank-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4a89c02d0d2f44a87b92ee66fce0af878f2ea11604315e0f2a6fb91c169c5e20
MD5 c716e665ec748f2b50b357da9aeaa0b1
BLAKE2b-256 6f8f26d7197155a7b0ead2bd6e5f5a617f2543a33cab57db13a3632991c03e98

See more details on using hashes here.

File details

Details for the file fiobank-1.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fiobank-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3b1a2fad2bdc4217acd37567d29e784af303f0f7c7cd5bb85dc63adc2c99a5e8
MD5 e22e77a8af55955f9f9d7e9b6bbe45ca
BLAKE2b-256 ea217f14d86ed6e9204058c9b7a524b6d4b726270ed92a6c50d6deeb35e8fd5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page