Simple API project starter with FastAPI
- Python 3.10 - pre-requisite
- Docker - pre-requisite
- Docker Compose - pre-requisite
- Pipenv
- FastAPI
- Uvicorn
Please pay attention on pre-requisites resources that you must install/configure.
/
: The root path is a redirect to/docs
/docs
: Swagger/redoc
: Redoc/health-check
: Verify sure the application is up/metrics
: Get prometheus metrics data
make local/install
make docker/build
make docker/migrations/generate
make docker/migrations/upgrade
If you want to know more about migrations, please read the alembic) docs.
make local/run
make docker/run
The project will be running at http://localhost:8000/
The entrypoint
of this project is the run.py
file on the root path.
make local/test
make docker/test
make docker/lint
or make local/lint
to lint
make docker/bandit
or make local/bandit
to execute the bandit check
make docker/check-packages
or make local/check-packages
to check for packages vulnerabilities
Helpful commands
Please, check all available commands in the Makefile for more information.
-
If you use the vscode editor we have some examples of launch.json to speed up your tests.
Note: When you run the install command (using docker or locally), a .env file will be created automatically based on env.template