Skip to main content

Axemere AI Gateway Python SDK — framework-independent async client

Project description

axemere-gateway

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_WORKLOAD_TOKEN
client = AiGatewayClient(config)

result = client.execute(
    provider="openai",
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(result.content)
print(result.metering.cost_usd)  # "$0.000042"

Configuration

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

Links

License

MIT

Project details


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.1.0.tar.gz (8.1 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.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axemere_gateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b7975df1737f8d320db94b256b489332ef25f2913b4cac5bd9aa55cb2d06854
MD5 fa26ecc9e0f4c998f74adca6c4048338
BLAKE2b-256 dd99758a577ab44c40faedee9305cf1d482737e9db1e6edf7b7cd855820e3eaf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: axemere_gateway-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for axemere_gateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7e5b0e1d7cb252301141300a3f38e986980cbb5ea48cb5b9ba50c58dff99da
MD5 f5a85a5b3cfb4bdfb8b9333f34ee3335
BLAKE2b-256 3bc4db9f913b6ad1241841406ed1e2292f5e16c64271978c634df739e9f332ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway-0.1.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 Pingdom Monitoring Sentry Error logging StatusPage Status page