Skip to main content

LLM cost and usage observability SDK

Project description

prism-llm

LLM cost and usage observability SDK. Drop-in replacement for the OpenAI client.

Install

pip install prism-llm

Usage

from prism import OpenAI

client = OpenAI(
    api_key="sk-...",          # your OpenAI key
    prism_key="prism_live_...", # your Prism API key
    project="my-project",
    environment="production",
)

# Use exactly like openai.OpenAI
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)

Configuration

Env var Description
PRISM_API_KEY Your Prism API key (Tinybird ingest token)
PRISM_PROJECT Project name for attribution
PRISM_TEAM Team identifier
PRISM_ENVIRONMENT production / staging / development
PRISM_TINYBIRD_INGEST_URL Override Tinybird ingest URL (for non-EU regions)

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

prism_llm_labs-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

prism_llm_labs-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for prism_llm_labs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2511ef6aabc87557fa51848241c4358c24c20263fda24ce8046689a77a1b0fbd
MD5 4ba988e27734c5a3cb40679de108cad4
BLAKE2b-256 d98616ceff2bb993ccd6f279df56f61e5330cf186f4e644da0bcfbade75ee525

See more details on using hashes here.

File details

Details for the file prism_llm_labs-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for prism_llm_labs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0f5977141682192294f77873d2abf2c1f2326006479c8542d25f7174e3734bd
MD5 9cfbee9bb51e76e6102e96c67e0a1345
BLAKE2b-256 8310c1624722b66f816e3b2eec9c05593bd6302670e8acb0ab28d550fc90b7d0

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