demystify-gateway-sdk
Python client for the dmstfy-gateway data plane — a multi-tenant, OpenAI-compatible AI gateway with virtual keys, per-tenant rate limits, micro-USD budget ledgers, and usage metering.
Part of the Demystify Core Services suite. Sync and async clients are provided; both speak the same wire contract the gateway's mock and live backends share, so code written against the offline mock runs unchanged against a real deployment.
Install
pip install demystify-gateway-sdk
# or
uv add demystify-gateway-sdk
Quickstart
from demystify_gateway_sdk import create_gateway_client
client = create_gateway_client(
base_url="http://localhost:8080",
key="dmk_your_virtual_key",
product="my-app",
)
res = client.chat(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(res["choices"][0]["message"]["content"])
print("cost µUSD:", res["usage"]["cost_micro_usd"])
Async is symmetric:
from demystify_gateway_sdk import create_async_gateway_client
client = create_async_gateway_client(base_url="http://localhost:8080", key="dmk_...")
res = await client.chat(model="gpt-4o-mini", messages=[...])
Public API
| Symbol | Purpose |
|---|---|
create_gateway_client / GatewayClient |
Synchronous client |
create_async_gateway_client / AsyncGatewayClient |
Asyncio client |
SpeechResult |
Typed result for audio transcription/speech endpoints |
GatewayError |
Raised on non-2xx responses (carries status + error taxonomy code) |
See the module README for the full endpoint reference, the admin/control-plane API, and how to run the gateway offline with zero API keys.
License
MIT © Demystify Systems
Metadata
Release files for demystify-gateway-sdk 0.3.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 |
|---|---|---|---|---|
| demystify_gateway_sdk-0.3.0.tar.gz | 24.0 kB | With provenance | Details for demystify_gateway_sdk-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| demystify_gateway_sdk-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for demystify_gateway_sdk-0.3.0-py3-none-any.whl |
Total release size: 29.8 kB
Release files / demystify_gateway_sdk-0.3.0.tar.gz
| Download URL | demystify_gateway_sdk-0.3.0.tar.gz |
|---|---|
| Size | 24.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
209c9134241e60761fc9c130d749a1324d16c075f2f9cc654ba697c244d80239
|
|
BLAKE2b-256 checksum How to use checksums |
950150d9065394c5c085474ba74e8c7245925d7ba7b8f39f2b2530228b06d083
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logRelease files / demystify_gateway_sdk-0.3.0-py3-none-any.whl
| Download URL | demystify_gateway_sdk-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ecb49b7098cece1060b4ba567a0f61ef3375f518433d33703c7037184714406
|
|
BLAKE2b-256 checksum How to use checksums |
6f0cd37ee9cb0d49e79d1c21e6d320d7eee70de174b5f55c5af62b7dcd7498bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 17, 2026.
Transparency logSecurity for demystify-gateway-sdk 0.3.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.
Attestation for demystify_gateway_sdk-0.3.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 Jul 17, 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.