This repository provides a template for building applications using the Clean Architecture principles with Python.
- Python
- FastAPI
- SQLAlchemy
- Docker
- pytest
- coverage
git clone https://github.com/javiertelioz/clean-architecture-python.git
Navigate to the project directory:
cd clean-architecture-python
Start the application using Docker Compose:
docker-compose up -d
Once the application is running, you can access the API documentation at http://localhost:8000.
Lint the code using the following command:
docker-compose run --rm web autopep8 --in-place --aggressive --recursive .
Run the tests using the following command:
docker-compose run --rm web pytest
To generate a test coverage report, run the following commands:
docker-compose run --rm web coverage run -m pytest
docker-compose run --rm web coverage report -m
The coverage report will show the percentage of code coverage for the project.
Feel free to customize the code and directory structure to suit your specific needs. Happy coding!