Scallpy (beta): Scaffold FastAPI Projects Like Vite β In Seconds
Source: Dev.to
π€― The Productivity Dilemma: Slow or Heavy?
FastAPI is incredibly fast, but its scaffolding ecosystem isnβt always.
If youβre like most, youβve experienced one of these two painful paths when starting a project:
- Manual Route (The slow path) π β Setting up folder structure, testing, initial DB connection, Pydantic, and environment variables consumes hours you should dedicate to business logic.
- Template Route (Bloat) π β Using heavy templates imposes unnecessary complexity and features you wonβt use, leading to bloated code that you end up removing.
The real problem: we need the startup speed of a modern CLI framework, but with the freedom and minimalism of FastAPI.
π‘ The Difference: Interactive, Not Imposing
Hereβs the gameβchanger. Instead of boilerplate that gives you everything, we built Scallpy β a CLI tool that gives you only what you ask for. Itβs interactive, flexible, and keeps things minimal.
| Aspect | Others | Scallpy |
|---|---|---|
| Dependencies | Installs many dependencies you might not need | You decide what to install (only ORM and database options available) |
| Installation | Requires a long installation process | Simple pip install scallpy==0.1.2, then run scallpy create |
| Structure | Fixed structures | Choose between clean or structured project (basic structure) |
π Whatβs Inside? Control Is in Your Hands
The result is a clean structure that respects Python community standards, with a focus on readability.
Clean Project
myproject/
βββ src/
β βββ myproject/
β βββ __init__.py
β βββ main.py
βββ tests/
β βββ test_basic.py
βββ .gitignore
βββ pyproject.toml
βββ README.md
Structured Project
myproject/
βββ src/
β βββ myproject/
β βββ __init__.py
β βββ api/
β β βββ __init__.py
β β βββ routes.py
β βββ core/
β β βββ __init__.py
β β βββ config.py
β βββ main.py
β βββ models/
β βββ __init__.py
βββ tests/
β βββ test_basic.py
βββ .env
βββ .gitignore
βββ pyproject.toml
βββ README.md
βββ requirements.txt
Add --use-db for database support or --use-orm for ORM models. This scales better for larger apps.
π§ Smart Design: The Commented DB
Why is the database code commented out? To keep things flexible. Not every project needs a DB from day one, so the imports and startup event are commented. Uncomment them when youβre ready to add database supportβitβs that simple. This avoids forcing unnecessary dependencies while keeping the template clean and minimal.
β οΈ Beta Status
Scallpy is currently in beta. The tool isnβt fully mature yet, so you might encounter minor bugs or unexpected behavior. If you find any issues, please report them on GitHubβweβll fix them quickly. Your feedback helps us improve and reach a stable release!
π€ Try It and Contribute
Ready to give Scallpy a try? Install it with:
pip install scallpy
and create your first project in seconds:
scallpy create
Give it a star on GitHub if you like it. Contribute by reporting issues, suggesting features, or submitting pull requests.