Skip to main content

bootpy 🐍

Interactive multi-framework Python scaffolding CLI — scaffold a production-ready FastAPI or Django project in under 60 seconds.

CI Python License: MIT PyPI version


✨ Why bootpy?

Every Python scaffolding tool I found was single-framework — either FastAPI-only or Django-only. bootpy is the first CLI that lets you pick your framework interactively, while generating a fully opinionated, production-ready structure with your exact configuration.

Think create-react-app, but for Python backend projects.


🚀 Quick Start

pip install bootpy-cli
bootpy

Follow the interactive prompts:

🔧 Project Configuration
Enter project name: my-api
Choose Python framework [FastAPI/Django]: FastAPI
Choose database [SQLite/PostgreSQL]: PostgreSQL
Include Docker & Docker Compose setup? [y/n]: y
Include Pytest testing setup? [y/n]: y

⚡ FastAPI Specific Options
Include Async ORM (SQLAlchemy async)? [y/n]: y
Include JWT Authentication boilerplate? [y/n]: y

Generating project in /path/to/my-api...
  ✓ Created app/main.py
  ✓ Created app/core/config.py
  ✓ Created app/core/security.py
  ✓ Created app/db/session.py
  ... (19 files total)

🚀 Project scaffolded successfully!

⚙️ Configuration Options

Universal (all frameworks)

Option Choices Default
Project name Any alphanumeric + -_ my-project
Framework FastAPI, Django FastAPI
Database SQLite, PostgreSQL SQLite
Docker & Docker Compose y/n y
Pytest setup y/n y

FastAPI-specific

Option Choices Default
Async ORM (SQLAlchemy 2.0) y/n y
JWT Authentication y/n y

Django-specific

Option Choices Default
Django Admin panel y/n y
Django REST Framework y/n y

📁 Generated Project Structure

FastAPI (full options)

my-api/
├── app/
│   ├── main.py                    # FastAPI app + startup events
│   ├── api/
│   │   ├── router.py              # Central API router
│   │   └── endpoints/
│   │       ├── auth.py            # JWT login endpoint
│   │       └── users.py           # User CRUD with auth
│   ├── core/
│   │   ├── config.py              # Pydantic settings
│   │   └── security.py            # JWT + bcrypt utilities
│   ├── db/
│   │   ├── session.py             # Async SQLAlchemy engine
│   │   └── base.py                # Declarative Base
│   ├── models/
│   │   └── user.py                # SQLAlchemy User model
│   └── schemas/
│       ├── user.py                # Pydantic User schemas
│       └── token.py               # Token schemas
├── tests/
│   ├── conftest.py                # Pytest fixtures + AsyncClient
│   ├── test_main.py
│   └── test_auth.py
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── README.md
└── .gitignore

Django (full options)

my-django-project/
├── my_django_project/             # Django project package
│   ├── settings.py                # django-environ based settings
│   ├── urls.py                    # Root URL config (admin + API)
│   ├── wsgi.py
│   └── asgi.py
├── core/                          # Core Django app
│   ├── models.py                  # Item model
│   ├── views.py                   # Health check + DRF ViewSet
│   ├── serializers.py             # DRF ModelSerializer
│   ├── urls.py                    # App URL config
│   └── apps.py
├── tests/
│   ├── test_models.py
│   └── test_views.py
├── manage.py
├── pytest.ini
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── .gitignore

🛠️ Tech Stack

Purpose Library
CLI framework Typer
Terminal UI Rich
Template rendering Jinja2
Distribution PyPI

🔧 Development Setup

git clone https://github.com/galanjabal3/bootpy
cd bootpy

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .

# Run tests
pytest

# Run CLI from source
bootpy

🧠 Design Decisions

Why FastAPI + Django as the first two frameworks?

FastAPI and Django represent the most contrasting philosophies in Python backend development:

  • FastAPI: async-first, type-hint driven, OpenAPI auto-generation, minimal structure
  • Django: synchronous ORM, batteries-included, admin panel, opinionated structure

Supporting both frameworks in one CLI requires understanding that their project structures are fundamentally different — not just in syntax but in philosophy. This was intentional: it tells a stronger architecture story than a single-framework tool would.

Flask was skipped for v1 because its minimalism means the scaffold would be nearly identical to a FastAPI base structure with fewer features. It's a natural v2 candidate.

Why Jinja2 for templating instead of string interpolation?

Conditional file generation (e.g., skip session.py if no ORM, skip security.py if no JWT) requires a proper templating engine. Jinja2 allows both conditional blocks within files and conditional inclusion of entire files — which plain string interpolation can't do cleanly.

Why the conditional file-skip logic in generator.py instead of the templates?

Keeping the skip logic in Python (generator.py) rather than spreading guards across every template keeps templates clean and readable, easier to extend, and decoupled from generation logic.


📄 License

MIT — see LICENSE

Metadata

Release files for bootpy-cli 0.2.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 bootpy-cli 0.2.0
File Size Uploaded Provenance Actions
bootpy_cli-0.2.0.tar.gz 26.4 kB Without provenance Details for bootpy_cli-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bootpy-cli 0.2.0
File Interpreter ABI Platform Actions
bootpy_cli-0.2.0-py3-none-any.whl Python 3 none any Details for bootpy_cli-0.2.0-py3-none-any.whl

Total release size: 63.7 kB

Release files / bootpy_cli-0.2.0.tar.gz

Download URL bootpy_cli-0.2.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3a6cd1ed716f9365e0178606a604684a3b888d0af554559beea3233370b01f3a
BLAKE2b-256 checksum
How to use checksums
dcb7601ee7406c62de90ba0cb5abe65182547d20d4a26a53e0bd3462c2508e54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / bootpy_cli-0.2.0-py3-none-any.whl

Download URL bootpy_cli-0.2.0-py3-none-any.whl
Size 37.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10b799ca1b60814af51f9bbe42e3a008965e44bb037b68686fbb9dcdf09dcd73
BLAKE2b-256 checksum
How to use checksums
f8515a980e0c5acc9cd87b1af0ea8fba496d695ee6b4b10db9a72f1a3b070887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for bootpy-cli 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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