Skip to main content

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",
})

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

Project details


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.5.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

person_sdk-1.0.5-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file person_sdk-1.0.5.tar.gz.

File metadata

  • Download URL: person_sdk-1.0.5.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for person_sdk-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ef9904493bef1168f1e7e9beedfdcfad2fb4ad748b37d350d733a948bcd9ccf4
MD5 a1fb2a69753ff7f15014f37b8e1aa511
BLAKE2b-256 abfd0661754f68bee43db10d609f8d631ff4b97fb306fb4496421c0ffd67ac04

See more details on using hashes here.

File details

Details for the file person_sdk-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: person_sdk-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for person_sdk-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 316d4799e59483a6e230058ec978549a69218a3436d80bcf5dbd4dfb21ce67d7
MD5 c49bc1f774dbe08e9568b59485c170b2
BLAKE2b-256 386f103101dbac3f76009c1401e36f5cdd01d00e507f319ef49229d379dd408f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page