Python SDK for the iHela financial services API
Project description
iHela SDK
Python SDK for the iHela Credit Union API for financial services in Burundi. Framework-agnostic — works with Django, Flask, FastAPI, or any Python application.
Installation
pip install ihela-sdk
Or with uv:
uv add ihela-sdk
Quick Start
from ihela_sdk import MerchantClient
client = MerchantClient("your_client_id", "your_client_secret", prod=False)
For async applications (FastAPI, asyncio):
from ihela_sdk import AsyncMerchantClient
client = AsyncMerchantClient("your_client_id", "your_client_secret", prod=False)
OAuth2 SSO
from ihela_sdk import MerchantAuthorizationClient
auth = MerchantAuthorizationClient("client_id", "client_secret", prod=False)
login_url = auth.get_authorization_url(redirect_uri="https://app.com/callback/")
# Redirect user to login_url, handle callback with auth.authenticate(code, redirect_uri)
See the Authentication guide for Django, Flask, and FastAPI examples.
Exception Handling
from ihela_sdk import iHelaError, iHelaAPIError, iHelaAuthenticationError
try:
bill = client.init_bill(2000, "client@example.com", "Payment", "ref-001")
except iHelaAuthenticationError:
print("Authentication failed. Check your credentials.")
except iHelaAPIError as e:
print(f"API error (HTTP {e.status_code})")
except iHelaError:
print("A client error occurred.")
Features
- Merchant Services: Bill init/verify, cash-in, bank lists, customer lookup
- Banking Services: Deposits, withdrawals, account lookup/balance, statements, transaction fees
- Agent Services: Operations, withdrawal validation
- OAuth2: Client credentials and authorization code flows
- Framework-Agnostic: No web framework dependency — OAuth2 primitives work everywhere
- Async Support: Full async client variants using httpx
Documentation
Full documentation at UbuhingaVizion.github.io/ihela-sdk.
License
MIT — see LICENSE.
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
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 ihela_sdk-0.4.0.tar.gz.
File metadata
- Download URL: ihela_sdk-0.4.0.tar.gz
- Upload date:
- Size: 128.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b46395f5bcb6e02854c8ab85a36a6cd04232965d74f84a53f578713fbfc73ab
|
|
| MD5 |
87ea82507a6ab8e3617e23ada858e4f0
|
|
| BLAKE2b-256 |
dd7b84fd9b00066e047f5318614d03a09fb21100a74241646fceb327bb5bf4dc
|
File details
Details for the file ihela_sdk-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ihela_sdk-0.4.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068ecb275a6417a5560702d3e77c9f2d9b226caf5309cfc5234d7d1a0afdab25
|
|
| MD5 |
83808e4d73e7c8f9cf06ff2dbda2d474
|
|
| BLAKE2b-256 |
f5e49c45c2758cd2da7751397486100d3dc859c471969081246b384d891ac86c
|