Welcome to fastapi-mvc¶
Project scaffold: https://github.com/fastapi-mvc/copier-project
Example generated project: https://github.com/fastapi-mvc/example
Fastapi-mvc is a developer productivity tool for FastAPI web framework. It is designed to make programming FastAPI applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more. Core features:
Generated project based on MVC architectural pattern
WSGI + ASGI production server
Generated project comes with docstrings and 100% unit tests coverage
Kubernetes deployment with Redis HA cluster
Makefile, GitHub actions and utilities
Helm chart for Kubernetes deployment
Dockerfile with K8s and cloud in mind
Generate pieces of code or even your own generators
Uses Poetry dependency management
Includes set of Nix expressions
Virtualized reproducible development environment using Vagrant
Fastapi-mvc comes with a number of scripts called generators that are designed to make your development life easier by creating everything that’s necessary to start working on a particular task. One of these is the new application generator, which will provide you with the foundation of a fresh FastAPI application so that you don’t have to write it yourself.
Creating a new project is as easy as:
$ fastapi-mvc new /tmp/galactic-empire
This will create a fastapi-mvc project called galactic-empire in a /tmp/galactic-empire directory and install its dependencies using make install.
Once project is generated and installed lets run development uvicorn server (ASGI):
$ cd /tmp/galactic-empire
$ fastapi-mvc run
To confirm it’s actually working:
$ curl 127.0.0.1:8000/api/ready
{"status":"ok"}
Now let’s add new API endpoints. For that we need to generate new controller:
$ fastapi-mvc generate controller death_star status load:post fire:delete
And then test generated controller endpoints:
$ curl 127.0.0.1:8000/api/death_star/status
{"hello":"world"}
$ curl -X POST 127.0.0.1:8000/api/death_star/load
{"hello":"world"}
$ curl -X DELETE 127.0.0.1:8000/api/death_star/fire
{"hello":"world"}
You will also see it in server logs:
INFO: 127.0.0.1:47284 - "GET /api/ready HTTP/1.1" 200 OK
INFO: 127.0.0.1:55648 - "GET /api/death_star/status HTTP/1.1" 200 OK
INFO: 127.0.0.1:55650 - "POST /api/death_star/load HTTP/1.1" 200 OK
INFO: 127.0.0.1:55652 - "DELETE /api/death_star/fire HTTP/1.1" 200 OK
You can get the project directly from PyPI:
pip install fastapi-mvc
Documentation¶
This part of the documentation guides you through all of the features and usage.
API Reference¶
If you are looking for information on a specific function, class, or method, this part of the documentation is for you.
Miscellaneous Pages¶
- Contributing
- License
- Changelog
- 0.29.0 (11.02.2026)
- 0.28.1 (09.07.2023)
- 0.28.0 (27.03.2023)
- 0.27.0 (01.03.2023)
- 0.26.0 (12.02.2023)
- 0.25.0 (07.02.2023)
- 0.24.0 (08.01.2023)
- 0.23.0 (01.01.2023)
- 0.22.0 (15.12.2022)
- 0.21.0 (13.12.2022)
- 0.20.0 (11.11.2022)
- 0.19.0 (09.11.2022)
- 0.18.2 (23.10.2022)
- 0.18.1 (17.10.2022)
- 0.18.0 (10.10.2022)
- 0.17.0 (05.10.2022)
- 0.16.1 (04.10.2022)
- 0.16.0 (18.09.2022)
- 0.15.0 (09.09.2022)
- 0.14.1 (11.08.2022)
- 0.14.0 (31.07.2022)
- 0.13.1 (13.06.2022)
- 0.13.0 (09.06.2022)
- 0.12.0 (10.05.2022)
- 0.11.1 (27.04.2022)
- 0.11.0 (24.04.2022)
- 0.10.0 (07.04.2022)
- 0.9.0 (14.02.2022)
- 0.8.0 (08.02.2022)
- 0.7.0 (31.01.2022)
- 0.6.0 (27.01.2022)
- 0.5.0 (11.01.2022)
- 0.4.0 (10.12.2021)
- 0.3.0 (28.11.2021)
- 0.2.0 (09.11.2021)
- 0.1.0 (27.07.2021)