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.1

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.1
File Size Uploaded Provenance Actions
trame_sdk-0.1.1.tar.gz 18.8 kB With provenance Details for trame_sdk-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 36.5 kB

Release files / trame_sdk-0.1.1.tar.gz

Download URL trame_sdk-0.1.1.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
856eb9d6d7dc8f2745bb6a6922673a5e774874e1e069103e957ee6d298897751
BLAKE2b-256 checksum
How to use checksums
5fe1350e7a7f1a7d6be40b7e3c655e48fdf223366084732024ce4413d630562a
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.1-py3-none-any.whl

Download URL trame_sdk-0.1.1-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56529f1be1e07d6cfef18e7fc235e00e237a5e7b9ef8558abac3b076c65b2e95
BLAKE2b-256 checksum
How to use checksums
1530fd90e6d231fac1e377429856c00ab977205c71ff01b03c27abb7838c8188
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.1

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.1.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.1 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