flâneur — a map of the web's best reading

Bigger Applications - Multiple Files - FastAPI

fastapi.tiangolo.com · 4,230 words · saved by 1 readers

FastAPI framework, high performance, easy to learn, fast to code, ready for production

Bigger Applications - Multiple Files ¶ If you are building an application or a web API, it's rarely the case that you can put everything in a single file. FastAPI provides a convenience tool to structure your application while keeping all the flexibility. Note If you come from Flask, this would be the equivalent of Flask's Blueprints. An example file structure ¶ Let's say you have a file structure like this: . ├── app │ ├── __init__.py │ ├── main.py │ ├── dependencies.py │ └── routers │ │ ├── __init__.py │ │ ├── items.py │ │ └── users.py │ └── internal │ ├── __init__.py │ └── admin.p

Explore this link on the map →

related reading