Skip to main content

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: axemere_gateway_openai-0.2.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for axemere_gateway_openai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b1c962fd4d2d72fd7dd79d53c8002711fd2c691b2d6f6267cf1b21d497cbb206
MD5 d5da31ac7b005626879560b5b1cad40d
BLAKE2b-256 652707230e978404b016a7236d36e50b15cd2b3fa103e14a1d15b2f1bdbefb10

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for axemere_gateway_openai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06c97cb280a506c7789d8932c055211c408f6b982c8c34a966d7c4259ee583cb
MD5 4618fd5af3a0bdce55d6fb75d7788fec
BLAKE2b-256 93661f3b7d3b82506aba7cf605b7262734c7b54f26bef20c74614754463d6153

See more details on using hashes here.

Provenance

The following attestation bundles were made for axemere_gateway_openai-0.2.1-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 Sentry Error logging StatusPage Status page