Every new FastAPI project started the same way.
Create folders.
Set up configuration.
Add environment variables.
Configure Alembic.
Copy files from another repository.
Repeat.
It wasn't difficult—it was just repetitive. And after a while, every project looked slightly different because I was copying from different starting points.
So I decided to automate the process.
That's how FastStrapy was born.
The Goal
I wanted a developer experience similar to create-next-app.
Instead of spending the first 20–30 minutes setting up a project, I wanted to run a command, answer a few prompts, and immediately start building the API.
uvx faststrapy create-app
Designing the Architecture
I wanted FastStrapy to be easy to extend as new features and templates are added.
Instead of writing one large generator, I split the project into a few independent pieces.
ProjectConfig
Everything begins with a typed ProjectConfig.
The CLI collects user input once, validates it, and every generator works from that same configuration.
Having a single source of truth makes the generation pipeline predictable and keeps components loosely coupled.
Registry-Based Generators
Rather than maintaining a growing chain of conditionals, generators register themselves.
When FastStrapy runs, it discovers the registered generators and executes them in order.
Adding a new generator doesn't require modifying existing logic, which makes the architecture easier to maintain.
Jinja2 Templates
Instead of constructing files in Python, FastStrapy renders Jinja2 templates.
Templates can include conditional logic, allowing the generated project to adapt based on the selected options while keeping the generation code simple.
Typer CLI
The command-line interface is built with Typer.
Typed prompts and enums help validate input before generation begins, making the CLI easier to use and reducing invalid configurations.
Current Status
FastStrapy is currently v0.1.
There are plenty of features planned, including:
- Better Alembic support
- Post-generation automation
- Docker improvements
- CI/CD templates
- Plugin support
- Additional project templates
Open Source
FastStrapy is MIT licensed and open source.
If you're interested in Python, FastAPI, or developer tooling, I'd really appreciate your feedback.
GitHub:
https://github.com/AnoopGeorge418/faststrapy
PyPI:
https://pypi.org/project/faststrapy/
Whether it's opening an issue, suggesting an idea, or contributing code, every bit of feedback helps shape the project.
Top comments (0)