fastapi-deck
Interactive scaffold generator for FastAPI projects — like create-next-app
but for FastAPI. Run one command, answer a few questions with your arrow keys,
and get a complete, runnable project with .env, requirements.txt, SQL
database wiring, optional auth, services folder, Docker and tests.
Author: Bazil Suhail · PyPI
What you get
A generated project includes:
.env+.env.example,requirements.txt,requirements-dev.txt,.gitignore,README.md- Typed configuration via
pydantic-settings(no rawos.getenv) - Async SQLAlchemy 2.0 database layer + session dependency
- CORS middleware,
/and/healthendpoints - PostgreSQL: Alembic migrations pre-configured · SQLite: zero-setup local dev
- Optional JWT authentication (python-jose + passlib/bcrypt)
- Three templates:
beginner— single-file appstandard— layered (config,database,models,schemas,routers)production— domain-driven (app/core/+app/modules/with models → schemas → services → routers)
Questions the wizard asks
- Project name
- Template — Beginner / Standard / Production
- Database (SQL only for now; MongoDB comes later) — PostgreSQL / SQLite / None
- Optional features (toggle with the space bar):
- JWT authentication
services/business-logic folder- Docker (Dockerfile + docker-compose.yml)
- pytest smoke tests
Navigate menus with Up/Down arrow keys (or W/S), press Enter to select, Space to toggle optional features, and Q to go back.
Requirements
- Python 3.9+ to run the tool
- Python 3.10+ for generated projects (they use modern type syntax)
Install
pip install fastapi-deck
This registers the fastapi-deck command on your system.
Usage
fastapi-deck
or
python -m fastapi_deck
From the main menu choose Create new project, answer the questions, and the project is written into a new folder named after your project. Then:
cd myproject
python -m venv venv
.\venv\Scripts\activate # Windows (PowerShell: .\venv\Scripts\Activate.ps1)
pip install -r requirements.txt
Copy .env.example to .env and adjust values
uvicorn app.main:app --reload
Open http://localhost:8000/docs for the interactive Swagger UI.
CLI options
fastapi-deck --help # help, including author info
fastapi-deck --version # show the version
Guides
- GUIDE.md — full setup & configuration guide for generated projects:
environment,
.env, database setup, migrations, running, auth, adding modules, tests and Docker.
How the tool is built
Modular and extensible so new templates, databases and features drop in easily:
layouts/— project templates (beginner,standard,production)providers/— pluggable database backends (postgres,sqlite,none)features/— gated optional additions (services, docker, tests)ui.py— reusable arrow-key menu components
Adding MongoDB later is just a new providers/mongodb.py plus one registry entry —
layouts and features need no changes.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_deck-0.3.0.tar.gz.
File metadata
- Download URL: fastapi_deck-0.3.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa16d64c1bef285152f326f877c988913cbc282571b337eca30223f0a29d04d9
|
|
| MD5 |
e72c9763cd176481c56b47c6bca523af
|
|
| BLAKE2b-256 |
8d1b85908c457c05bf6a3dfbdd5d47fcab36783957fcffd0aae4b429f154e2b6
|
File details
Details for the file fastapi_deck-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_deck-0.3.0-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f522031b1cd5565e8b7bccfa7e269a2c3088f66a5bc0f4be89e0c5bd8ec1ae0
|
|
| MD5 |
5de6811cb8c7bdd114fe632bfdf9d95b
|
|
| BLAKE2b-256 |
b0eb929b292adbbe3a6792cb0c859608679fb756c826a3877b1ddec8b17ec555
|