Skip to content

mauudev/tox_testing_env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI + SQLAlchemy + Asyncio + Tox

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.

Installation

Install dependencies using poetry

poetry shell
poetry install

Usage

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

Running unit tests

Export ENV env var with test value and run the unit tests by:

poetry run pytest -vv

Usin tox

Export ENV env var with test value and run:

tox
# or
tox run -e test -- -v

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published