Skip to main content
Job: run a Deepline workflow from a non-TypeScript system. Python does not author .play.ts files. Python calls a saved or prebuilt play over HTTP.

Environment

Put the Deepline host and workspace key in .env.deepline. The example Python script reads that file directly.

Start a run

This is the shape of a small Python caller.

Poll until done

Stop polling when status is completed, failed, or cancelled.

Write the result

For a first script, write the final response to JSON. Convert to CSV only after you know the result shape.
If the response is failed, keep the JSON. It has the run id and error context your teammate or support will ask for.

When to use Python

Use Python when the job already starts in:
  • Airflow
  • a CRM export script
  • a data warehouse task
  • a notebook
  • a backend service that should not shell out
Use TypeScript when you are authoring the play itself.