Seba Ituarte - This structure will help in the project building using python and fastapi to isolate the dependencies and have a cleaner code
Build server
docker-compose -p python-clean-architecture build
Start server
docker-compose up -d
Stop server
docker-compose down
uvicorn app.main:app --reload
Add a new dependency
poetry add dependency_name / poetry add fastapi
Install all dependencies in pyproject.toml
poetry install
To export dependecies into requirements.txt
poetry export --without-hashes --format=requirements.txt > requirements.txt
To run unit testing
python -m pytest app/tests/
To run unit testing coverage
python -m pytest --cov app/tests/
To run the script using alembic
alembic upgrade head
To modify/add configuration via environment variables, use the .env
file, which contains basic app configuration.