Simple Python boilerplate with Pixi, Ruff, pre-commit hook and Docker
- pixi installed
brew install pixi - git installed
brew install git - pre-commit installed
brew install pre-commit - optionally docker and docker-compose installed
- Clone the repository
- Navigate to the cloned project directory:
cd python_boilerplate pixi installpre-commit install- Copy the example env file and set your variables:
cp .env_example .env pixi run mainpixi run lintpixi run testdocker-compose up
src/python_boilerplate: The main application codetests/python_boilerplate: The test cases for the projectdata/: Contains the data files you don't want to commit to git..pixi/envs/default/bin/python: Your local python binary for the project
- We have a logger instance you can use
from python_boilerplate.util import logger - We have a config files in
./config/you can use the one accoring to your environment withfrom python_boilerplate.util import config - You can access the data folder from
./data/withfrom python_boilerplate.data import DATA_DIR. - The root of the project can be accessed with
from python_boilerplate.util import ROOT_DIR.
generated with https://github.com/pemukl/python-template