Skip to content

Introduction โ€‹

Fastpy is a production-ready FastAPI starter kit that helps you build APIs faster with less boilerplate. It combines the power of FastAPI with battle-tested patterns and a powerful CLI code generator.

What You'll Build

By the end of this guide, you'll have a complete REST API with authentication, database models, and CRUD operations.

What is Fastpy? โ€‹

โšก

FastCLI

30+ code generators for models, controllers, routes, and more

๐Ÿ”

Authentication

JWT with refresh tokens, password reset, email verification

๐Ÿ—ƒ๏ธ

Database Support

PostgreSQL or MySQL with SQLModel ORM

๐Ÿ—๏ธ

Clean Architecture

MVC with service/repository patterns

๐Ÿงช

Testing Setup

pytest with async support and factories

๐Ÿ“ฆ

Built-in Facades

Http, Mail, Cache, Storage, Queue, and more

Who is it for? โ€‹

Fastpy is perfect for developers who:

ProfileNeed
Backend DevelopersSkip boilerplate and focus on business logic
Startup TeamsNeed a production-ready foundation fast
Solo DevelopersWant convention over configuration
API ArchitectsValue clean, maintainable code architecture

Core Principles โ€‹

Convention Over Configuration

Sensible defaults that work out of the box. Override only what you need.

Developer Experience First

Type hints everywhere, excellent IDE support, comprehensive docs, and helpful error messages.

Production Ready

Not just a demo project. Includes everything you need for real-world APIs: auth, rate limiting, logging, testing, and deployment configs.

Quick Example โ€‹

Create a complete API resource in seconds:

bash
fastpy make:resource Post \
  -f title:string:required,max:200 \
  -f body:text:required \
  -f author_id:integer:foreign:users.id \
  -m -p

This single command generates:

GeneratedDescription
ModelSQLModel with fields and validation
ControllerFull CRUD operations
RoutesProtected API endpoints
MigrationDatabase schema changes

Next Steps โ€‹

Released under the MIT License.