The project requires Python 3.12 or higher and the Poetry package manager.
The project is a simple currency converter that uses the Exchange Rates API to convert currencies. Each conversion transaction is stored in a SQLite database.
Access the API documentation at /docs
.
After installing poetry, install the project dependencies with:
poetry install --with ci,tests,development
Also, install poetry-plugin-dotenv
to load environment variables from a .env
file:
poetry self add poetry-plugin-dotenv
Please, refer to .env.example
in order to know which environment variables should be defined for the project.
The project is offering pre-commit hooks, please install them via
pre-commit install
Each commit in the main branch will trigger a pipeline which will run unit tests and different linting tools. When successful it will also containerize the application, finally its scans the docker image for vulnerabilities with Trivy.
To run the migrations, use:
poetry run task manage migrate
To run the application in development mode, use:
poetry run task manage runserver
You can, also, run the containerized application:
docker-compose up
To run the tests, use:
poetry run task test