Metadata-Version: 2.4
Name: person-sdk
Version: 1.0.5
Summary: Python SDK for the person.run API
Author: person.run
License-Expression: MIT
Project-URL: Homepage, https://person.run
Project-URL: Documentation, https://person.run/docs
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: models
Requires-Dist: pydantic>=2.0; extra == "models"
Dynamic: license-file

# person-sdk

Python SDK for the [person.run](https://person.run) API.

## Install

```bash
pip install person-sdk
```

With Pydantic models for typed responses:

```bash
pip install person-sdk[models]
```

## Quickstart

```python
from person_sdk import PersonClient

client = PersonClient(
    api_key="your-api-key",
    default_tenant_id="your-tenant-id",
)

persona = client.create_persona(seed={
    "firstName": "Aria",
    "lastName": "Chen",
    "age": 32,
    "location": "San Francisco",
    "baseOccupation": "Product designer",
})

reply = client.prompt(
    persona_id=persona["persona"]["id"],
    user_prompt="How do you approach design challenges?",
)
print(reply["response"])
```

## Features

- Auto-generated Pydantic models from OpenAPI spec (optional)
- Built-in retries with exponential backoff on 429/5xx
- `default_tenant_id` to avoid passing tenant on every call
- Full coverage: personas, prompting, timeline, populations, and studies
- Zero required dependencies — stdlib only

## License

MIT
