The development companion for FastAPI. Not just a starter — a daily driver.
Project description
fastapi-pilot
The development companion for FastAPI. Not just a starter — a daily driver.
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_pilot-0.1.0.tar.gz.
File metadata
- Download URL: fastapi_pilot-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce290d139f24cc889ccce5788110fbfb64892994218996d7923240c2010ced17
|
|
| MD5 |
2cc068c68a0de5bb03be91575f3f9dbf
|
|
| BLAKE2b-256 |
54fb4d42302c41a27e85fc90b2371b6e5dfe32cb91198f99ca6adf7873d939e9
|
File details
Details for the file fastapi_pilot-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fastapi_pilot-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08625914b6e88b84943b23dfc74ede35f84ea49647da6ae77442bbec831279c5
|
|
| MD5 |
e440e21c057187cb65d9bfa887ef4094
|
|
| BLAKE2b-256 |
8750b80843d197df9c029a6546950afeffa0793440814010c03b619bb5cbd26f
|