Skip to main content

AI cost observability SDK - see the full spectrum of your AI spend

Project description

Spectracost Python SDK

See the full spectrum of your AI spend.

from openai import OpenAI
from spectracost import instrument

client = instrument(
    OpenAI(),
    api_key="afops_...",
    team="search",
    service="query-rewriting",
)

# Use exactly like a normal OpenAI client - now with cost tracking
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)

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

spectracost-0.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectracost-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file spectracost-0.1.1.tar.gz.

File metadata

  • Download URL: spectracost-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectracost-0.1.1.tar.gz
Algorithm Hash digest
SHA256 851c9c8949e3105f022111cd5d36cce3903eb9189e5952b5a035886c6775038a
MD5 22d2d1afdab2632de3d56869f96822c7
BLAKE2b-256 a7dd99e4aa93c7044cd42e3e33cad27053734427955f3cebfdb36294e4aa7e8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracost-0.1.1.tar.gz:

Publisher: publish-pypi.yml on intUnderflow/spectracost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spectracost-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spectracost-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectracost-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67847f7f3150178953bf0f799c82f469062d35b9c2ff7ecd4da656b8292eeb5a
MD5 177796c94cc2c3f277728a73aefb9011
BLAKE2b-256 19a7e5682a50dcd2ee323eb59b978efb5a0f7cafc8f55c27f7691f0b4203371d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracost-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on intUnderflow/spectracost

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