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

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 92589972696ca77a46e7b85abf0a86417f7da881323b8111406b1a4e162845bd
MD5 cae86b4ed1db0efbcd19054d614e676b
BLAKE2b-256 20d5003db3cfbc539930ce0ba1ffd7d1e7b06d197267931d1c13d8d6a3fea387

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for axemere_gateway-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6e22685b2b2530aa06208ac02ed45811c6bcad37c8196d05f350ab12dc006a89
MD5 87993d9e0fc522ee132fc1bc329e9c9a
BLAKE2b-256 8c6aecdf7c92010b11d2ccdda565fee7c158250d7ceaec3066439a747fc5c1b5

See more details on using hashes here.

Provenance

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