Python
Python Repo Templating
We have a template for creating Python repositories using the cookiecutter package.
This template provides a standardized structure for Python projects, including:
- Project structure and organization
- Configuration files
- CI/CD pipelines
Usage
Detailed usage instructions are included in the README file of the template repository.
Best practice
uv
Project struture
TODO
Running Code
Always run Python scripts through uv run to ensure reproducible execution with locked dependencies:
Danger
Never use python directly - always prefix with uv run.
Update dependencies
- Add/modify dependencies → Edit
pyproject.toml - Update lock file →
uv lock --upgrade - Sync environment →
uv sync
[TODO] write the best practices for python repos
- linting type checks
- pipelines
- dockerfile
- pieplines/actions/workflows
- test in pipelines
- rennovate file
- nice to have: Makefile
- cursor rules
- ruff.toml
- readme.md * How to fix? * Is it safe to rerun? * How to run locally?