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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_deck-0.3.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_deck-0.3.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

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

Hashes for fastapi_deck-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fa16d64c1bef285152f326f877c988913cbc282571b337eca30223f0a29d04d9
MD5 e72c9763cd176481c56b47c6bca523af
BLAKE2b-256 8d1b85908c457c05bf6a3dfbdd5d47fcab36783957fcffd0aae4b429f154e2b6

See more details on using hashes here.

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

Hashes for fastapi_deck-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f522031b1cd5565e8b7bccfa7e269a2c3088f66a5bc0f4be89e0c5bd8ec1ae0
MD5 5de6811cb8c7bdd114fe632bfdf9d95b
BLAKE2b-256 b0eb929b292adbbe3a6792cb0c859608679fb756c826a3877b1ddec8b17ec555

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page