The create-next-app experience for Python — zero-config FastAPI/Django/Flask scaffolding
Project description
snapstack
The create-next-app experience for Python backend projects.
Scaffold a fully wired FastAPI, Django, or Flask project in seconds -- not hours.
Every Python developer knows the drill: new project, 45 minutes of boilerplate. Folder structure, config, Docker, CI, tests, auth -- all wired up by hand, every single time.
JavaScript solved this years ago with create-next-app. Python didn't have an equivalent. Until now.
pip install snapstack
snapstack create my-api
Answer a few prompts. Get a production-ready project. Start coding your actual features.
What You Get
Every generated project includes:
- Working code on first run -- zero manual edits required
- Health check endpoint already wired and tested
- pyproject.toml with hatchling, typed config, and dev extras
- pytest test suite with fixtures and a passing test
- Dockerfile + docker-compose with multi-stage build and health checks
- GitHub Actions CI with lint + test pipeline
- JWT authentication (optional) with login, register, and refresh
- SQLAlchemy 2 / Django ORM with async support and migrations
- .env.example with documented config variables
- .pysnap.json manifest for future
snapstack updateupgrades
Frameworks
FastAPIAsync API with Pydantic v2, SQLAlchemy 2, uvicorn snapstack create my-api \
--framework fastapi \
--db postgresql \
--auth --docker --ci
|
DjangoClassic Django with DRF, SimpleJWT, python-decouple snapstack create my-app \
--framework django \
--db postgresql \
--auth --docker --ci
|
FlaskMinimal Flask with Blueprints, SQLAlchemy 2, factory pattern snapstack create my-service \
--framework flask \
--db sqlite \
--docker --ci
|
Generated Project Structure
my-api/
├── app/
│ ├── api/routes/ # Route handlers
│ ├── core/config.py # Typed settings (.env)
│ ├── core/security.py # JWT auth (optional)
│ ├── db/session.py # Async database session
│ ├── models/ # ORM models
│ ├── schemas/ # Pydantic schemas
│ └── main.py # App entrypoint
├── tests/
│ ├── conftest.py
│ └── test_health.py
├── .github/workflows/ci.yml
├── Dockerfile
├── docker-compose.yml
├── pyproject.toml
├── .env.example
├── .pysnap.json # Manifest for `snapstack update`
└── README.md
Install
# Recommended
uv tool install snapstack
# Or with pip
pip install snapstack
Requires Python 3.11+.
Quick Start
Interactive mode (guided prompts)
snapstack create my-api
Non-interactive mode (CI-friendly)
snapstack create my-api \
--framework fastapi \
--db sqlite \
--no-auth \
--docker \
--ci \
--tests \
--pm uv
Preview before generating
snapstack create my-api
# Shows a file tree preview before writing anything
Add features to existing projects
cd my-existing-project
snapstack add docker # Add Dockerfile + docker-compose
snapstack add ci # Add GitHub Actions workflow
snapstack add auth # Add JWT authentication
snapstack add tests # Add pytest boilerplate
Update infrastructure files
snapstack update # Interactive diff review
snapstack update --dry-run # See changes without applying
snapstack update --accept-all
Community templates
# Browse available templates
snapstack templates list
snapstack templates search "graphql"
Plugin System
Third-party packages can register custom framework templates via Python entry points:
# In a plugin's pyproject.toml
[project.entry-points."pysnap.plugins"]
my-template = "my_package.plugin:register"
Plugins appear automatically in prompts after pip install.
CLI Reference
| Command | Description |
|---|---|
snapstack create <name> |
Scaffold a new project |
snapstack add <component> |
Add docker, ci, auth, or tests to existing project |
snapstack update |
Update infrastructure files from latest templates |
snapstack templates list |
List all available templates |
snapstack templates search <keyword> |
Search community template registry |
snapstack --version |
Show version |
Flags for snapstack create
| Flag | Values | Default |
|---|---|---|
--framework, -f |
fastapi, django, flask |
fastapi |
--db, -d |
sqlite, postgresql, none |
sqlite |
--auth / --no-auth |
--no-auth |
|
--docker / --no-docker |
--docker |
|
--ci / --no-ci |
--ci |
|
--tests / --no-tests |
--tests |
|
--pm |
uv, pip, poetry |
uv |
--output, -o |
path | . |
--no-preview |
show preview | |
--no-validate |
validate after generation |
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
# Development setup
git clone https://github.com/thewizard2030/pysnap.git
cd pysnap
pip install -e ".[dev]"
pytest
License
Project details
Release history Release notifications | RSS feed
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 snapstack-1.0.0.tar.gz.
File metadata
- Download URL: snapstack-1.0.0.tar.gz
- Upload date:
- Size: 86.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26eed761dd4e8c9398de0fa618c9188f37b92ae0802d1429d7caf3c132370177
|
|
| MD5 |
53263f08bd670f52311aebec55026a52
|
|
| BLAKE2b-256 |
e35f07409da9663bad47bd5f417e575da1ccf3e33daaea3d81895039ceed2f77
|
File details
Details for the file snapstack-1.0.0-py3-none-any.whl.
File metadata
- Download URL: snapstack-1.0.0-py3-none-any.whl
- Upload date:
- Size: 60.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cfe1086cd2530c4086bee08c74a5be1ed3229ee390e401e0a1baab8f4634ed7
|
|
| MD5 |
9122734ab7759293eeba0e6732e8f662
|
|
| BLAKE2b-256 |
aa4dcdd4d288f3f80ac2b8b8eb6858d829d7b7183fc1c997819b7420ee658ac3
|