A basic API rest built on FastAPI and SQLAlchemy + asyncio extension to check compatibilities by switching beetween Python versions.
Uses tox
and tox-docker
to create environments with different Python versions and run the unit tests.
Install dependencies using poetry
poetry shell
poetry install
You can start the application manually.
Deploy Postgres by using the packed docker-compose.yaml
file inside infra
folder.
Export the ENV
environment variable with local
value.
Then start the server by:
poetry run python src/api/main.py
Then go to http://localhost:8000/docs
Export ENV
env var with test
value and run the unit tests by:
poetry run pytest -vv
Export ENV
env var with test
value and run:
tox
# or
tox run -e test -- -v