Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 751 Bytes

README.md

File metadata and controls

22 lines (15 loc) · 751 Bytes

README

This is an example of a REST API using AIOHTTP 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.

Getting started

To get started, run the following commands:

# termianl 1
poetry run python run_worker.py
# terminal 2
poetry run python run_workflow.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"}'