python3.12 -m venv venv
source venv/bin/activate
pip install -r requirements.txt# Activate environment
source venv/bin/activate
flask runThis should open http://127.0.0.1:5000 api. Test (i.e. in browser):
http://127.0.0.1:5000/test
Handlers in handlers folder are named by the action they handle.
Each handler must contain:
- class named
Model(inherits frompydantic.BaseModel) - with fields this handler expects to see in request body handlefunction with arguments:eventof typeModeldefined for this handlerstoresof typeStores(container for different stores used by the handlers) - dependency injection pattern
Hit the url:
https://hack-yeah-fastapi-mglkv.ondigitalocean.app/
