rawheel/fastapi-boilerplate
关于
Dockerized FastAPI boiler plate similar to Django code structure with views, serializers(pydantic) and model( Sqlalchemy ORM) with dockerized database(PostgresSQL) and PgAdmin. 🚀
数据与分析实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文🍲 FastAPI Boilerplate
The simplest production ready Django like FastAPI boilerplate 🐍

💎 Features
✅ Production ready with one docker-compose command.
✅ Similar to Django Code Structure.
✅ Local dockerized db.
✅ Dockerized PgAdmin to check the db records.
✅ Migrations, Serializers and ORM configured.
✅ CRUD APIs (Sneaker App).
✅ Token Authentication.
✅ Logging Mechanism.
✅ Testcases TDD with Pytest.
✅ Seperate Database(Sqlite) and mock session configured for test cases.
✅ Poetry dependency management and packaging made easy. (Better than pip)
⚒️ Techologies Used
- Alembic: For Database Migrations.
- SQLAlchemy: For ORM.
- Pydantic: For Typing or Serialization.
- Pytests: For TDD or Unit Testing.
- Poetry: Python dependency management and packaging made easy. (Better than pip)
- Docker & docker-compose : For Virtualization.
- postgresSQL: Database.
- PgAdmin: To interact with the Postgres database sessions.
- Loguru: Easiest logging ever done.
🚀 Up and run in 5 mins 🕙
Make sure you have docker and docker-compose installed docker installation guide
Step 1
create .env file in root folder fastapi-boilerplate/.env
DATABASE_URL=postgresql+psycopg://postgres:password@db:5432/boiler_plate_db
DB_USER=postgres
DB_PASSWORD=password
DB_NAME=boiler_plate_db
[email protected]
PGADMIN_PASSWORD=admin
X_TOKEN=12345678910
Step 2
docker-compose up
🎉 Your Production Ready FastAPI CRUD backend app is up and running on localhost:8000
Swagger docs on
localhost:8000/docs
GET request example

- PgAdmin on
localhost:5050
探索相关项目
加载中…