mirzadelic/fastapi-starter-project
概要
FastAPI Starter Project with SQLModel and Alembic
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルFastAPI Starter Project
Project includes:
fastapisqlmodelalembic
Models
Check db/models and migrations, there is one example.
Using docker
Setup env variables in app/core/.env using app/core/.env-example
Install and run
docker-compose up -d web
# you can track logs with:
docker-compose logs -f --tail=100 web
Go to: http://localhost:8000/api/docs/
Migrations
Create migrations
docker-compose exec web alembic revision --autogenerate -m "Example model"
Apply migrations
docker-compose exec web alembic upgrade head
Tests
Run tests
docker-compose exec web pytest .
Without docker
Install
cd app/
pip install -r requirements/development.txt
Setup env variables in app/core/.env.
Run
cd app/
python app/server.py
Go to: http://localhost:8000/api/docs/
Migrations
Create migrations
alembic revision --autogenerate -m "Example model"
Apply migrations
alembic upgrade head
Tests
Run tests
pytest .
Environment Variables
To run this project, you will need to add the following environment variables to your app/core/.env file
BASE_URL - default: http://localhost:8000
RELOAD - default: false
DB_HOST - default: localhost
DB_PORT - default: 5432
DB_USER - default: postgres
DB_PASS - default: postgres
DB_BASE - default: db
DB_ECHO - default: false
関連プロジェクトを探す
読み込み中…