Skip to content

A toy app showing FastAPI + tortoise-orm + docker

Notifications You must be signed in to change notification settings

zelr0x/fasttask

Repository files navigation

FastTask

FastTask is a toy task tracker app written in FastAPI with Tortoise ORM

Run

With docker-compose

To simply run the app, this should be enough:

docker compose up

If major change happened (e.g. dependency added), append --build flag.

Manually

For running using .env, while at fasttask/ run:

python -m app.main

For running with uvicorn directly, while at fasttask/ run:

uvicorn app.main:app --host localhost --port 8080

For 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.

Develop

Virtual environment

Create:

python -m venv venv

Activate (Windows):

.\venv\Scripts\activate.bat

Activate (*nix)

source ./venv/bin/activate

Install dependencies

Manually with pip

pip install debugpy fastapi pydantic-settings "uvicorn[standard]" "tortoise-orm[asyncpg]"

Use requirements.txt

pip install -r requirements.txt

Freeze dependencies

pip freeze > requirements.txt

About

A toy app showing FastAPI + tortoise-orm + docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published