Status: Draft v1 Owner: [you] Last updated: July 2026
Python developers starting a new project face two recurring, well-documented sources of friction:
- Framework paralysis for backends. Developers openly describe spending weeks comparing Django vs FastAPI vs Flask before writing a line of business logic, with entire threads dedicated to "which should I learn/use first."
- No guided path for CLI tools. Python has at least five viable CLI frameworks (argparse, Click, Typer, Cyclopts, docopt) with no tool that recommends one based on actual project needs — only static comparison articles.
Existing scaffolding tools solve the file generation problem but not the decision problem:
| Tool | What it does | What it's missing |
|---|---|---|
| PyScaffold | Generates Python packages via flags (--django, --cookiecutter) |
Flag-driven, not question-driven; no recommendation logic; no CLI-tool path |
| fastapi-scaffold | Generates a FastAPI project with auth/DB/Docker | Single framework only; no Django/Flask alternative; no CLI path |
| Copier / Cookiecutter | Template rendering engines | Zero opinions — you must already know which template to use |
| cobra-cli | Scaffolds Go CLIs | Go only, not Python |
The gap: nothing asks "what are you building, who's it for, how will it be used" and recommends a framework/library before scaffolding — the way create-t3-app does for the JS/Next.js ecosystem, backed by visible reasoning rather than a single opinionated stack baked in once.
- Ship a single CLI (
create-python-apporcpa) that scaffolds two distinct kinds of Python projects, chosen via one initial branch:- Backend / API projects
- CLI tool projects
- Replace static "which framework should I use" articles with an interactive, opinionated decision tree.
- Make every recommendation traceable to a reason (not a black box), so users learn why, not just what.
- Generate projects that already follow current best practice for Python tooling (2026 baseline:
uv-managed,ruff-linted, type-checked, tested, CI-ready) so the user starts from a production-grade baseline, not a toy example.
- Not a full low-code app builder — it generates a real, editable codebase, then gets out of the way (same philosophy as
create-t3-app: "once you initialize an app, it's yours"). - Not attempting a hosted/SaaS version yet — v1 is a local, open-source CLI distributed via PyPI.
- Not supporting non-Python target languages.
| User | Scenario |
|---|---|
| Solo/hobby developer | Wants to spin up a side-project API or script fast without researching frameworks |
| Junior/early-career developer | Doesn't yet have the experience to judge Django vs FastAPI vs Flask tradeoffs |
| Freelancer / consultant | Needs to bootstrap a new client project quickly with sane, current defaults |
| Small team lead | Wants consistent scaffolding conventions across multiple internal tools/services |
$ uvx create-python-app
# or
$ pipx run create-python-app
First question, always:
What are you building?
- A backend / API (web service, microservice, data API)
- A CLI tool (script, dev tool, internal utility)
Everything below branches from this.
Decision questions (in order):
-
What's the shape of this project?
- Pure API (no server-rendered pages)
- Full-stack app (templates, admin panel, forms)
- Microservice / internal service
-
Expected scale / context?
- Hobby / learning project
- Small team, real users
- Production, expects real load or ships to customers
-
Do you need real-time or async-heavy workloads? (WebSockets, streaming, high-concurrency I/O)
- Yes / No
-
Do you need an admin panel or content-management out of the box?
- Yes / No
Recommendation logic (encoded, not hardcoded forever — see §6 on keeping this current):
| Answers | Recommendation | Why (shown to user) |
|---|---|---|
| Pure API + async/real-time need | FastAPI | Async-first, automatic OpenAPI docs, best fit for high-concurrency APIs and ML/service endpoints |
| Full-stack + admin panel need | Django | Batteries-included: ORM, auth, admin panel, migrations out of the box — fastest path to a working CRUD app |
| Hobby / quick script-like service, no admin needed | Flask or FastAPI (lite) | Minimal, flexible, low ceremony |
| Microservice, production scale | FastAPI | Async, lightweight, container-friendly, integrates cleanly with other services |
Then branch into supporting choices:
- Database: PostgreSQL (default for anything beyond hobby), SQLite (hobby/local), leave-empty option
- ORM: SQLModel or SQLAlchemy 2.0 (FastAPI path), Django ORM (Django path, automatic)
- Migrations: Alembic (FastAPI path), Django migrations (automatic)
- Auth: JWT via
fastapi-users/Authlib (API-only), Django's built-in auth (full-stack path), or skip - Containerization: Docker +
uv-based Dockerfile (toggle) - CI: GitHub Actions workflow with
uv sync --frozen,ruff check,pytest(toggle)
Decision questions (in order):
-
How complex is the command surface?
- Single command, a few flags
- Multiple subcommands (like
git commit,git push) - Deeply nested command tree
-
Who is this for?
- Just me (local script)
- My team (internal tool)
- Public distribution (other people will install it)
-
Do you want type-hint-driven development, or full manual control?
- Type hints / minimal boilerplate
- Full manual control, zero dependencies
-
How will people run it?
- They already have Python + pip/uv
- They should NOT need Python installed (standalone binary)
Recommendation logic:
| Answers | Recommendation | Why (shown to user) |
|---|---|---|
| Single command, zero deps | argparse | Standard library, zero install, fine for one-off scripts |
| Subcommands, public distribution, polish matters | Click | Mature, nested commands, excellent auto-generated help pages |
| Type hints preferred, modern DX | Typer | Type-hint-driven, minimal boilerplate, best editor support |
| Standalone binary requested | Any of the above + PyInstaller or uv single-file build packaging step |
Solves the "don't make users install Python" distribution problem — the most underserved pain point in this space |
Then branch into supporting choices:
- Packaging:
pyproject.tomlwith[project.scripts]entry point (always) - Distribution target: PyPI package, or standalone binary via PyInstaller
- Testing: Click's
CliRunner/ Typer's test utilities, scaffolded with example tests - Rich output (optional toggle):
richfor tables/progress bars/colored output
- CLI must run via
uvx create-python-appwith zero pre-install step beyond havinguv. - Interactive mode (prompts) by default; non-interactive/CI mode via flags (
--backend fastapi --db postgres --auth jwt --ci) for scripting and reproducibility — mirrorscreate-t3-app's--CIflag pattern. - Every recommendation displayed to the user includes a one-line "why" — no silent black-box decisions.
- Generated projects must be immediately runnable:
- Backend:
uv sync && uv run <start-command>boots the server. - CLI:
uv sync && uv run <tool-name> --helpshows generated help output.
- Backend:
- Generated projects include, by default:
pyproject.toml(PEP 621 compliant,uv-managed)ruffconfig for lint + format- Type checker config (see §6)
pytestwith one working example test.gitignore,README.mdwith setup instructions- GitHub Actions CI workflow (optional toggle, on by default)
- Underlying file generation uses Copier (or Cookiecutter) as the template engine — the product's own code should own only the decision tree and prompt flow, not reinvent templating.
- Must support re-running to add features later (stretch goal, v2) — inspired by Kirimase's "generate into an existing project" model rather than one-shot only.
| Concern | Choice | Why this, now |
|---|---|---|
| Packaging / env / distribution | uv (Astral) |
De facto standard as of 2026 — 10–100x faster than pip, single static binary, no Python required to install it, now backed by OpenAI's acquisition of Astral (announced March 2026) |
| CLI framework (dogfooding) | Typer | Same framework you'd recommend to modern users; type-hint driven, minimal boilerplate |
| Interactive prompts | Questionary | The library Copier itself uses for interactive branching prompts — proven for exactly this use case |
| Templating engine | Copier | Actively maintained, supports conditional files/questions natively, more modern than Cookiecutter for versioned template updates |
| Terminal output | Rich | Tables, progress bars, colored diagnostics for the "why" explanations |
| Linting/formatting | Ruff (Astral) | Already the ecosystem standard; replaced flake8 + black for most new projects |
| Type checking | ty (Astral, beta) or Pyrefly (Meta, stable) | ty is 10–100x faster than mypy/Pyright but still beta with ~15% spec conformance; Pyrefly hit stable 1.0 in May 2026 with ~58% conformance. Recommendation: ship with Pyrefly for reliability today, watch ty for a fast-follow once it stabilizes — don't bet the tool's own CI on beta software. |
| Testing | pytest | Unchanged industry standard |
| CI | GitHub Actions with astral-sh/setup-uv action (caches uv + deps) |
Matches what's scaffolded for generated projects — dogfood the same CI pattern |
| Distribution of the tool itself | PyPI package, runnable via uvx create-python-app |
Zero-install trial, matches how modern Python tools (ruff, ty) are distributed |
- FastAPI path: FastAPI + SQLModel (or SQLAlchemy 2.0 if more control is wanted) + Alembic migrations + Pydantic v2 + Uvicorn, optional
fastapi-usersfor auth - Django path: Django (current LTS) + Django REST Framework if API-only mode is also selected + built-in ORM/admin/auth
- Flask path: Flask + Flask-SQLAlchemy, minimal by design
- All backend paths:
uv-basedDockerfile(multi-stage, copiesuv.lockfor reproducible builds),ruff+ type checker config pre-wired
- Typer or Click or argparse, per the decision tree
[project.scripts]entry point wired inpyproject.toml- Optional Rich integration for polished output
- Optional PyInstaller build step for standalone binaries (solves the distribution pain point directly)
pytest+ framework-appropriate test runner (CliRunner, Typer'sCliRunner, or plainsubprocessfor argparse)
- Speed: scaffold generation should complete in under 5 seconds on a warm cache (in line with the
uv/ruff-era expectation that tooling is instant). - No lock-in: generated code must be fully standard, editable, and have zero runtime dependency on
create-python-appitself after generation — same principlecreate-t3-appstates explicitly ("once you initialize an app, it's yours"). - Transparency: the decision logic (which framework maps to which answers, and why) should live in a human-readable config, not buried in code, so it can be inspected, debated, and updated as the ecosystem shifts.
- Currency: recommendation defaults should be revisited on a regular cadence (quarterly) against real signal — PyPI download stats, GitHub star velocity — rather than left static like a one-time opinion.
V1 (ship first):
- CLI tool path only (smaller surface, more clearly underserved niche than backend scaffolding)
- 3 questions → recommend argparse/Click/Typer → generate with
uv,ruff,pytest, packaging - Non-interactive flag mode for CI use
V2:
- Add backend path (FastAPI/Django/Flask) in full
- Add Docker + CI toggles
- Add "why" explanations sourced from a versioned, editable rationale file
V3 (stretch):
- "Generate into existing project" mode (add a new module/route/command to an already-scaffolded project, Kirimase-style)
- Optional hosted template registry/marketplace layer
- GitHub stars / adoption velocity in first 90 days post-launch
- % of users who use non-interactive/CI flags (signal of repeat/scripted use, not just one-off curiosity)
- Issues/PRs requesting new framework options (signal of engaged usage, same growth pattern
create-t3-appsaw) - Retention proxy: % of generated projects with a subsequent
git commitbeyond the initial scaffold (would require opt-in telemetry — flag as open question)
- Monetization is unclear. Copier/Cookiecutter/PyScaffold are free and mature; this is realistically an open-source community tool first, not a standalone business, unless a hosted registry/marketplace layer is added later.
- Recommendation logic will age. Framework popularity shifts (e.g., Litestar gaining ground as a FastAPI alternative) — the decision tree needs an owner and a review cadence, not a "set once" mentality.
tyvsPyreflyis still shifting. Revisit this choice before v1 ships; the type-checker landscape moved twice in the last six months alone and may move again.- Scope discipline. The biggest failure mode for a tool like this is
create-t3-app's own stated trap — "adding everything." Every optional feature must solve a specific, evidenced problem, not just seem nice to have.