DEV Community

jara505
jara505

Posted on

Scallpy (beta): Scaffold FastAPI Projects Like Vite – In Seconds

🀯 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.
For a clean project, you get a minimal setup:

myproject/
β”œβ”€β”€ src/
β”‚ └── myproject/
β”‚ β”œβ”€β”€ init.py
β”‚ └── main.py
β”œβ”€β”€ tests/
β”‚ └── test_basic.py
β”œβ”€β”€ .gitignore
β”œβ”€β”€ pyproject.toml
└── README.md

For a structured project, you get a modular setup with separate folders for API, core, and models:

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 we comment the imports and startup event. 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. Give it a star on GitHub if you like it. Contribute by reporting issues, suggesting features, or even submitting PRs.

Top comments (0)