Skip to main content

PrismAI Python SDK

The PrismAI Python SDK covers the full platform: observability/tracing (OpenTelemetry-based, with OpenAI and LangChain integrations), datasets & experiments (offline evaluation and regression testing of prompt/model changes), LLM-as-a-judge and custom evaluations/scores, prompt management, and a full REST API client.

Installation

[!IMPORTANT] The SDK was rewritten in v4 and released in March 2026.

pip install prismai

Quickstart

# env: PRISMAI_PUBLIC_KEY, PRISMAI_SECRET_KEY, PRISMAI_BASE_URL

from prismai import get_client

prismai = get_client()

# Create a span using a context manager
with prismai.start_as_current_observation(as_type="span", name="process-request") as span:
    # Your processing logic here
    span.update(output="Processing complete")

    # Create a nested generation for an LLM call
    with prismai.start_as_current_observation(as_type="generation", name="llm-response", model="gpt-5.6") as generation:
        # Your LLM call logic here
        generation.update(output="Generated response")

# All spans are automatically closed when exiting their context blocks


# Flush events in short-lived applications
prismai.flush()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prismai_sdk-4.14.4.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

prismai_sdk-4.14.4-py3-none-any.whl (677.1 kB view details)

Uploaded Python 3

File details

Details for the file prismai_sdk-4.14.4.tar.gz.

File metadata

  • Download URL: prismai_sdk-4.14.4.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for prismai_sdk-4.14.4.tar.gz
Algorithm Hash digest
SHA256 dc1bfe72f207dd9bfea50eef9f8be2512f7e0cd4b00ee33d851c1f19711fbe11
MD5 2677ea98c9e4440296770da306ecf839
BLAKE2b-256 1194f628fe595f56bf69cdd3a5c34e8a9615e8f522121519f2c3cb00c1b584bc

See more details on using hashes here.

File details

Details for the file prismai_sdk-4.14.4-py3-none-any.whl.

File metadata

  • Download URL: prismai_sdk-4.14.4-py3-none-any.whl
  • Upload date:
  • Size: 677.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for prismai_sdk-4.14.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7f578bf7bd738116fa783171849c50b24a47c4cff135dcb04b245d972d6849db
MD5 f922016fc8df3bb0c1c2395af1556ff2
BLAKE2b-256 750f29fb9cacaa5981020f78909082b3403abfe0d0368c242dffe6a4b1f9c066

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