Python library and FastAPI wrapper around python-fints
Project description
easy-fints
Python library with an optional FastAPI wrapper around python-fints.
PyPI package:
easy-fints
Python import package:
easy_fints
It currently supports:
- account listing
- balances
- transactions
- SEPA transfers
- TAN / decoupled confirmation flows
- payee verification (
VoP) continuation
The package can be used in three ways:
- as a Python library
- as a FastAPI-based REST server
- as a Dockerized REST server
Quick Start
Requirements:
- Python 3.11+
- a bank account with FinTS/HBCI access
- valid FinTS credentials and server URL
Install from PyPI:
pip install easy-fints
For local development:
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
Minimal .env:
FINTS_PRODUCT_ID=YourProductID
FINTS_PRODUCT_NAME=YourProductName
FINTS_PRODUCT_VERSION=YourProductVersion
FINTS_SESSION_TTL_SECONDS=300
A FinTS product ID can be requested via the official registration page:
https://www.fints.org/de/hersteller/produktregistrierung
Usage Modes
Library: importFinTSdirectly in your Python applicationREST server: run the built-in FastAPI service locallyDocker: run the REST server throughDockerfileordocker-compose.yml
Library
Use the package directly in Python:
from easy_fints import (
FinTS,
TanRequiredError,
)
with FinTS(
product_id="YourProductID",
bank="12345678",
user="your-user",
pin="your-pin",
server="https://bank.example/fints",
) as fints:
try:
accounts = fints.accounts()
transactions = fints.transactions(days=30)
except TanRequiredError as exc:
print(exc.challenge.message)
REST Server
Run the optional local HTTP server with the bundled CLI:
fints-rest-server start
fints-rest-server status
fints-rest-server stop
Configuration priority for the CLI:
- explicit CLI flags like
--hostor--port - values loaded from
--env-file - process environment variables
- built-in defaults
Installed CLI defaults:
- server host:
0.0.0.0 - server port:
8000 - PID file:
.fints-rest-server.pid - log file:
.fints-rest-server.log
CLI examples:
fints-rest-server start --host 127.0.0.1 --port 9686
fints-rest-server start --env-file /etc/easy-fints.env
fints-rest-server stop
OpenAPI:
http://127.0.0.1:8000/docshttp://127.0.0.1:8000/openapi.json
Docker
The repository includes both Dockerfile and docker-compose.yml.
Start the REST server with Docker Compose:
docker compose up --build -d
docker compose logs -f api
docker compose down
Current Docker defaults:
- container port:
9686 - published port:
9686 - env file:
.env - log volume:
./logs:/app/logs
Docker OpenAPI:
http://127.0.0.1:9686/docshttp://127.0.0.1:9686/openapi.json
REST API
Optional HTTP endpoints:
GET /healthPOST /accountsPOST /balancePOST /transactionsPOST /transferPOST /transfer/retry-with-namePOST /confirmGET /sessions/{session_id}DELETE /sessions/{session_id}
All operation endpoints accept a JSON body with a config object. Request values override env defaults.
Supported config fields:
bankuserpinserver
Transfer Support
POST /transfer supports a single SEPA credit transfer per request.
Transfer request fields:
source_accountaccount_namerecipient_namerecipient_ibanrecipient_bicamountpurposeendtoend_idinstant_paymentexecution_date
Current behavior:
account_nameis required becausepython-fints.simple_sepa_transfer(...)expects the sender name explicitlyinstant_payment=truerequests SCT Inst when the bank supports itexecution_date=YYYY-MM-DDrequests a dated transferinstant_paymentandexecution_datecannot be combined- unsupported transfer products return HTTP
422witherror="unsupported_transfer_product" - transfer challenge responses and final transfer responses include
transfer_overview
Confirmation Flow
The API uses a session-based confirmation flow.
Typical sequence:
POST /transferor another operation endpoint- either immediate
200, or a challenge response like409 tan_required - continue with
POST /confirm - repeat
/confirmfor decoupled app confirmation if needed - for payee verification, call
/confirmwithapprove_vop=true - if the recipient name should be corrected after VoP, call
POST /transfer/retry-with-name
Session helpers:
GET /sessions/{session_id}inspects the current stateDELETE /sessions/{session_id}cancels the active session
Session states currently used:
awaiting_tanawaiting_decoupledawaiting_voprunningresuming
Sessions are:
- stored in memory only
- process-local
- expired after an inactivity TTL
The TTL defaults to 300 seconds and can be changed with FINTS_SESSION_TTL_SECONDS.
Examples
The repository includes small scripts for manual API testing:
Library examples:
examples/accounts_lib.pyexamples/balance_lib.pyexamples/transactions_lib.pyexamples/single_account_lib.pyexamples/transfer_lib.py
They use examples/lib_helper.py and talk directly to FinTS.
REST API examples:
examples/accounts_api_tan.pyexamples/balance_api_tan.pyexamples/transactions_api_tan.pyexamples/single_account_api_tan.pyexamples/transfer_api_tan.py
They use examples/api_tan_helper.py and read credentials from .env.
Optional helper-script env vars for manual transfer runs only:
FINTS_TRANSFER_INSTANT_PAYMENT=trueFINTS_TRANSFER_EXECUTION_DATE=YYYY-MM-DD
Documentation
Detailed REST API reference:
Transfer workflow:
High-level testing/verification notes:
Development
Important files:
Basic checks:
python -m compileall easy_fints examples
.venv/bin/python -m pytest tests -q
Package build:
python -m build
GitHub Actions:
- CI runs on pushes to
mainand on pull requests - publishing to PyPI runs when a GitHub Release is published
Packaging
Package name on PyPI:
easy-fints
Import package in Python:
easy_fints
Install from PyPI after the first published release:
pip install easy-fints
Deployment Notes
This project intentionally keeps the API simple:
- no server-side profile model
- no persistent credential store
- no server-managed account data
- no built-in authentication layer
Recommended deployment style:
- trusted network only
- TLS at the edge
- optional reverse proxy, VPN, mTLS, or network isolation depending on your stack
- operation logs are sanitized by default and do not store raw PINs, TANs, or raw FinTS payloads
Current limitation:
- active confirmation sessions are in-memory and process-local, so the simplest supported runtime is a single API process
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_fints-1.3.0.tar.gz.
File metadata
- Download URL: easy_fints-1.3.0.tar.gz
- Upload date:
- Size: 46.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43f92bfadcf3fdb0753140ff4d1ecc59a77c8c6168408e13dda2702d416a8530
|
|
| MD5 |
7ce993abe686746e24f0bb94c9b43ab3
|
|
| BLAKE2b-256 |
d7ee56879cbc748489a2a32004e405436e6f8e5cbe24cc8ae47de4b0cb41a095
|
Provenance
The following attestation bundles were made for easy_fints-1.3.0.tar.gz:
Publisher:
publish.yml on QHLe/easy-fints
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
easy_fints-1.3.0.tar.gz -
Subject digest:
43f92bfadcf3fdb0753140ff4d1ecc59a77c8c6168408e13dda2702d416a8530 - Sigstore transparency entry: 1309653834
- Sigstore integration time:
-
Permalink:
QHLe/easy-fints@e35260b6a915c261c4ff83e433fa6ea23d1ad161 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QHLe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e35260b6a915c261c4ff83e433fa6ea23d1ad161 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file easy_fints-1.3.0-py3-none-any.whl.
File metadata
- Download URL: easy_fints-1.3.0-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a20ab213768d216601b1deea77b85519a5e44a539c9dad54b8a324529194cda
|
|
| MD5 |
4ea7fa2c2b3708d267de1b9525a74643
|
|
| BLAKE2b-256 |
0cba5c217ab2c84849593aa7b2c7cf768c2c0c77ee3a4685077950152206533c
|
Provenance
The following attestation bundles were made for easy_fints-1.3.0-py3-none-any.whl:
Publisher:
publish.yml on QHLe/easy-fints
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
easy_fints-1.3.0-py3-none-any.whl -
Subject digest:
9a20ab213768d216601b1deea77b85519a5e44a539c9dad54b8a324529194cda - Sigstore transparency entry: 1309653928
- Sigstore integration time:
-
Permalink:
QHLe/easy-fints@e35260b6a915c261c4ff83e433fa6ea23d1ad161 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QHLe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e35260b6a915c261c4ff83e433fa6ea23d1ad161 -
Trigger Event:
workflow_dispatch
-
Statement type: