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

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectracost-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 b7f12b2756bb3e6428111321dd537b14dae3e6789ee303a4ac610e69ff7df0c8
MD5 a2702f71c1cd115b54535d4f16745870
BLAKE2b-256 fcf20b02e3d2d61a17322ed9b719f23c140f6f31c3842cd02847061eaf9673bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: spectracost-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 612934bc35897e2f5f754207805fbce230f33f07dd690dfe7b450da1e2d33782
MD5 aea2503f17b616488653a368e6da3a11
BLAKE2b-256 2575e851889eb34c199e225b84453d37a9d138cd7aa3c423aeefb96526157951

See more details on using hashes here.

Provenance

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