FastAPI Route
Build APIs with files and folders, not decorators. File-based routing for FastAPI.
Everything you need
A complete routing solution with all the features you expect from a modern framework
File-Based Routing
Routes defined by folder structure — no decorators needed
Dynamic Routes
[user_id] folders become {user_id} parameters automatically
Route Groups
(auth) folders organize code without affecting URLs
Hot Reload
Instant rebuild on file changes during development
Production Cache
Pre-compiled routes for lightning-fast startup
Custom Handlers
Bring your own docs.py and not-found.py
Custom Middleware
Intercept requests with middleware.py
Static Files
Drop files in /public — served automatically
How FastAPI Route compares
File-based routing without decorators — a fresh approach to building APIs
| Feature | FastAPI Route | FastAPI | Flask | Django |
|---|---|---|---|---|
| File-Based Routing | ✓ | ✗ | ✗ | Partial |
| No Decorators | ✓ | ✗ | ✗ | ✗ |
| Hot Reload | ✓ | ✓ | ✓ | ✓ |
| Dynamic Routes | ✓ | ✓ | ✓ | ✓ |
| Route Groups | ✓ | ✗ | ✗ | ✗ |
| Production Cache | ✓ | ✗ | ✗ | ✗ |
| Built-in Docs | ✓ | ✓ | ✗ | ✗ |
| CLI Tools | ✓ | Partial | ✓ | ✓ |
Get started in seconds
Create a routes directory, add files, and run — no boilerplate needed
1# Create your first route
2mkdir -p routes/users
3echo 'from fastapi_route import Request
4
5def GET(request: Request):
6 return {"users": ["Alice", "Bob"]}' > routes/users/route.py
7
8# Start the development server
9fastapi-route dev
10
11# Build for production
12fastapi-route build
13fastapi-route runReady to build something great?
FastAPI Route is open source and free to use under the MIT license.