Skip to main content

Axemere AI Gateway OpenAI SDK wrapper — drop-in OpenAI/AzureOpenAI subclasses

Project description

axemere-gateway-openai

License: MIT

Drop-in replacement for the OpenAI Python SDK that routes every request through the Axemere AI Gateway.

Change one import — all existing OpenAI code works unchanged. The gateway adds cost controls, policy enforcement, and an append-only audit ledger to every call.

Install

pip install axemere-gateway-openai

Usage

# Before
from openai import OpenAI

# After — one line change
from axemere.gateway.openai import OpenAI

client = OpenAI()  # reads AXEMERE_GATEWAY_URL + AXEMERE_GATEWAY_TOKEN
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Streaming, async (AsyncOpenAI), and Azure OpenAI (AzureOpenAI, AsyncAzureOpenAI) are all supported.

Configuration

Env var Description
AXEMERE_GATEWAY_URL Gateway base URL, e.g. http://localhost:7080
AXEMERE_GATEWAY_TOKEN Bearer token issued by the gateway

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_openai-0.1.5.tar.gz (2.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_openai-0.1.5-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway_openai-0.1.5.tar.gz
  • Upload date:
  • Size: 2.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_openai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 a577a7f983608a7043818482ff07e6b0e01802fab2218e1a1601d42c739fb04e
MD5 f4f527c6a4842ee1f4e7fa1ae5c13cbc
BLAKE2b-256 dba1dbd46ee20ab4982bdc8c543a931d67ae51eff6bccaeca2d8c5172e829165

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for axemere_gateway_openai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0718db7c401129d168f45a59fa5ba9b57cbc8bef0d58b6e534162e1f458f72f7
MD5 d33e68f550f4c88bf3b9d58d3d3518c9
BLAKE2b-256 2325e01db57d260ab2d4c9b245b8596e7e2cec06febeb6148550fff01a234ba1

See more details on using hashes here.

Provenance

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