- This source code provides a minimal REST API implementation with FastAPI
- <url>/docs
- installation:
make installinstall all packages from requirements - dev:
make devbuild swagger definitions and starts the server on development mode listening to file changes - testprod:
make testprodrun application in production mode in localhost - lint:
make lintlinter rules with flake8 - test:
make testunit and integration tests - build:
make buildbuild docker image with latest change - prod:
make prodrun docker image in production mode
- authentication
authentication abstraction - config
server settings, DB connection, Logger, etc - controllers
routes configuration - database
setup database connection and register orm models - models
classes representing entities. They are also used to normalize data - schemas
classes that allows fastapi document swagger input/output routes - respositories
data abstraction layers - services
business logic to be used primary by controllers - utils
utilities shared in the application - tests
test setup
- Uvicorn - Lightning-fast ASGI server
- FastApi - Api framework
- SqlAlchemy - Database ORM
- PyTest - Testing Framework library
- MakeFile - Task Runner
- python >= 3.7
- pip >= 3.7
- Makefile
- Use virtualenv to manage dependencies per project. (Virtualenvwrapper is recommended)