Skip to main content

Costimizer AI observability SDK for LLM FinOps

Project description

Costimizer Python SDK

PyPI

Capture LLM calls and send them to Costimizer FinOps.

Install only the provider client you use — same pattern as PostHog:

pip install "costimizer[openai]"
pip install "costimizer[all]"   # every provider

Core SDK (httpx only) installs with:

pip install costimizer

OpenAI

pip install "costimizer[openai]"
from costimizer import Costimizer
from costimizer.ai.openai import OpenAI

costimizer = Costimizer(
    project_token="fo_ingest_your_key",
    host="https://api.costimizer.ai",
)

client = OpenAI(
    api_key="sk-...",
    costimizer_client=costimizer,
)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
    costimizer_trace_name="support-chat",
)
costimizer.shutdown()

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

costimizer-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

costimizer-0.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: costimizer-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for costimizer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7cd40894e8b279ac6be7e74ca3489dcf167b26265adaed9811d1d8010aa8f2ed
MD5 6874a023ec97777f8448d83f16b6662f
BLAKE2b-256 04d95af4e99ac931e9fc42037a8fd0b146f9b23607548b5841f6ef737daf827b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: costimizer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for costimizer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf808053e76e0541c9b30a3ada4e5c17f33660ca80f927f135a92a5c7ee9e977
MD5 a7f2ddbe09922b5f91ea29d8dc9f3559
BLAKE2b-256 8bde1244e9a394854790db35afec1d8653b6f158bc4946820659879e0b9b3126

See more details on using hashes here.

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