Skip to main content

axemere-gateway

License: MIT

Framework-independent Python client for the Axemere AI Gateway.

Use this package when you want explicit control over every request, or when you are not using OpenAI, Anthropic, or another supported SDK. If you are already using one of those SDKs, install the matching drop-in wrapper instead (axemere-gateway-openai, axemere-gateway-anthropic, etc.) — it requires no code changes beyond the import.

Install

pip install axemere-gateway

Usage

from axemere.gateway import AiGatewayClient, AiGatewayConfig

config = AiGatewayConfig()  # reads AXEMERE_GATEWAY_URL + AXEMERE_GATEWAY_TOKEN
client = AiGatewayClient(config)

# execute() is async; execute_sync() is the synchronous entry point.
result = client.execute_sync(
    provider="openai",
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(result.content)
if result.metering:
    print(result.metering.cost_usd)  # float USD, e.g. 0.000042

Configuration

Env var Description
AXEMERE_GATEWAY_URL Gateway base URL, e.g. http://localhost:7080
AXEMERE_GATEWAY_TOKEN Bearer token issued by the gateway (legacy AXEMERE_WORKLOAD_TOKEN still accepted)
AXEMERE_WORKLOAD_ID Workload identifier for attribution
AXEMERE_PROJECT_ID Project identifier for spend grouping

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

axemere_gateway-0.2.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

axemere_gateway-0.2.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file axemere_gateway-0.2.0.tar.gz.

File metadata

  • Download URL: axemere_gateway-0.2.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for axemere_gateway-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d97a07bb0c6c982a1555b66d8e9ae88eaf2c1f3f12a349fb8212086bd7c1ea5
MD5 d7bcc8439a7c6fb67bb3d9a94e87a98e
BLAKE2b-256 5755f14bd992a665f8260c517e102733286e254d4653b7f62fec81f7498575bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway-0.2.0.tar.gz:

Publisher: publish.yml on Axemere-LLC/axemere-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file axemere_gateway-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: axemere_gateway-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for axemere_gateway-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a085f58182a885c26d1c2688874cf1d80be6d3cbf979c499d4f68d0902d28ac6
MD5 4dd741e8e2b7b2f2adb6f423cee3ab50
BLAKE2b-256 b1eb7d73a48a3ec7c87e2801a869ae7b1038eeb1fa47dfa551a146a9546ccb50

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Axemere-LLC/axemere-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page