fiobank


Namefiobank JSON
Version 4.0.0 PyPI version JSON
download
home_pageNone
SummaryFio Bank API in Python (unofficial)
upload_time2025-01-06 11:39:48
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.9
licenseICS
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            fiobank
=======

`Fio Bank API <http://www.fio.cz/bank-services/internetbanking-api>`_
in Python.

Installation
------------

From PyPI::

    pip install fiobank

In case you have an adventurous mind, give a try to the source::

    pip install git+https://github.com/honzajavorek/fiobank.git#egg=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'
    }

Getting transactions with account information in one request:

.. code:: python

   >>> client.transactions('2013-01-20', '2013-03-20')
   (
      {'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'}, 
      'transactions': <generator object _parse_transactions at 0x170c190>
   )

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 transactions
    
Getting the latest transactions with account information in one request:

.. code:: python

   >>> client.last_transactions()
   (
      {'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'}, 
      'transactions': <generator object _parse_transactions at 0x170c190>
   )

Conflict Error
--------------

`Fio API documentation <http://www.fio.cz/docs/cz/API_Bankovnictvi.pdf>`_
(Section 8.3) 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.

Development
-----------

Install using `uv <https://docs.astral.sh/uv/>`_::

    git clone git@github.com:honzajavorek/fiobank.git
    cd fiobank
    uv sync

Then run tests::

    uv run pytest

License: ISC
------------

© 2025 Honza Javorek <mail@honzajavorek.cz>

This work is licensed under the `ISC
license <https://en.wikipedia.org/wiki/ISC_license>`_.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fiobank",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Honza Javorek <mail@honzajavorek.cz>",
    "download_url": "https://files.pythonhosted.org/packages/90/bb/557b7c60d44f961a9f1393357af80af8137979b88ba619503fea2c793a9d/fiobank-4.0.0.tar.gz",
    "platform": null,
    "description": "fiobank\n=======\n\n`Fio Bank API <http://www.fio.cz/bank-services/internetbanking-api>`_\nin Python.\n\nInstallation\n------------\n\nFrom PyPI::\n\n    pip install fiobank\n\nIn case you have an adventurous mind, give a try to the source::\n\n    pip install git+https://github.com/honzajavorek/fiobank.git#egg=fiobank\n\nUsage\n-----\n\nFirst, get your API token.\n\n.. image:: token.png\n\nInitialization of the client:\n\n.. code:: python\n\n    >>> from fiobank import FioBank\n    >>> client = FioBank(token='...', decimal=True)\n\nAccount information:\n\n.. code:: python\n\n    >>> client.info()\n    {\n      'currency': 'CZK',\n      'account_number_full': 'XXXXXXXXXX/2010',\n      'balance': Decimal('42.00'),\n      'account_number': 'XXXXXXXXXX',\n      'bank_code': '2010'\n    }\n\nListing transactions within a period:\n\n.. code:: python\n\n    >>> gen = client.period('2013-01-20', '2013-03-20')\n    >>> list(gen)[0]\n    {\n      'comment': 'N\\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \\u010d\\xe1stka  2769.00 CZK',\n      'recipient_message': 'N\\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \\u010d\\xe1stka  2769.00 CZK',\n      'user_identification': 'N\\xe1kup: IKEA CR, BRNO, CZ, dne 17.1.2013, \\u010d\\xe1stka  2769.00 CZK',\n      'currency': 'CZK',\n      'amount': Decimal('-2769.0'),\n      'instruction_id': 'XXXXXXXXXX',\n      'executor': 'Vil\u00e9m Fusek',\n      'date': datetime.date(2013, 1, 20),\n      'type': 'Platba kartou',\n      'transaction_id': 'XXXXXXXXXX'\n    }\n\nGetting transactions with account information in one request:\n\n.. code:: python\n\n   >>> client.transactions('2013-01-20', '2013-03-20')\n   (\n      {'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'}, \n      'transactions': <generator object _parse_transactions at 0x170c190>\n   )\n\nListing transactions from a single account statement:\n\n.. code:: python\n\n    >>> client.statement(2013, 1)  # 1 is January only by coincidence - arguments mean 'first statement of 2013'\n\nListing the latest transactions:\n\n.. code:: python\n\n    >>> client.last()  # return transactions added from last listing\n    >>> client.last(from_id='...')  # sets cursor to given transaction_id and returns following transactions\n    >>> client.last(from_date='2013-03-01')  # sets cursor to given date and returns following transactions\n    \nGetting the latest transactions with account information in one request:\n\n.. code:: python\n\n   >>> client.last_transactions()\n   (\n      {'currency': 'CZK', 'account_number_full': 'XXXXXXXXXX/2010', 'balance': 42.00, 'account_number': 'XXXXXXXXXX', 'bank_code': '2010'}, \n      'transactions': <generator object _parse_transactions at 0x170c190>\n   )\n\nConflict Error\n--------------\n\n`Fio API documentation <http://www.fio.cz/docs/cz/API_Bankovnictvi.pdf>`_\n(Section 8.3) states that a single token should be used only once per\n30s. Otherwise, an HTTP 409 Conflict will be returned and\n``fiobank.ThrottlingError`` will be raised.\n\nDevelopment\n-----------\n\nInstall using `uv <https://docs.astral.sh/uv/>`_::\n\n    git clone git@github.com:honzajavorek/fiobank.git\n    cd fiobank\n    uv sync\n\nThen run tests::\n\n    uv run pytest\n\nLicense: ISC\n------------\n\n\u00a9 2025 Honza Javorek <mail@honzajavorek.cz>\n\nThis work is licensed under the `ISC\nlicense <https://en.wikipedia.org/wiki/ISC_license>`_.\n",
    "bugtrack_url": null,
    "license": "ICS",
    "summary": "Fio Bank API in Python (unofficial)",
    "version": "4.0.0",
    "project_urls": {
        "repository": "https://github.com/honzajavorek/fiobank"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6308cd46584bed7e523af779789ad926fea799ce706bcdb6df725c6d9ee27574",
                "md5": "4c3ec571cd5b36b683251287525231b5",
                "sha256": "309febe264bd6608181f689fba303027a468d56473b91db92a4899e43f7b7546"
            },
            "downloads": -1,
            "filename": "fiobank-4.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4c3ec571cd5b36b683251287525231b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5455,
            "upload_time": "2025-01-06T11:39:47",
            "upload_time_iso_8601": "2025-01-06T11:39:47.490763Z",
            "url": "https://files.pythonhosted.org/packages/63/08/cd46584bed7e523af779789ad926fea799ce706bcdb6df725c6d9ee27574/fiobank-4.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "90bb557b7c60d44f961a9f1393357af80af8137979b88ba619503fea2c793a9d",
                "md5": "6ffeee8d45d370c054cf6cd6861e5e1b",
                "sha256": "0f2c76f331b4c506dc54ba083db1e9e79d7a0f847698605478de385bfd509223"
            },
            "downloads": -1,
            "filename": "fiobank-4.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6ffeee8d45d370c054cf6cd6861e5e1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 353860,
            "upload_time": "2025-01-06T11:39:48",
            "upload_time_iso_8601": "2025-01-06T11:39:48.520030Z",
            "url": "https://files.pythonhosted.org/packages/90/bb/557b7c60d44f961a9f1393357af80af8137979b88ba619503fea2c793a9d/fiobank-4.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 11:39:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "honzajavorek",
    "github_project": "fiobank",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fiobank"
}
        
Elapsed time: 0.41417s