Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zelr0x/fasttask
A toy app showing FastAPI + tortoise-orm + docker
https://github.com/zelr0x/fasttask
debugpy docker fastapi python tortoise-orm
Last synced: 28 days ago
JSON representation
A toy app showing FastAPI + tortoise-orm + docker
- Host: GitHub
- URL: https://github.com/zelr0x/fasttask
- Owner: zelr0x
- Created: 2023-09-10T18:22:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-09T05:22:38.000Z (over 1 year ago)
- Last Synced: 2024-11-05T19:56:47.789Z (3 months ago)
- Topics: debugpy, docker, fastapi, python, tortoise-orm
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```shell
docker compose up
```If major change happened (e.g. dependency added), append `--build` flag.
### Manually
For running using .env, while at `fasttask/` run:
```shell
python -m app.main
```For running with uvicorn directly, while at `fasttask/` run:
```shell
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:
```shell
python -m venv venv
```Activate (Windows):
```shell
.\venv\Scripts\activate.bat
```Activate (*nix)
```shell
source ./venv/bin/activate
```### Install dependencies
#### Manually with pip
```shell
pip install debugpy fastapi pydantic-settings "uvicorn[standard]" "tortoise-orm[asyncpg]"
```#### Use requirements.txt
```shell
pip install -r requirements.txt
```### Freeze dependencies
```shell
pip freeze > requirements.txt
```