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

pip install prismai-sdk

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.5.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.5-py3-none-any.whl (677.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prismai_sdk-4.14.5.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.5.tar.gz
Algorithm Hash digest
SHA256 a65379206eedb97c66fa16fcb483e4cdf6c058ccd23b6906090eed239fb75bf2
MD5 1cce5552e2bc54a1b9e942d0be03e33c
BLAKE2b-256 9251403e6e20eb061b24bd1e54d349e8ebd51aeb242f3c64a63d79ac55f807db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prismai_sdk-4.14.5-py3-none-any.whl
  • Upload date:
  • Size: 677.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e583551c562f48ffe6b41caaaa78eb8e03880e99914a576f341bbd9e23ecfa08
MD5 d28945bd0b9f45fa81c401714f094cd5
BLAKE2b-256 16ccfaaf71490655be2d12f6d461c52ff204a85abbcc789127e36a5fb8ce455a

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