We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.

User GuideSetup

Hatchet Walkthrough

This guide is intended for users who want to explore Hatchet in more depth beyond the quickstart. If you haven’t already set up Hatchet, please see the Hatchet Cloud Quickstart or the Self-Hosting Quickstart first.

Set environment variables

All Hatchet SDKs require the HATCHET_CLIENT_TOKEN environment variable to be set. This token is automatically created when you run a CLI command like hatchet worker dev or hatchet trigger, but if you’re setting up a project manually, you’ll need to set this variable yourself. You can generate an API token from the Hatchet frontend by navigating to the Settings tab and clicking on the API Tokens tab. Click the Generate API Token button to create a new token. Set this environment variable in your project, and do not share it publicly.

export HATCHET_CLIENT_TOKEN="<your-client-token>"

Additionally, if you are a self-hosted user provisioning without TLS enabled, you will need to set the HATCHET_CLIENT_TLS_STRATEGY environment variable to none. If you are on Hatchet Cloud, TLS is enabled by default, so this is not required.

export HATCHET_CLIENT_TLS_STRATEGY=none

Setup your codebase

Clone a Quickstart Project

git clone https://github.com/hatchet-dev/hatchet-python-quickstart.git

CD into the project

cd hatchet-python-quickstart

Install dependencies

Create a virtual environment
Initialize the project and install the Hatchet SDK

Continue to the next section to learn how to create your first task