Skip to main content

Python Fio API implementaion

Project description

fio_api

Typed, well-documented client for the public Fio banking API. It focuses on the JSON variant of the API and wraps the handful of available endpoints with a small, user friendly class.

Features

  • Fetch statements by explicit date range or by their year/id combination
  • Work with strongly typed dataclasses for account metadata and transactions
  • Update server-side checkpoints (the "zarážka") via helper methods
  • Includes a pytest suite with property-based tests

Getting started

uv pip install -e .
from datetime import date

from fio_api import FioClient

client = FioClient(api_key="your-token")
statement = client.fetch_transactions(date(2024, 1, 1), date(2024, 1, 31))
print(statement.info.closing_balance)
for transaction in statement.transactions:
    print(transaction.transaction_id, transaction.amount)

Use context manager support to ensure the underlying connection pool is released:

with FioClient(api_key="token") as client:
    print(client.get_balance())

Testing

Install the optional dev dependencies and run the suite:

uv pip install -e .[dev]
uv run pytest

The tests stub the HTTP API via httpx.MockTransport, so no network access is required.

Examples

Use the bundled helper script to display the latest batch of transactions:

export FIO_API_KEY=your-token
uv run python -m scripts.show_transactions

The script fetches today's transactions (using the periods/ endpoint) and prints them in a small table with basic metadata.

Documentation

The project ships an MkDocs site under docs/:

uv run mkdocs serve   # live reload
uv run mkdocs build   # produce static site

The published pages cover an overview, usage guide, and API reference.

Disclaimer

The project is licensed under the MIT License and provided "as is" without any warranty or responsibility. Use the code at your own risk.

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

fio_api-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fio_api-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file fio_api-0.1.0.tar.gz.

File metadata

  • Download URL: fio_api-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fio_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9a933b05513fe5b1e100e82557707afaef1f4494af55eda5dd14f44e9d3391e
MD5 1c29dbedef827dd9847e1c634ae2b0ad
BLAKE2b-256 9f69a8a91881ab194087dd892810b07f37e0be0acf86b0a506834492a1d5d6e2

See more details on using hashes here.

File details

Details for the file fio_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fio_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fio_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb7e69a524dcb6130a553ece79aa2e7454b8bcf32ffa92582cc92847d0804dfd
MD5 72f0f7ce670483a9210e10b47c133967
BLAKE2b-256 d63267b602634b07a00938ed8351bbfd0138f8a14af483012f9b02c1b930cc6d

See more details on using hashes here.

Supported by

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