Prisma AI platform client for validations, datasets, and jobs
Project description
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 |
Links
- Documentation: docs.palqee.com/docs/overview
- High-level SDK:
palqee-prisma-ai - Tracing wrapper:
palqee-prisma-otel - Website: palqee.com
- Support: support@palqee.com
License
Apache 2.0 © Palqee Ltd.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file palqee_prisma_client-0.4.2.tar.gz.
File metadata
- Download URL: palqee_prisma_client-0.4.2.tar.gz
- Upload date:
- Size: 43.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b173daf6375d77c6cabca64915446109d4b170f31cf8d8dcd0907e83943e206b
|
|
| MD5 |
dc89de1d5bb5926436b78c5342037747
|
|
| BLAKE2b-256 |
69e78efabb6ebd2d69eed0355162e209107d18a0c114719e305059e2027fbfd7
|
Provenance
The following attestation bundles were made for palqee_prisma_client-0.4.2.tar.gz:
Publisher:
publish.yml on Palqee/prisma-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
palqee_prisma_client-0.4.2.tar.gz -
Subject digest:
b173daf6375d77c6cabca64915446109d4b170f31cf8d8dcd0907e83943e206b - Sigstore transparency entry: 1631562524
- Sigstore integration time:
-
Permalink:
Palqee/prisma-ai@134bf7e427896988d47c0525bbf56c614afd308a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Palqee
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@134bf7e427896988d47c0525bbf56c614afd308a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file palqee_prisma_client-0.4.2-py3-none-any.whl.
File metadata
- Download URL: palqee_prisma_client-0.4.2-py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
548cd3384246157197f04af9c32f4916636e648076581a736c3f07a5ab046a7e
|
|
| MD5 |
832b7501fa24dc4937840614a075df78
|
|
| BLAKE2b-256 |
42ca45dee91a056592a5a6296b0d9933681752f978875ae53bc8536ed74e9658
|
Provenance
The following attestation bundles were made for palqee_prisma_client-0.4.2-py3-none-any.whl:
Publisher:
publish.yml on Palqee/prisma-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
palqee_prisma_client-0.4.2-py3-none-any.whl -
Subject digest:
548cd3384246157197f04af9c32f4916636e648076581a736c3f07a5ab046a7e - Sigstore transparency entry: 1631562556
- Sigstore integration time:
-
Permalink:
Palqee/prisma-ai@134bf7e427896988d47c0525bbf56c614afd308a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Palqee
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@134bf7e427896988d47c0525bbf56c614afd308a -
Trigger Event:
workflow_dispatch
-
Statement type: