Skip to main content

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 raw os.getenv)
  • Async SQLAlchemy 2.0 database layer + session dependency
  • CORS middleware, / and /health endpoints
  • PostgreSQL: Alembic migrations pre-configured · SQLite: zero-setup local dev
  • Optional JWT authentication (python-jose + passlib/bcrypt)
  • Three templates:
    • beginner — single-file app
    • standard — layered (config, database, models, schemas, routers)
    • production — domain-driven (app/core/ + app/modules/ with models → schemas → services → routers)

Questions the wizard asks

  1. Project name
  2. Template — Beginner / Standard / Production
  3. Database (SQL only for now; MongoDB comes later) — PostgreSQL / SQLite / None
  4. 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.

Release files for fastapi-deck 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastapi-deck 0.3.0
File Size Uploaded
fastapi_deck-0.3.0.tar.gz 21.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-deck 0.3.0
File Interpreter ABI Platform
fastapi_deck-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.4 kB

Release files / fastapi_deck-0.3.0.tar.gz

Download URL fastapi_deck-0.3.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fa16d64c1bef285152f326f877c988913cbc282571b337eca30223f0a29d04d9
BLAKE2b-256 checksum
How to use checksums
8d1b85908c457c05bf6a3dfbdd5d47fcab36783957fcffd0aae4b429f154e2b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / fastapi_deck-0.3.0-py3-none-any.whl

Download URL fastapi_deck-0.3.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f522031b1cd5565e8b7bccfa7e269a2c3088f66a5bc0f4be89e0c5bd8ec1ae0
BLAKE2b-256 checksum
How to use checksums
b0eb929b292adbbe3a6792cb0c859608679fb756c826a3877b1ddec8b17ec555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page