Metadata-Version: 2.4
Name: polarity-sdk
Version: 0.3.2
Summary: Polarity SDK (Python). Install alias for polarity-keystone — same package, new name.
Project-URL: Homepage, https://plr.sh
Project-URL: Source, https://github.com/Polarityinc/polarity
Author-email: Polarity <support@polarity.cc>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: polarity-keystone>=0.3.1
Description-Content-Type: text/markdown

# polarity-sdk

Python SDK for [Polarity](https://plr.sh) — 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

```bash
pip install polarity-sdk
```

## Quickstart

```python
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.
