- Python >= 3.13
- OS: Ubuntu, MacOS, Windows
There are three easy ways to install the package.
The easiest way to run the project is to use Docker. First, install Docker. Then, run the following command in the project directory.
make docker
If you do not have make
installed, you can run the commands in the Makefile
manually.
Pip installing the package from PyPI is not yet available. Instead, download from this link and unzip. You will also need to change the folder name from template-python-main to template-python (or cd into template-python-main in step 2 below).
If you have git installed, simply run
git clone https://github.com/oedokumaci/template-python
to install the package locally. After downloading, here are the steps to install the dependencies in a virtual environment using PDM:
pip install pdm
cd template-python
pdm install --prod
First edit the ./config/config.yaml
to your liking. Example config files can be found at ./config/
.
After configuring the ./config/config.yaml
, simply run the following command in the project directory.
pdm run python -m template_python
For a list of all the CLI arguments and options, run
pdm run python -m template_python --help
There is a Makefile in the project directory. You can run make help
to see the available commands as below. The Makefile is also used in the CI/CD pipeline.
This project is PDM-managed, which is compatible with PEP 621 (also compatible with the rejected PEP 582). If you are a developer, first pip install pdm
and then git clone
the project. Next you can pdm install
in the project directory, which will install all the dependencies in a virtual environment.
The project also uses pre-commit hooks. Because the project uses PDM, you do not need to pip install pre-commit
. Instead, run directly
pdm run pre-commit install
in the project directory to install hooks to your local .git
. Alternatively, you can also activate the virtual environment and run
pre-commit install