Invoke an admitted Play from Python and recover observation through its
persisted run ID.
Idempotency-Key header and exact-key lookup endpoint.
Python does not author .play.ts files. It calls a saved or Prebuilt Play over
HTTP, receives a durable run ID, and observes that same run until terminal.
Run the maintained Python caller
The repository example isdocs-examples/sdk-v2/http-python/run_prebuilt.py.
Use a checkout containing that file. Replace its illustrative profile URL
before starting provider-backed work. It
reads DEEPLINE_HOST_URL and DEEPLINE_API_KEY from environment variables or
an uncommitted .env.deepline file.
person-email-run.json before polling. Keep that file with
its original workspace authorization. A rerun observes the saved run rather
than submitting another one. To start different work, use a separate working
directory after reviewing the new input.
The local wait lasts at most ten minutes, excluding individual request latency.
A timeout preserves the run file and does not cancel remote work. Completed,
failed, and cancelled outcomes are saved to person-email-result.json.
If the launch response is lost before its run ID is saved, the file records
an uncertain submission. The example stops rather than creating replacement
work. Investigate that submission before clearing the record.
Raw HTTP requires a server-side API key. CLI auth status does not export it
to the current shell. The example reads its configured environment or local
.env.deepline. It does not recover arbitrary global CLI credential storage.
The caller contract
The example performs four deliberate actions:POST /api/v2/plays/runwith a saved or Prebuilt Play name and JSON input.- Persist
run.idfrom the raw HTTP response before waiting. - Poll
GET /api/v2/runs/:runIdand inspectrun.status. Terminal states arecompleted,failed, andcancelled. - Write the final response to JSON before you turn it into a CSV or update a destination.
When to use each caller
Use Call Plays for the CLI, TypeScript, and raw HTTP
entrypoints. Use Runtime API reference for exact
request and response fields.