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="sprc_...",
    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.2.3.tar.gz (15.9 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.2.3-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spectracost-0.2.3.tar.gz
Algorithm Hash digest
SHA256 89a4fc470cf5f1e6e8d4aea4ed5948a5564e3da7c688d43b7a8f410bbd69c0ab
MD5 e9e01e55ac6df8084e4ae984596602d7
BLAKE2b-256 475259b34a88932fadc6f2d14de7018d67b4d5bd4f9bbf53325e905bb1cf2b99

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on spectracost/python-sdk

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.2.3-py3-none-any.whl.

File metadata

  • Download URL: spectracost-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 13.2 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.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c90f8e1a01207a349d39a8bc920d58e272cb944c5700308ffcf02f9bcbdf4499
MD5 42e05ff2390788775701754404849f80
BLAKE2b-256 cdff639b17561f25608342d69fc53e5a4dfbad958f091a6eb1a266cc72dc0ce5

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on spectracost/python-sdk

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