Polarity SDK (Python). Install alias for polarity-keystone — same package, new name.
Project description
polarity-sdk
Python SDK for Polarity — agent evaluation, sandboxed execution, and LLM observability.
This is the canonical install name. It's a thin alias that pulls in
polarity-keystone, which ships the actual code. Both names refer to
the same package; use whichever feels right.
Install
pip install polarity-sdk
Quickstart
import polarity as plr
from openai import OpenAI
client = plr.wrap(OpenAI())
@plr.traced("workflow")
def run(prompt: str):
return client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": prompt}],
)
run("hello world")
Traces appear at https://app.polarity.so.
Configuration
| Env var | Purpose |
|---|---|
POLARITY_API_KEY |
Required. Get one at https://app.polarity.so |
POLARITY_BASE_URL |
Optional. Defaults to https://api.plr.sh |
Legacy KEYSTONE_* env vars continue to work indefinitely.
More
Full docs at https://docs.polarity.so.
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 polarity_sdk-0.3.2.tar.gz.
File metadata
- Download URL: polarity_sdk-0.3.2.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab02fb93cf151fab8645f5e43f4db99effb9c17aefaf3e0ef2a50b7a1a118bc
|
|
| MD5 |
0ce9fd8cdbc5ad96bec5e1a26705b910
|
|
| BLAKE2b-256 |
af04a51e2acb08253bf005d2a63721b72992652324e9f632ffb64bf2e3bab08b
|
File details
Details for the file polarity_sdk-0.3.2-py3-none-any.whl.
File metadata
- Download URL: polarity_sdk-0.3.2-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0629965c37039b749295efd93660585d262d2c511c3ef71eeafab9221f5871
|
|
| MD5 |
160810efa71460eabe2907fd2ffad4aa
|
|
| BLAKE2b-256 |
683cef33298e934cdcc0507e6b41c8b7e151cf7e0467fc757abaaf1a99b04796
|