Skip to main content
Palqee Prisma Client

Typed async Python client for the Palqee Prisma oversight intelligence platform.

PyPI version Python versions License Documentation


What is this?

palqee-prisma-client is the low-level HTTP client for Palqee Prisma — the oversight intelligence platform that replaces manual review with automated, regulatory-grade validation across human and AI workflows. Use it to drive Prisma resources directly from Python: projects, runs, datasets, jobs, analytics, and validations.

Most applications should reach for palqee-prisma-ai — the high-level SDK that wires OpenTelemetry and validators into your stack with one call. Pick palqee-prisma-client when you need:

  • Direct platform control — backfill historical data, orchestrate batch validation jobs, build admin tooling.
  • Custom integrations — power BI dashboards, custom UIs, internal compliance tools, or CLI utilities.
  • Async-first ergonomics — httpx-based, fully typed via Pydantic, designed for high-throughput pipelines.

Installation

pip install palqee-prisma-client

Imports as palqee_prisma_client:

from palqee_prisma_client import PrismaClient

Requires Python 3.10+.

Quickstart

import asyncio
import os
from palqee_prisma_client import PrismaClient

async def main():
    async with PrismaClient(
        api_key=os.environ["PALQEE_PRISMA_API_KEY"],
        workspace_id=os.environ["PALQEE_PRISMA_WORKSPACE_ID"],
        base_url=os.environ["PALQEE_PRISMA_BASE_URL"],
    ) as client:
        project = await client.projects.get_or_create("complaints-review")
        run = await client.runs.create(project.id)
        print(f"Created run {run.id} under project {project.id}")

asyncio.run(main())

With env vars set, the constructor collapses to PrismaClient().

Resources

The client exposes one resource per Prisma domain object. Every method is async and returns a typed Pydantic model.

Projects

projects = await client.projects.list()                       # Page[Project]
project  = await client.projects.get(project_id)
project  = await client.projects.update(project_id, name="new-name")
stats    = await client.projects.stats(project_id)            # total_runs, total_traces, ...
await client.projects.delete(project_id)

Runs

runs    = await client.runs.list(project_id, status="completed", limit=50)
run     = await client.runs.get(run_id)
run     = await client.runs.update(run_id, status="completed")
metrics = await client.runs.metrics(run_id)                   # validator scores per run
await client.runs.delete(run_id)

Datasets

datasets = await client.datasets.list(project_id)
dataset  = await client.datasets.create(project_id, name="golden-set", items=[...])
items    = await client.datasets.items(dataset.id)

Jobs

job   = await client.jobs.create(project_id, dataset_id=dataset.id, validators=["correctness"])
job   = await client.jobs.get(job.id)
jobs  = await client.jobs.list(project_id, status="running")

Validations

# Trigger validators on a run
result = await client.evaluations.run(run_id, evaluators=["correctness", "hallucination"])
print(result.status, result.total_evaluated)

# Project-wide validation summary
summary = await client.evaluations.summary(project_id, period="7d")
print(summary.avg_score, summary.scores_by_evaluator)

# List validators configured for a project
validators = await client.evaluations.evaluators(project_id)

Note: the API surface uses client.evaluations.* for backwards compatibility. The platform now describes this domain as validations — both terms refer to the same resource.

Analytics

result = await client.analytics.query(
    dimensions=["model_name"],
    measures=["trace_count", "avg_latency_ms"],
    filters=[{"field": "project_id", "op": "eq", "value": project_id}],
)
overview = await client.analytics.overview(project_id, period="7d")
costs    = await client.analytics.costs(project_id, period="30d")
export   = await client.analytics.export("csv", project_id=project_id)

Pagination

List endpoints return a Page[T]:

page = await client.projects.list(limit=20, offset=0)
print(page.total, page.has_more)
for project in page.items:
    ...

Configuration

Parameter Environment variable Description
api_key PALQEE_PRISMA_API_KEY Prisma API key (pq_prisma_sk_...)
workspace_id PALQEE_PRISMA_WORKSPACE_ID Workspace UUID
base_url PALQEE_PRISMA_BASE_URL Base URL of your Prisma deployment
timeout — Request timeout in seconds (default 30)
max_retries — Retries for transient errors (default 2)

Full reference: docs.palqee.com/docs/overview.

Error handling

All exceptions inherit from PrismaError. Catch the specific class you care about, fall through to the parent:

from palqee_prisma_client import PrismaNotFoundError, PrismaAPIError, PrismaError

try:
    project = await client.projects.get(project_id)
except PrismaNotFoundError:
    ...
except PrismaAPIError as e:
    print(f"API error {e.status_code}: {e.message}")
except PrismaError:
    ...
Exception HTTP status Meaning
PrismaAuthenticationError — Invalid or missing API key (client-side)
PrismaAuthorizationError 401, 403 Server rejected credentials
PrismaNotFoundError 404 Resource does not exist
PrismaConflictError 409 Conflict with existing state
PrismaUnprocessableEntityError 422 Server-side validation failure
PrismaAPIError other Any other HTTP error
PrismaTimeoutError — Request timed out
PrismaNetworkError — Connection or transport failure
PrismaValidationError — Client-side input validation failure

When to use this vs palqee-prisma-ai

Need Reach for
Instrument an app once, ship traces and run validators palqee-prisma-ai
Drive Prisma resources directly (projects, runs, jobs, datasets) palqee-prisma-client (this package)
Both Install both — the SDK uses this client under the hood

License

Apache 2.0 © Palqee Ltd.

Metadata

Release files for palqee-prisma-client 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for palqee-prisma-client 0.4.2
File Size Uploaded Provenance Actions
palqee_prisma_client-0.4.2.tar.gz 43.0 kB With provenance Details for palqee_prisma_client-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for palqee-prisma-client 0.4.2
File Interpreter ABI Platform Actions
palqee_prisma_client-0.4.2-py3-none-any.whl Python 3 none any Details for palqee_prisma_client-0.4.2-py3-none-any.whl

Total release size: 76.3 kB

Release files / palqee_prisma_client-0.4.2.tar.gz

Download URL palqee_prisma_client-0.4.2.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b173daf6375d77c6cabca64915446109d4b170f31cf8d8dcd0907e83943e206b
BLAKE2b-256 checksum
How to use checksums
69e78efabb6ebd2d69eed0355162e209107d18a0c114719e305059e2027fbfd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

Release files / palqee_prisma_client-0.4.2-py3-none-any.whl

Download URL palqee_prisma_client-0.4.2-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
548cd3384246157197f04af9c32f4916636e648076581a736c3f07a5ab046a7e
BLAKE2b-256 checksum
How to use checksums
42ca45dee91a056592a5a6296b0d9933681752f978875ae53bc8536ed74e9658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

Security for palqee-prisma-client 0.4.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for palqee_prisma_client-0.4.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page