This is the code to support the tutorial at https://learn.temporal.io/getting_started/python/first_program_in_python/
- Python 3.7 or higher
- Docker
- Docker Compose
Create a virtual environment and activate it. On macOS and Linux, run these commands:
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip list -vRun docker installation for the Temporal Server:
docker compose up -dNOTE: to shutdown the Temporal Server, run
docker compose down --volumes --remove-orphans.
Then evaluate if the Temporal Server is running:
curl http://localhost:8080/api/v1/namespaces
curl http://localhost:8080/api/v1/cluster-infoIn an activated Python virtual environment, run the temporal worker:
python -m app.run_workerIn an activated Python virtual environment, run the temporal workflow:
python -m app.run_workflowRun tests:
pytest tests/ -vPlease read the tutorial for more details.