Skip to content

fbrcode/temporal-bank-acc-transfer

Repository files navigation

Temporal Money Transfer Python Project Template

This is the code to support the tutorial at https://learn.temporal.io/getting_started/python/first_program_in_python/

Prerequisites

  • Python 3.7 or higher
  • Docker
  • Docker Compose

Initialize Services

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 -v

Run docker installation for the Temporal Server:

docker compose up -d

NOTE: 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-info

Run the Application

In an activated Python virtual environment, run the temporal worker:

python -m app.run_worker

In an activated Python virtual environment, run the temporal workflow:

python -m app.run_workflow

Run Tests

Run tests:

pytest tests/ -v

Documentation

Please read the tutorial for more details.

About

Temporal.io sample project for bank account money transfer

Resources

License

Stars

Watchers

Forks

Languages