Once cloned, find and replace all instances of python-template
with the new repository name.
Remove below README.md
sections where appropriate (whether this is a project or library),
similarly determine whether the pyproject.toml
or requirements.txt
files are necessary.
Install directly from GitHub, using pip:
pip install git+https://github.com/itsluketwist/python-template
Clone the repository code:
git clone https://github.com/itsluketwist/python-template.git
(for projects...) Once cloned, install the requirements locally in a virtual environment:
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
(for libraries...) Once cloned, install the package locally in a virtual environment:
python -m venv .venv
. .venv/bin/activate
pip install -e ".[dev]"
Install and use pre-commit to ensure code is in a good state (uses ruff):
pre-commit install
pre-commit autoupdate
pre-commit run --all-files
Dependencies are managed with uv, add new packages to requirements.in
, then compile:
uv pip compile requirements.in -o requirements.txt
- Add docs template / support.
Run the test suite using:
pytest .
This is currently how I like to make python projects/libraries, it ain't that deep.