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.7.tar.gz (18.7 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.7-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: person_sdk-1.0.7.tar.gz
  • Upload date:
  • Size: 18.7 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.7.tar.gz
Algorithm Hash digest
SHA256 17ae8174274501b92980eb321c5342424c2246be52d31dc414aee8ca079dc216
MD5 2c87204071f10e6a2866bf3e7d5a70d5
BLAKE2b-256 9ed9259ec7ff95b8c87995def37d31b33af86e6093b6301bdbce74342332817c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: person_sdk-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 13.9 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b13772998591fdb579372b599a0812e9a14594be43765a42cadd84467d798752
MD5 5bc9b3723143b3e5e2d8e035ac2c9ad9
BLAKE2b-256 10abbe35771345a338c27f76abc1777da70fbce4fe1a722702cb1f29a3e03250

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