- This source code provides a minimal REST API implementation with FastAPI
- <url>/docs
- installation:
make install
install all packages from requirements - dev:
make dev
build swagger definitions and starts the server on development mode listening to file changes - testprod:
make testprod
run application in production mode in localhost - lint:
make lint
linter rules with flake8 - test:
make test
unit and integration tests - build:
make build
build docker image with latest change - prod:
make prod
run 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)