Feature-rich Python project template designed for robustness and ease of use.
Project description
Welcome to python-template-project
A feature-rich Python project template with with auto-generated CLI, GUI and parameterized configuration.
This template provides a solid foundation for your next Python project, incorporating best practices for testing, automation, and distribution. It streamlines the development process with a comprehensive set of pre-configured tools and workflows, allowing you to focus on writing code.
Feature overview
- Testing: Unit testing setup with
pytest. - CI/CD: GitHub Actions for automated builds (Windows, macOS), unit tests, and code checks.
- Code Formatting and Linting: Pre-commit hook with the RUFF auto-formatter to ensure consistent code style.
- Automated Builds: GitHub pipeline for automatically building a Windows executable and a macOS installer.
- Package Management: Utilizes uv, an extremely fast Python package manager, with dependencies managed in
pyproject.toml. - Parameter-Driven Automation:
- Automatic generation of a configuration file from parameter definitions.
- Automatic generation of a Command-Line Interface (CLI) from the same parameters.
- Automatic generation of CLI API documentation.
- Documentation: Configuration for publishing documentation on Read the Docs using mkdocs .
- Workflow Automation: A
Makefileis included to simplify and automate common development tasks. - Minimalist GUI: Comes with a basic GUI based on tkinker that includes an auto-generated settings menu based on your defined parameters.
- Release pipeline: Automated releases unsing the Makefile
make releasecommand, which creates a new tag and pushes it to the remote repo. Thereleasepipeline will automatically create a new release on GitHub and trigger a release on PyPI.- setuptools is used to package the project and manage dependencies.
- setuptools-scm is used to automatically generate the
_version.pyfile from thepyproject.tomlfile.
Getting started
- Create a new github repository.
- Clone github repository the into your local file system.
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
- Install uv package and project manager
pip install uv
- Generate a sample project with uv
- Add and push the artifacts to your github repository
git push - Copy the content of this repository into your repository
Troubleshooting
Problems with release pipeline
If you get this error below:
/home/runner/work/_temp/xxxx_xxx.sh: line 1: .github/release_message.sh: Permission denied
You have to run these commands in your IDE Terminal or the git bash and then push the changes.
git update-index --chmod=+x ./.github/release_message.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_template_project-0.1.15.tar.gz.
File metadata
- Download URL: python_template_project-0.1.15.tar.gz
- Upload date:
- Size: 183.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3295aef8121b829e26a1ca1a782dc8f8f2aa9d28dc7decc12f23f2ba22d54204
|
|
| MD5 |
d855088b16734fbff658bf5f7a556df3
|
|
| BLAKE2b-256 |
237bfb343f339151c052e18aa9d876f61bba0d6a9f736b1b7adb43ac4f1f8952
|
File details
Details for the file python_template_project-0.1.15-py3-none-any.whl.
File metadata
- Download URL: python_template_project-0.1.15-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2711e5663a583ee22a43761d60aaf18393ac827153239bfb99276bde3878bf2
|
|
| MD5 |
ce021aeeb9f4e5a3cb15f905540aa988
|
|
| BLAKE2b-256 |
053b6a4b5961082a33ae2c838f59f25e7d21d90ea4963984e73c78584fad7171
|