Prerequisites
You need a running Hatchet instance and an API token. The fastest way is to sign up on Hatchet Cloud — or run Hatchet locally:Step 1 — Install the SDK
- Python
- TypeScript
- Go
Step 2 — Set your token
Set theHATCHET_CLIENT_TOKEN environment variable to the API token you created:
Step 3 — Define a task
- Python
- TypeScript
- Go
workflows/first_task.py
Step 4 — Start a worker
- Python
- TypeScript
- Go
worker.py
Step 5 — Trigger the task
In a separate terminal (or from your application), trigger the task:- Python
- TypeScript
- Go
run.py
What’s next
Your first task
Deep dive into task options: retries, timeouts, concurrency, and more
DAG workflows
Chain tasks together into multi-step workflows with dependencies
Flow control
Rate limits and per-user concurrency to protect your system
Dashboard
Monitor and debug your tasks in the real-time web UI