FastTask is a toy task tracker app written in FastAPI with Tortoise ORM
To simply run the app, this should be enough:
docker compose upIf major change happened (e.g. dependency added), append --build flag.
For running using .env, while at fasttask/ run:
python -m app.mainFor running with uvicorn directly, while at fasttask/ run:
uvicorn app.main:app --host localhost --port 8080For hot-reloading mode specify --reload.
Tip: absolute imports won't work if we start at the directory that is root package or some directory within it. We must run it at root package's parent.
Create:
python -m venv venvActivate (Windows):
.\venv\Scripts\activate.batActivate (*nix)
source ./venv/bin/activatepip install debugpy fastapi pydantic-settings "uvicorn[standard]" "tortoise-orm[asyncpg]"pip install -r requirements.txtpip freeze > requirements.txt