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.1.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.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4de65251ef555526df205314c1d55f0c011c1dd0221cb0a15881263125595a4f
MD5 9b0d38cb7ae6e7b1aa75fce93aa4d53e
BLAKE2b-256 1d5f815bd1801dfed046fd0382a4001b606bf8e192a546cec1d3874f92b8f9d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: axemere_gateway-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 914404969786b28cf061b76d4807047d6f47a6fae4527450bb108afe3e980adf
MD5 bc583b2b697a8a7cd141f6f450edf033
BLAKE2b-256 ab18d2506e985606633f4b30218a32b5c358aee3ba72ced0ed745613b60f9753

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway-0.2.1-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