Skip to main content

Server-to-server client for open-banking.io with local zero-knowledge envelope decryption.

Project description

open-banking-io (Python)

Server-to-server client for open-banking.io. It authenticates with your API key and decrypts the zero-knowledge data envelopes locally with your exported private key — the service only ever returns ciphertext it cannot read.

pip install open-banking-io
from open_banking_io import OpenBankingClient

# Load the credentials .json you exported from the app (API key + private key).
with OpenBankingClient.from_credentials("credentials.json") as client:
    for account in client.get_accounts():
        booked = next((b for b in account.balances if b.type == "ITBD"), None)
        label = account.display_name or account.owner_name
        print(f"{label} {account.iban}: {booked.amount if booked else None} {account.currency}")

        page = client.get_transactions(account.id, limit=50)
        for t in page.items:
            print(f"  {t.booking_date}  {t.creditor_name or t.debtor_name}  {t.amount} {t.currency}")

    # Trigger an online sync (decrypts the account uid locally and posts it):
    client.sync(account.id)

Or construct it explicitly:

client = OpenBankingClient(api_base_url, api_key, private_key_pkcs8)

API

  • get_accounts() -> list[Account] — decrypts each account's envelope, display name and balances.
  • get_transactions(account_id, *, date_from=None, date_to=None, limit=None, offset=None) -> TransactionPage
  • get_connections() -> list[Connection]
  • sync(account_id) -> SyncResult — decrypts the account uid locally and posts it.
  • sync_all() -> SyncAllResult — syncs every account that has an active session.

Amounts are exposed as decimal.Decimal. Models are plain @dataclasses.

When the client constructs its own httpx.Client it applies a default 30s timeout and sends a User-Agent: open-banking-io/python/<version> header on every request (a caller-supplied client is left untouched).

Encryption

Envelopes use ECDH P-256 → HKDF-SHA256 → AES-256-GCM. Decryption requires the private key from your credentials bundle and happens entirely in-process. See the repo README for the full scheme and the other language clients (.NET, Node).

Development

python -m venv .venv
.venv/bin/pip install -e .[dev]
.venv/bin/pytest -q

MIT licensed.

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

open_banking_io-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

open_banking_io-0.2.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file open_banking_io-0.2.0.tar.gz.

File metadata

  • Download URL: open_banking_io-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for open_banking_io-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2f7b6439efcc1aaa3ccfc7c3f731de5ec19fb61bf6832a0fcae3727ef1e87a6
MD5 e56995fd01f1db806ec35548ba5fd1b0
BLAKE2b-256 705f3623d6a0b5801f4516381a0ad0466b6563463a474f2b10a4dde7464def84

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_banking_io-0.2.0.tar.gz:

Publisher: publish-python.yml on open-banking-io/clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_banking_io-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_banking_io-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68016e25327677a0d78185a2a0d7245846afe3ed657d9fc0ecc6f8aa5d590c0f
MD5 9031da0d8d70f4dec05465014ab787ca
BLAKE2b-256 21855b12270dbeae687682bd90ed1ef0319dc8a077d7842947326ebdd794ddc5

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_banking_io-0.2.0-py3-none-any.whl:

Publisher: publish-python.yml on open-banking-io/clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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