This is an example of a REST API using Quart, HTTPX and Python which implements a simplified form of one-click buying where a purchase is started and then, unless cancelled, will be performed in 10 seconds.
The bases of this repository are from the blog post announcement for the Temporal Python SDK.
To get started, run the following commands:
# termianl 1
poetry run python run_worker.py
# terminal 2
poetry run python app.py
Then you can make requests to the API:
curl -X POST http://localhost:5001/purchase -H "Content-Type: application/json" -d '{"item_id": "item1", "user_id": "user1"}'