Python SDK for the person.run API
Project description
person-sdk
Python SDK for the person.run API.
Install
pip install person-sdk
With Pydantic models for typed responses:
pip install person-sdk[models]
Quickstart
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",
})
wiki_persona = client.create_wikipedia_persona(
"https://en.wikipedia.org/wiki/Ada_Lovelace",
idempotency_key="wiki-import-ada-lovelace",
)
wiki_job = client.create_wikipedia_persona(
"https://en.wikipedia.org/wiki/Alan_Turing",
mode="async",
response_url="https://example.com/persona-callback",
)
wiki_job_status = client.get_wikipedia_persona_create_job(wiki_job["jobId"])
reply = client.prompt(
persona_id=wiki_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_idto avoid passing tenant on every call- Full coverage: personas, prompting, timeline, populations, and studies
- Zero required dependencies — stdlib only
License
MIT
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
person_sdk-1.0.14.tar.gz
(20.0 kB
view details)
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 person_sdk-1.0.14.tar.gz.
File metadata
- Download URL: person_sdk-1.0.14.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49f6b8b56ee4efbce23d429be23299e9298d6e16f3c6ddb0d71d38578374d1c4
|
|
| MD5 |
fc4507b21ac207e683c5462f2303f738
|
|
| BLAKE2b-256 |
4a26eef9044538b1b5a362e3a45aa8e89e780e42f067ea79b85023ef3d076bdc
|
File details
Details for the file person_sdk-1.0.14-py3-none-any.whl.
File metadata
- Download URL: person_sdk-1.0.14-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd6a9acb23caa0c1ca4fd1a86a1a676f095915ef658f1ad695b673fd74a08b7b
|
|
| MD5 |
aca8f3ad5ce8c147e2a3906927899b0e
|
|
| BLAKE2b-256 |
64dd50e630d7ae6140de2a033a9bb0b72243946ec93ebf288794bbbffe10e2c4
|