~nora/fastapi-sandbox

FastAPI sandbox
Update requirements
Add settings
Add templates

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~nora/fastapi-sandbox
read/write
git@git.sr.ht:~nora/fastapi-sandbox

You can also use your local clone with git send-email.

#FastAPI Sandbox

This is a sandbox to play with FastAPI framework.

#Building and running

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

#Testing

Execute all tests.

pytest app/tests.py

#Documentation

You can find the API doc locally at http://127.0.0.1:8000/docs.