CloudPayments SDK
Python SDK for CloudPayments API with sync/async clients, typed response models, retry middleware, and webhook utilities.
Features
- Sync and async clients (
CloudPayments,AsyncCloudPayments) - Resource-oriented API (
payments,orders,subscriptions,notifications,claims,payouts) - Pydantic v2 models with tolerant parsing (
extra="allow") - Retry middleware for transient network/rate-limit errors
- Webhook signature verification and event parsing
- Optional framework adapters: FastAPI, Flask, Django
Installation
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
With webhook framework adapters:
uv pip install -e ".[webhooks]"
Quick Start
from cloudpayments_sdk import CloudPayments
with CloudPayments(public_id="pk_...", api_secret="...") as client:
assert client.test() is True
Live API Tests
export CLOUDPAYMENTS_RUN_LIVE=1
export CLOUDPAYMENTS_PUBLIC_ID="pk_..."
export CLOUDPAYMENTS_API_SECRET="..."
export CLOUDPAYMENTS_IP_ADDRESS="$(curl -4 https://api.ipify.org)"
uv run --extra dev pytest -q -m live -s
Local Checks
uv run --extra dev ruff check cloudpayments_sdk tests examples
uv run --extra dev mypy cloudpayments_sdk
uv run --extra dev pytest -q
Examples
python -m examples.sync_basicpython -m examples.async_basicpython -m examples.e2e_token_subscriptionpython -m examples.webhook_fastapi
Detailed usage: docs/examples.md
API method list: docs/reference.md
Build
uv build
License
MIT (LICENSE).
Release files for cloudpayments-sdk 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 | |
|---|---|---|---|
| cloudpayments_sdk-0.1.0.tar.gz | 30.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cloudpayments_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.4 kB
Release files / cloudpayments_sdk-0.1.0.tar.gz
| Download URL | cloudpayments_sdk-0.1.0.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae1506e46218c6c3137b2a34dc09560b980ab601e842d922438286b68746c3cf
|
|
BLAKE2b-256 checksum How to use checksums |
eb3dc7706d48f45b0762487978ad2151fb460a19001d11e78b2c38014eb84d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / cloudpayments_sdk-0.1.0-py3-none-any.whl
| Download URL | cloudpayments_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
361fa0bf16b5a9d6862c68a4c7a40250179e3c9fe9a93c4688539357004df812
|
|
BLAKE2b-256 checksum How to use checksums |
fc67675edbb3c23af00bf44532a13a60b41a00cb3b6ce14696e84a13ceecd7b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|