cyclos-sdk-py
Production-grade Python SDK for the Cyclos 4.16 REST API.
Published on PyPI as cyclos-sdk-py, imported as angstrom_cyclos.
Installation
pip install cyclos-sdk-py
For development:
git clone https://github.com/Angstrom-Technologies/cyclos-sdk-py.git
cd cyclos-sdk-py
pip install -e ".[dev]"
Configuration
Set environment variables or pass a CyclosConfig object:
from angstrom_cyclos import CyclosClient, CyclosConfig
config = CyclosConfig(
base_url="https://wallet.angstrom-technologies.ug/uwallet/api",
username="service_client",
password="...",
)
client = CyclosClient(config)
Environment variables
CYCLOS_BASE_URL=https://wallet.angstrom-technologies.ug/uwallet/api
CYCLOS_USERNAME=service_client
CYCLOS_PASSWORD=...
CYCLOS_TIMEOUT=30
CYCLOS_VERIFY_SSL=true
CYCLOS_MAX_RETRIES=3
CYCLOS_RETRY_BACKOFF=0.5
Authentication
from angstrom_cyclos import CyclosClient, CyclosConfig
config = CyclosConfig.from_env()
client = CyclosClient(config)
client.auth.login("customer", "password")
print(client.auth.is_authenticated())
client.auth.logout()
Creating members
Individual
customer = client.members.create_individual(
username="256772123456",
first_name="John",
last_name="Doe",
email="john@example.com",
mobile="256772123456",
custom_fields={"kycStatus": "VERIFIED"},
)
Merchant
merchant = client.members.create_merchant(
username="merchant001",
name="Merchant One",
email="merchant@example.com",
mobile="256772123456",
group="merchant",
)
Organization
organization = client.organizations.create(
group="corporate",
username="abc_limited",
name="ABC Limited",
custom_fields={"businessRegistrationNumber": "800200012345"},
)
Operators
operator = client.operators.create(
organization_id=organization.user.id,
username="operator001",
first_name="Jane",
last_name="Doe",
)
client.operators.assign_permissions(
organization_id=organization.user.id,
operator_id=operator.user.id,
permissions=["VIEW_MEMBER", "PERFORM_TRANSFER"],
)
Web service client
client.webservices.send_activation_code(
{"mobilePhone": "256772123456"}
)
ws_client = client.webservices.create_client(
name="Angstrom Wallet API",
activation_code="123456",
)
Accounts and balances
accounts = client.accounts.list(member_id="alice")
account = client.accounts.get(member_id="alice", account_type="mobileWallet")
balance = client.accounts.get_balance(member_id="alice", account_type="mobileWallet")
print(balance.balance)
Transfers
from decimal import Decimal
transfer = client.transfers.create(
transfer_type="walletTransfer",
from_account="alice",
to_account="bob",
amount=Decimal("50000"),
currency="UGX",
description="P2P transfer",
idempotency_key="TXN-20260909-000001",
)
Transfer history
history = client.transfers.history(
member_id="alice",
account_type="mobileWallet",
page=0,
page_size=50,
)
Transaction lookup
transaction = client.transactions.get("transaction-id")
Error handling
from angstrom_cyclos import CyclosAuthenticationError, CyclosValidationError, CyclosNotFoundError
try:
client.auth.login("user", "wrong")
except CyclosAuthenticationError as exc:
print(exc.status_code)
except CyclosValidationError as exc:
print(exc.property_errors)
except CyclosNotFoundError as exc:
print(exc.endpoint)
Async usage
import asyncio
from angstrom_cyclos import AsyncCyclosClient, CyclosConfig
async def main() -> None:
config = CyclosConfig.from_env()
async with AsyncCyclosClient(config) as client:
await client.auth.login("user", "pass")
member = await client.members.get("alice")
print(member)
asyncio.run(main())
CLI
cyclos --help
cyclos members get <id>
cyclos members search <query>
cyclos accounts balance <member>
cyclos transfers get <id>
cyclos transfers history <member>
Architecture
Mobile App
|
Web App
|
SMS / USSD
|
Wallet API
|
Angstrom Cyclos SDK <-- this package
|
Cyclos
|
PostgreSQL
This SDK is only an API client. Mobile money integrations (MTN/Airtel) belong in the wallet middleware, not in this package.
Testing
pytest
mypy src
ruff check src
ruff format src
License
MIT License - see LICENSE.
Metadata
Release files for cyclos-sdk-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cyclos_sdk_py-0.1.0.tar.gz | 335.5 kB | With provenance | Details for cyclos_sdk_py-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cyclos_sdk_py-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cyclos_sdk_py-0.1.0-py3-none-any.whl |
Total release size: 391.0 kB
Release files / cyclos_sdk_py-0.1.0.tar.gz
| Download URL | cyclos_sdk_py-0.1.0.tar.gz |
|---|---|
| Size | 335.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44efa29a4e17a275771d9da5221348aed6b1940405e67b62f39d6dfa4f26bd63
|
|
BLAKE2b-256 checksum How to use checksums |
15b4017e362cc1b172d6c551e6f782d5aae34c2e61eea7bd577b5d21d13438c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / cyclos_sdk_py-0.1.0-py3-none-any.whl
| Download URL | cyclos_sdk_py-0.1.0-py3-none-any.whl |
|---|---|
| Size | 55.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aeaf1b1e2f0abf34bedaef9c876dc1eaf60a9b4b08124c47a0736bae16951e8f
|
|
BLAKE2b-256 checksum How to use checksums |
b8d30998133fd190d518226c6323640ada4084069f9ad2654fde30eed0173d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logSecurity for cyclos-sdk-py 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cyclos_sdk_py-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logA 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.