Update requirements
Move app settings in config.py
Migrate to pydantic 2
This is a sandbox to play with FastAPI framework.
Install dependencies in a virtual environment.
pip install -r requirements.txt
Create configuration file in app/.env
.
DATABASE_URL=postgresql://user:password@localhost/database
Run server (webpages reloaded on change).
uvicorn app.main:app --reload
uvicorn app.main:app --reload --reload-include *.html
Execute all tests.
pytest app/tests.py
You can find the API doc locally at http://127.0.0.1:8000/docs.