Skip to main content

Trame Python SDK

Python client for the versioned Trame tenant API. It uses the Python standard library for HTTPS requests and has no runtime dependencies. The package source is in this repository.

Install it with:

python -m pip install trame-sdk
from trame_sdk import PaymentDeclaration, TrameClient

trame = TrameClient(api_key="tr_test_...")
declaration: PaymentDeclaration = {
    "amount": 10000,
    "currency": "XOF",
    "country": "BJ",
    "provider": "fedapay",
    "provider_reference": "provider-transaction-id",
    "beneficiary_id": "beneficiary-id",
}
payment = trame.request_operation(
    "declarePayment",
    body=declaration,
    idempotency_key="platform-order-4821",
).json()

Every operationId in docs/03-api/openapi.yaml is accepted by request_operation. Pass path, query, body, and idempotency_key as keyword arguments. ApiResponse preserves response headers and raw bytes, so CSV and PDF results can be read without JSON decoding. paginate() follows the API's cursor and yields individual records.

The generated trame_sdk.models module provides TypedDict shapes for the OpenAPI schemas. These are static type hints, not runtime validation.

Test keys use api.preprod.trame.africa; live keys use api.trame.africa. Customer-session operations use the cookie returned by openSession; provide the matching session_environment and the allowed session_origin for writes.

The webhook helpers verify the signature over the raw request body. For production deduplication, pass a persistent event store with an atomic start, expiring processing lease, fencing token, and acknowledgement after the application side effects succeed.

Metadata

Release files for trame-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)

Source distribution for trame-sdk 0.1.0
File Size Uploaded Provenance Actions
trame_sdk-0.1.0.tar.gz 18.4 kB With provenance Details for trame_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trame-sdk 0.1.0
File Interpreter ABI Platform Actions
trame_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for trame_sdk-0.1.0-py3-none-any.whl

Total release size: 36.1 kB

Release files / trame_sdk-0.1.0.tar.gz

Download URL trame_sdk-0.1.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b36bc05809792e4c47e77b4fc0cac7c6b7f8ea735422d83384f4810c2df23d63
BLAKE2b-256 checksum
How to use checksums
3d8312fa63447eba218b897e62c4cd9e7d0d274ee8a9779c0200373faf722cd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / trame_sdk-0.1.0-py3-none-any.whl

Download URL trame_sdk-0.1.0-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a49582c0697705c4595f369669e8d9d368cfd4790146e4571893bb5cb6b0af4
BLAKE2b-256 checksum
How to use checksums
f923687531196c258b33eb0bb626291dca66d4875a135fa5b3a1f5d1f53c8f87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for trame-sdk 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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for trame_sdk-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 Nov 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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