Skip to main content

OpenBankProject API Python Client

A comprehensive Python client for the OpenBankProject API v5.1.0, providing access to all available endpoints with robust error handling and authentication support.

Features

  • Complete API Coverage: Access to all OpenBankProject API v5.1.0 endpoints
  • Multiple Authentication Methods: Support for both DirectLogin and GatewayLogin
  • Robust Error Handling: Specific exception types for different error scenarios
  • Type Hints: Full type annotations for better IDE integration
  • Comprehensive Documentation: Detailed docstrings and usage examples
  • Modular Design: Logically organized endpoint groups for easier navigation

Installation

# Install from the package directory
pip install -e /path/to/openbankproject_client

# Or install directly from the zip file
pip install openbankproject_client.zip

Quick Start

from openbankproject_client import OpenBankProjectClient

# Initialize with DirectLogin credentials
client = OpenBankProjectClient(
    base_url="https://api.openbankproject.com",
    api_version="v5.1.0",
    username="your_username",
    password="your_password",
    consumer_key="your_consumer_key"
)

# Or initialize with a pre-generated token
client = OpenBankProjectClient(
    base_url="https://api.openbankproject.com",
    api_version="v5.1.0",
    direct_login_token="your_direct_login_token"
)

# Get a list of banks
banks = client.extended_bank.get_banks()
print(f"Found {len(banks.get('banks', []))} banks")

# Get accounts for a specific bank
accounts = client.extended_account.get_private_accounts_at_bank("your_bank_id")
print(f"Found {len(accounts.get('accounts', []))} accounts")

# Get transactions for an account
transactions = client.transaction.get_transactions_for_account(
    "your_bank_id", "your_account_id", "owner"
)
print(f"Found {len(transactions.get('transactions', []))} transactions")

Authentication

The client supports two authentication methods:

DirectLogin

# Using username, password, and consumer key
client = OpenBankProjectClient(
    username="your_username",
    password="your_password",
    consumer_key="your_consumer_key"
)

# Using a pre-generated token
client = OpenBankProjectClient(
    direct_login_token="your_direct_login_token"
)

GatewayLogin

client = OpenBankProjectClient(
    gateway_login_token="your_gateway_login_token"
)

Error Handling

The client provides specific exception types for different error scenarios:

from openbankproject_client import (
    ApiError, AuthenticationError, ResourceNotFoundError, 
    ValidationError, PermissionError, ServerError
)

try:
    client.extended_bank.get_banks()
except AuthenticationError as e:
    print(f"Authentication error: {e}")
except ResourceNotFoundError as e:
    print(f"Resource not found: {e}")
except ValidationError as e:
    print(f"Validation error: {e}")
except PermissionError as e:
    print(f"Permission error: {e}")
except ServerError as e:
    print(f"Server error: {e}")
except ApiError as e:
    print(f"API error: {e}")

Available Endpoint Categories

The client provides access to all OpenBankProject API v5.1.0 endpoints, organized into logical categories:

  1. Account Access: Manage account access permissions
  2. Account Application: Handle account applications
  3. Account Holder: Manage account holders
  4. Account Metadata: Work with account tags and metadata
  5. Account Public: Access public account information
  6. API Collection: Manage API collections
  7. API Configuration: Configure API settings
  8. API Favorite: Manage API favorites
  9. API Management: Advanced API management functions
  10. ATM: ATM management and information
  11. Branch: Branch management and information
  12. Card: Card management and operations
  13. Connector Method: Manage connector methods
  14. Consent: Handle consent operations
  15. Counterparty: Manage counterparties
  16. Counterparty Limits: Set and manage counterparty limits
  17. Counterparty Metadata: Work with counterparty metadata
  18. Customer: Customer management and information
  19. Customer Meeting: Schedule and manage customer meetings
  20. Customer Message: Send and receive customer messages
  21. Direct Debit: Manage direct debits
  22. Dynamic Endpoint: Work with dynamic endpoints
  23. Dynamic Entity: Manage dynamic entities
  24. Dynamic Message Doc: Handle dynamic message documentation
  25. Dynamic Resource Doc: Manage dynamic resource documentation
  26. Extended Account: Advanced account operations
  27. Extended Bank: Advanced bank operations
  28. FX: Foreign exchange operations
  29. KYC: Know Your Customer operations
  30. Metric: Access API metrics
  31. Product: Product management and information
  32. Role: Manage roles and entitlements
  33. Scheduled Event: Work with scheduled events
  34. Scope: Manage API scopes
  35. Standing Order: Create and manage standing orders
  36. Transaction: Transaction operations
  37. Transaction Metadata: Work with transaction metadata
  38. Transaction Request: Create and manage transaction requests
  39. User: User management and operations
  40. User Invitation: Manage user invitations
  41. View Custom: Create and manage custom views
  42. View System: Work with system views
  43. Webhook: Manage webhooks
  44. WebUI Props: Configure web UI properties

Examples

See the examples.py file for comprehensive usage examples covering all major endpoint categories.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for openbankproject-client 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openbankproject-client 0.1.2
File Size Uploaded Provenance Actions
openbankproject_client-0.1.2.tar.gz 3.9 kB Without provenance Details for openbankproject_client-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openbankproject-client 0.1.2
File Interpreter ABI Platform Actions
openbankproject_client-0.1.2-py3-none-any.whl Python 3 none any Details for openbankproject_client-0.1.2-py3-none-any.whl

Total release size: 7.2 kB

Release files / openbankproject_client-0.1.2.tar.gz

Download URL openbankproject_client-0.1.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
013f501acfa4b5b8bba758218b7e35e1a5312e3a35f0ce554988ac4b4e48f008
BLAKE2b-256 checksum
How to use checksums
bef3cd6f12f861e48bf2b9eb8e47391099d550798af57714dfa9810c6c84540b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / openbankproject_client-0.1.2-py3-none-any.whl

Download URL openbankproject_client-0.1.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d120f88e7c5f9ebf32a6a4c231aee0907e362d2285caa25e0026e57a15c0313c
BLAKE2b-256 checksum
How to use checksums
8c9412aeb193d9eadf1effa53f1564b5d420343e43069cd9402c698a919fd417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Security for openbankproject-client 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page