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.5.tar.gz (10.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.5-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway-0.1.5.tar.gz
  • Upload date:
  • Size: 10.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.5.tar.gz
Algorithm Hash digest
SHA256 22070cf129f9b9e87e700b19170eb7c03377fbc75111d4ecd535baf36a0acfdd
MD5 d8181b78d13ccb8711fce77d4d186472
BLAKE2b-256 a53eb488a24738c5c44075ed834c71a9a6f1538ee8b0139d26d5bf0e5c91db69

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: axemere_gateway-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c73fec1b018524ba56e1fdeec56f28163278a203a708f0099ad5cc5ec761d7
MD5 0fe211b4fc1fb7afc74e3ece0b0f8f44
BLAKE2b-256 e5fbabf86b9a9e0349bc698bc5f8d06f17e0639cac0f8f5ac209ac779c1194d7

See more details on using hashes here.

Provenance

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