This is a template repository for Python projects that use UV for their dependency management. It is based on standard best practices for modern Python development.
- GitHub repository: https://github.com/vkuehn/python-try/
- Documentation https://vkuehn.github.io/python-try/
Uses standard src-layout:
python-try/
├── src/python_try/ # Package source code
├── tests/ # Test files
└── pyproject.toml
To start a new project using this template:
-
Clone the repository (or download and extract the ZIP):
git clone [https://github.com/vkuehn/python-try.git](https://github.com/vkuehn/python-try.git) my-new-project cd my-new-project -
Install dependencies:
make install
-
Initialize your new project: This command will remove the template's git history, initialize a new git repository, and optionally link it to your new remote origin.
make init-project
-
Rename and Configure:
- Rename the package folder
src/python_tryto your project name. - Update
pyproject.tomlwith your project's name, version, and authors. - Update
mkdocs.ymlwith your project name and repository URL. - Push your first commit:
git push -u origin main
- Rename the package folder
Make sure:
- that GitHub pages is enabled for your repo in
Settings > Pages. - that you give the GITHUB_TOKEN write permission.
Go to
Settings > Actions > General > Workflow Permissionsand select Read and write permissions.
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
- Makefile with handy options during development (
make help) - MkDocs for source code documentation (see
mkdocs.yml) - Pre-commit hooks for code quality (see
.pre-commit-config.yaml) - Ruff for linting and formatting
- Docker with optimized Dockerfile and docker-compose setup
- Scripts folder collecting helper functions
- Pipelines:
on-release-main:- Publishes documentation on GitHub Pages
- Uses
python-semantic-releaseto create new releases automatically
- remove all python_try left overs in code and documentation and config files
- rename complete folder and subfolder
- recreate .venv folder
- Ensure pipelines are stable in all situations
- Refine release scripts
VS Code: Reopen in Container
Docker Compose:
docker-compose up devPodman:
podman run -it --rm -v "$(pwd):/workspaces/python-try:Z" -w /workspaces/python-try mcr.microsoft.com/devcontainers/python:3.14-bookworm bash