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.2.tar.gz (6.5 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.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prism_llm_labs-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 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.2.tar.gz
Algorithm Hash digest
SHA256 d2a1732861eb3ba5596af7bace1c69284ef2d50fd2631be24b6ff107b8bd6e69
MD5 2ad4d8951615f47c7d4ca6e8f2bbd284
BLAKE2b-256 65e9e6995bff1c083e914d501dbe34610ac6e848aa8e6fb701bace227e926050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prism_llm_labs-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0dce8378a69cdc94bb32c5e82a5a601cbfbb1b1472d44beff00c9e0b06ba2eca
MD5 cc68f2b7379fe0ccfb2be1f2d91a08d2
BLAKE2b-256 20db6400510fa5b9d2a8dd88ef88e39cf28cc31d020c1418e169a0cffb3a59e8

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