Skip to main content

Fast Boiler 🚀

Generate production-ready FastAPI projects with a modern, scalable architecture in seconds.

PyPI version License: MIT


fast-boiler is a command-line tool that scaffolds a complete FastAPI application using the robust Repository → Service → Controller layering pattern. Stop writing boilerplate and start building features.

The generated project is not just a skeleton—it comes with a complete, secure authentication system, a powerful database layer, and self-documenting APIs right out of the box.

Core Features

  • Scalable Architecture: Cleanly separates database logic (Repositories), business logic (Services), and API endpoints (Controllers) for maximum maintainability.
  • Batteries-Included: Scaffolds a complete authentication system with registration, JWT login, and password reset powered by FastAPI Users.
  • OAuth Ready: Optionally include social login (e.g., Google) with a single command.
  • Advanced CRUD: Generated endpoints come with pagination, sorting, and filtering built-in and automatically documented in Swagger UI.
  • Developer-Friendly: An interactive CLI wizard guides you through project setup, and a generate command automates the creation of new resources.
  • Modern Tech Stack: Uses the latest, non-deprecated syntax for FastAPI, Pydantic, SQLAlchemy, and modern Python.

Prerequisites

Before you begin, you need to have Python 3.8+ and pipx installed on your system.

pipx is a tool for installing and running Python CLI applications in isolated environments. It is the recommended way to install tools like this one. If you don't have it, you can install it with:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

(You may need to restart your terminal after running pipx ensurepath.)


📦 Installation

Installing fast-boiler is a one-line command:

pipx install fast-boiler```

To verify the installation, run `fast-boiler --help`.

---

## 🚀 Quickstart: Create Your First Authenticated API

Let's build a new API in under two minutes.

### 1. Initialize a New Project

Run the `init` command. It will launch an interactive wizard to configure your project.

```bash
fast-boiler init

Answer the prompts. For this tutorial, accept the defaults (press Enter for each):

What is the name of your project?: myapi
▶ Use asynchronous (async/await) code? [Y/n]: Y
▶ Include FastAPI Users for authentication? (Recommended) [Y/n]: Y
  ▶ Add social OAuth login (e.g., Google)? [y/N]: N

2. Run the API Server

Navigate into your new project, install its dependencies, and run the server.

# Navigate into the project
cd myapi

# (Recommended) Create and activate a virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the dev server
uvicorn app.main:app --reload```

Your API is now live! Open your browser to **`http://127.0.0.1:8000/docs`**.

### 3. Test The Authentication Flow

Your generated API is fully functional. Let's create a user and log in.

1.  **Register:**
    -   In the docs, expand `POST /auth/register`.
    -   Click "Try it out" and enter your details:
        ```json
        {
          "email": "user@example.com",
          "password": "a-strong-password"
        }
        ```
    -   Execute. You should get a `201 Created` response.

2.  **Login:**
    -   Expand `POST /auth/jwt/login`.
    -   Enter your credentials in the form. **Note:** The `username` field is standard for OAuth2, but `fastapi-users` is smart enough to accept an **email address** here.
    -   Execute. You will get a `200 OK` response. An authentication cookie (`fastboilerauth`) has been set in your browser.

3.  **Access a Protected Endpoint:**
    -   Expand `GET /users/me`.
    -   Execute. It will succeed and return your user object, because the browser automatically sent the authentication cookie!

### 4. Generate a New Resource

Now, let's add a new "product" resource to our API.

```bash
# From the root of your 'myapi' project
fast-boiler generate product

The tool will automatically create all the files for the product resource and integrate its router into your application. When the server reloads, you will see a brand new, fully functional CRUD API for /products in your documentation!


What's Generated? The Architecture

fast-boiler creates a clean, layered architecture to keep your code organized:

  • app/controllers/: Handles HTTP requests, responses, and calls the service layer. Contains a dependencies.py for query parsing.
  • app/services/: Contains all business logic. It's the "brain" of your application.
  • app/repositories/: Contains all database interaction logic using a reusable CRUDBase.
  • app/models/: Defines your SQLAlchemy database models.
  • app/schemas/: Defines your Pydantic data schemas (DTOs).
  • app/auth/: If selected, contains the complete fastapi-users authentication setup.

Roadmap

fast-boiler is actively being developed. Future releases will include optional integrations for:

  • Database Migrations (Alembic)
  • Background Tasks (Celery)
  • Caching (Redis)
  • CI/CD (Docker, GitHub Actions)

Contributing

Contributions, issues, and feature requests are welcome! Please feel free to open an issue or submit a pull request.

Metadata

Release files for fast-boiler 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-boiler 0.1.3
File Size Uploaded
fast_boiler-0.1.3.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fast-boiler 0.1.3
File Interpreter ABI Platform
fast_boiler-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 39.4 kB

Release files / fast_boiler-0.1.3.tar.gz

Download URL fast_boiler-0.1.3.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
455ab871b1579122b5c7e2fad35a820095b58c532a18a9b3ea54d10e18f81e72
BLAKE2b-256 checksum
How to use checksums
fbe32e7e59bdea46eebce721fbd7b5697768f8fbcad1792e362a320dc50da3d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / fast_boiler-0.1.3-py3-none-any.whl

Download URL fast_boiler-0.1.3-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9f32309f5e7f2b488f0dac6a83c92d7b8958265c58e0da1468f0d10e33a1363
BLAKE2b-256 checksum
How to use checksums
cfc8be843651886c7dd4347f0ab3f59b694141e284b462225cafeb65a1a13c01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page