Skip to main content

Axemere AI Gateway Python SDK — framework-independent async client

Project description

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

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.6.tar.gz (11.9 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.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway-0.1.6.tar.gz
  • Upload date:
  • Size: 11.9 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.6.tar.gz
Algorithm Hash digest
SHA256 3ce5a0e3089f5b865467930e50b807e49d8dc0ed5d8122a8051fe81adbf19eef
MD5 7f7068202f59651ceb48b0715cb56777
BLAKE2b-256 7daaa79bd1160473f06b342dd56264d567adc1bc06aaa30e3f065171d3fa8699

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: axemere_gateway-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 12.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2943930eb17e3d57f3e497f42aaf0631828590575ffec01c723036c31a9987b8
MD5 4d6bfe91d7f46a7c11291db975060d40
BLAKE2b-256 035ba6662d8664b2799c06fe390d152d7c5c0dc27e731040d2ba726aa0a9067d

See more details on using hashes here.

Provenance

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