Skip to main content

fastapi-pilot

The development companion for FastAPI. Not just a starter — a daily driver.

CI Python 3.12+ License: MIT

fastapi-pilot scaffolds production-ready FastAPI projects with a single command. No boilerplate. No copy-pasting from old projects. Just run pilot new and start writing business logic.

Install

pip install fastapi-pilot

Quick Start

pilot new my-api
cd my-api
make run

That's it. You get a running FastAPI app at http://localhost:8000 with auto-docs at /docs.

What You Get

Every generated project includes:

my-api/
├── app/
│   ├── main.py              # FastAPI entry point with lifespan
│   ├── core/
│   │   ├── config.py        # Pydantic v2 settings from .env
│   │   ├── database.py      # Async SQLAlchemy engine & sessions
│   │   ├── security.py      # bcrypt + JWT utilities
│   │   ├── exceptions.py    # Custom exception hierarchy
│   │   └── logging.py       # Structured logging
│   ├── models/              # SQLAlchemy table definitions
│   ├── schemas/             # Pydantic request/response models
│   ├── routes/              # API route handlers
│   ├── services/            # Business logic layer
│   ├── repositories/        # Database query layer
│   ├── dependencies/        # FastAPI Depends() functions
│   ├── middleware/           # Request logging middleware
│   └── utils/               # Utility functions
├── tests/                   # Async pytest + httpx setup
├── migrations/              # Alembic async migrations
├── Makefile                 # Dev shortcuts
├── pyproject.toml
└── .env

Data flow:

Request -> Routes -> Services -> Repositories -> Database
                       |
                    Schemas (validation)

CLI Options

# Interactive mode (default) — prompts for database & package manager
pilot new my-api

# Non-interactive with defaults (postgresql + uv)
pilot new my-api --no-interactive

# Choose database backend
pilot new my-api --db postgresql   # async SQLAlchemy + asyncpg
pilot new my-api --db sqlite       # async SQLAlchemy + aiosqlite
pilot new my-api --db none         # no database layer

# Choose package manager
pilot new my-api --pm uv           # recommended
pilot new my-api --pm pip
pilot new my-api --pm poetry

# Overwrite existing directory
pilot new my-api --force

# Check version
pilot --version

Development Commands

Every generated project comes with a Makefile:

make run          # Start dev server with hot reload
make test         # Run tests
make test-cov     # Run tests with coverage report
make lint         # Lint (ruff) + type check (mypy)
make format       # Auto-format code
make migrate      # Generate and apply database migrations
make db-reset     # Reset database (downgrade + upgrade)
make clean        # Remove caches and build artifacts

Requirements

  • Python 3.12+
  • uv (recommended) or pip/poetry

Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

License

MIT

Metadata

Release files for fastapi-pilot 0.1.0

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

Source distribution (sdist)

Source distribution for fastapi-pilot 0.1.0
File Size Uploaded
fastapi_pilot-0.1.0.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastapi-pilot 0.1.0
File Interpreter ABI Platform
fastapi_pilot-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.0 kB

Release files / fastapi_pilot-0.1.0.tar.gz

Download URL fastapi_pilot-0.1.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce290d139f24cc889ccce5788110fbfb64892994218996d7923240c2010ced17
BLAKE2b-256 checksum
How to use checksums
54fb4d42302c41a27e85fc90b2371b6e5dfe32cb91198f99ca6adf7873d939e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / fastapi_pilot-0.1.0-py3-none-any.whl

Download URL fastapi_pilot-0.1.0-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08625914b6e88b84943b23dfc74ede35f84ea49647da6ae77442bbec831279c5
BLAKE2b-256 checksum
How to use checksums
8750b80843d197df9c029a6546950afeffa0793440814010c03b619bb5cbd26f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

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