FastAPI Cookiecutter is a badass template for generating production-ready FastAPI projects in minutes. Built for developers who hate boilerplate and love flexibility, it’s packed with:
- 🛠️ Modular Blueprint: Pre-structured for APIs, models, and services.
- 🌍 Database Choices: PostgreSQL or SQLite, you decide.
- ⚡ Optional Boosts: Docker, Redis, CI/CD—pick what you need.
- 🔍 Pro Tools: Health checks, migrations, and tests out of the box.
- ⚡ Instant Start: Zero-to-API faster than you can say "REST".
- 🔧 Total Control: Customize with a few quick prompts.
- 🌐 Scales Hard: From side projects to enterprise beasts.
- 📊 Clean Code: Structure that actually makes sense.
| Feature | Description |
|---|---|
| 🚀 FastAPI Base | Async-powered API goodness. |
| 🌍 DB Options | SQLite or PostgreSQL on tap. |
| ⚡ Redis Power | Add caching with a single "yes". |
| 🐳 Docker Vibes | Containerize it—or don’t. Your call. |
| 🤖 CI/CD Flow | GitHub Actions, optional and awesome. |
- Install Cookiecutter:
pip install cookiecutter
- Generate a Project:
Replace
cookiecutter gh:Mohammad222PR/fastapi-cookiecutters
Mohammad222PRwith your GitHub username. - Customize It: Answer the prompts—name your project, pick a DB, add Docker, whatever you’re feeling.
Boom! Your FastAPI app is ready to roll.
# Basic setup (SQLite, no extras)
cookiecutter gh:Mohammad222PR/fastapi-cookiecutters
# Full power (Postgres, Docker, Redis, CI/CD)
cookiecutter gh:Mohammad222PR/fastapi-cookiecutters --no-input \
project_name="MyAPI" database="postgres" use_redis="yes" use_docker="yes" use_ci_cd="yes"Check the generated README.md for what’s next!
Dig this template? Let’s make it epic!
- Fork it 🍴
- Clone it:
git clone https://github.com/Mohammad222PR/fastapi-cookiecutter.git cd fastapi-cookiecutter pip install -r requirements.txt - Test your changes:
cookiecutter . --no-input - Push & PR:
git checkout -b feature/sick-idea git commit -m "Add sick idea" git push origin feature/sick-idea - Open a Pull Request on GitHub
More details in our Contributing Guide!
FastAPI Cookiecutter rocks the MIT License. Use it, tweak it, share it—just keep it chill and legal.
Pro Tip! 📢
Customize it your way. This is your FastAPI launchpad—make it fly!
Crafted with 🔥 by @Mohammad222PR.