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.

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.1.0.tar.gz (8.0 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.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for open_banking_io-0.1.0.tar.gz
Algorithm Hash digest
SHA256 989ccab273bfc50889dcd1db745779b59288d579dfa3c5f1ab594e9f1299a886
MD5 8c369569735c71b742073bef390ed5b6
BLAKE2b-256 bc22da200c1015ec1d4f9a2ca4987ad76202663d93eb7a9efcf465347e7f5bff

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_banking_io-0.1.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.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_banking_io-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb8b65dc648de4b373d5f65d68fc747da79b3676468932bf16a2d27516dfd769
MD5 8a32aecedc68cb20c77780f70d667aef
BLAKE2b-256 56352252d449b0bb70fd49694f01ca7696baee60c361ced389aee3a6ac0afa1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_banking_io-0.1.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