β‘ UI Based FastAPI Project Generator
β¨ Define your database models through a UI, select services, and get a complete production-ready containerized project with tests and endpoints!
- π₯οΈ NiceGUI-based interface for project design
- π Visual model creation and configuration
- β Checkbox additional services to be integrated
- π Quick-add common fields
- βοΈ One-click project generation
- ποΈ SQLAlchemy Models
- π¦ Pydantic Schemas
- π RESTful Endpoints (CRUD + more)
- π§ͺ Comprehensive Test Suite (pytest)
- ποΈ DAOs (Database Access Objects)
- π Factory Boy Test Factories
- π³ Docker Compose Setup
- ποΈ Custom Enum support as data types
- π₯ YAML project import/export
- π Convert existing databases into FastAPI projects via connection string!
- Basically lets you quickly create an API for any database.
- βοΈ GitHub Workflows for automated testing and linting
- π§ͺ Runs pytest suite
- β¨ Executes code formatting checks
- β Ensures code quality before merging
| Category | Technologies |
|---|---|
| Messaging | RabbitMQ |
| Caching | Redis |
| Task Queues | Celery, TaskIQ |
| Auth | JWT Authentication |
| Monitoring | Prometheus |
| Storage | S3 |
| Migrations | Alembic |
Much more to come!
- Python 3.12+
- UV
- Docker and Docker Compose (for running the generated project)
Install FastAPI-Forge:
pip install fastapi-forgeStart the project generation process:
fastapi-forge start- A web browser will open automatically.
- Define your database schema and service specifications.
- Once done, click
Generateto build your API.
To start the generated project and its dependencies in Docker:
make up # Builds and runs your project along with additional services- The project will run using Docker Compose, simplifying your development environment.
- Access the SwaggerUI/OpenAPI docs at:
http://localhost:8000/docs.
Customize your project generation with these options:
Quickly spin up a project using one of FastAPI-Forgeβs prebuilt example templates:
fastapi-forge start --use-exampleSkip the web UI and generate your project directly from the terminal:
fastapi-forge start --no-uiLoad a custom YAML configuration (can be generated through the UI):
fastapi-forge start --from-yaml=~/path/to/config.yamlLoad an existing Postgres database schema:
fastapi-forge start --conn-string=postgres://user:pass@localhost/db_nameLoad a YAML config and skip the UI:
fastapi-forge start --from-yaml=~/Documents/project-config.yaml --no-uiThe generated project includes a Makefile to simplify common dev tasks:
make upTests are automatically generated based on your schema. Once the app is running (make up):
make testmake test-filter filter="test_name"Keep your code clean and consistent:
make lintIf you chose Alembic for migrations during project setup, these commands will help manage your database schema:
make mig-gen name="add_users_table"make mig-headmake mig-upmake mig-down
