Official Python SDK for Prism IO - the Brand Identity Operating System for the AI era
Project description
prismio
Official Python SDK for Prism IO - the Brand Identity Operating System for the AI era.
Prism IO is the system of record for brand logic and governance. The platform exposes a stable HTTP API at https://api.prismio.ai/api/v1/ for programmatic access to your Brand Identity Model, capability profile, multi-tenant organization scope, and governance hooks. This SDK is the Python client.
Status
Alpha. The current release (0.1.0a1) covers a focused 15-endpoint subset of the public API surface. Full surface ships in 0.1.0 stable after the 5-BIM validation harness completes.
The SDK targets /api/v1/* exclusively. Legacy /api/ paths are not used; they are scheduled for removal on 2027-05-22 per the public deprecation policy.
Installation
pip install prismioai==0.1.0a1
# or, when stable lands:
pip install prismioai
Note: the distribution name on PyPI is prismioai (the defensive namespace claimed 2026-05-20) but the import name is prismio (cleaner ergonomics in code). This dual-name convention follows python-dotenv / opencv-python and many others:
import prismio # import name
# ...installed via...
# pip install prismioai # distribution name
Python 3.10+. Dependencies: httpx and pydantic (v2).
Authentication
Issue an API key at https://prismio.ai/my-account/api-keys/. Keys begin with pio_.
from prismio import PrismIO
client = PrismIO(api_key="pio_xxxxxxxxxxxxxxxx")
Or via environment variable:
export PRISMIO_API_KEY=pio_xxxxxxxxxxxxxxxx
from prismio import PrismIO
client = PrismIO() # picks up PRISMIO_API_KEY from env
Quickstart
from prismio import PrismIO
client = PrismIO(api_key="pio_...")
# Your tier-gated capabilities
caps = client.capabilities.get()
print(caps.tier_slug) # "enterprise"
print(caps.tier_limits.bim_max_models) # 50
print(caps.features) # {"mcp_server_access": True, ...}
# Your Organization (Phase 2A multi-tenant)
org = client.orgs.me()
print(org.name, org.subscription_tier) # "Acme Corp", "enterprise"
# The Clients (BIOS) you can access within your Organization
clients = client.clients.list()
for c in clients.clients:
print(c.id, c.display_name, c.effective_tier)
Async usage
import asyncio
from prismio import PrismIOAsync
async def main():
async with PrismIOAsync(api_key="pio_...") as client:
org = await client.orgs.me()
print(org.name)
asyncio.run(main())
Error handling
Every error from the API maps to a typed exception:
from prismio import PrismIO
from prismio import (
AuthenticationError, # 401
PermissionError, # 403
NotFoundError, # 404
InvalidRequestError, # 400 / 422
RateLimitError, # 429
GovernanceError, # a governance hook rejected
ServerError, # 5xx
)
client = PrismIO(api_key="pio_...")
try:
client.clients.get("not-a-uuid")
except InvalidRequestError as exc:
print(exc.code, exc.message, exc.request_id)
Each exception carries code, message, param, type, status_code, request_id, and the raw error payload from the canonical error envelope.
Resources covered in 0.1.0a1
| Resource | Methods |
|---|---|
client.capabilities |
.get() |
client.orgs |
.me() |
client.clients |
.list(), .get(client_id) |
client.bim (next session) |
.get(model_id), .check(...), .export(...), .governance(...) |
client.compliance (next session) |
.score(...), .history(...), .drift() |
client.governance (next session) |
.post_validate(...), .parameters_recent() |
client.personas (next session) |
.list(model_id) |
client.health() |
top-level |
Out of scope for 0.1.x (deferred to 0.2): auth (login / refresh), diagnostic session APIs, chat, files, API key management, GDPR endpoints.
License
MIT. See LICENSE.
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 prismioai-0.1.0a1.tar.gz.
File metadata
- Download URL: prismioai-0.1.0a1.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae8b6ab6a54d8cb2fbc9cf1b48acf04a68d13ab00efa64cd639f63410a09cbe
|
|
| MD5 |
75c8f2b030f529a7f72a9ec3833ad60a
|
|
| BLAKE2b-256 |
ea636d4a3bcc21aea6211db8e56c8a500908883b3bf3c98fba16b4d3c1ce6430
|
File details
Details for the file prismioai-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: prismioai-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20407d8cfdd9f3d3a6efb78fcc1aef804f92080de1d20ee2c92ee05603ccdd78
|
|
| MD5 |
b491aae34fc1c06812f18d1928be5b9d
|
|
| BLAKE2b-256 |
394369b829581c3999d7f8a5d823a1508c1dc4419899632d7f47a3fb14142871
|