Skip to main content

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.

Github CI Status GitHub release Read the Docs License GitHub issues PyPI

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 Makefile is 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 release command, which creates a new tag and pushes it to the remote repo. The release pipeline 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.py file from the pyproject.toml file.

Getting started

  1. Create a new github repository.
  2. Clone github repository the into your local file system.
    git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
    
  3. Install uv package and project manager
    pip install uv
    
  4. Generate a sample project with uv
  5. Add and push the artifacts to your github repository
    git push
    
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_template_project-0.1.15.tar.gz (183.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_template_project-0.1.15-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

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

Hashes for python_template_project-0.1.15.tar.gz
Algorithm Hash digest
SHA256 3295aef8121b829e26a1ca1a782dc8f8f2aa9d28dc7decc12f23f2ba22d54204
MD5 d855088b16734fbff658bf5f7a556df3
BLAKE2b-256 237bfb343f339151c052e18aa9d876f61bba0d6a9f736b1b7adb43ac4f1f8952

See more details on using hashes here.

File details

Details for the file python_template_project-0.1.15-py3-none-any.whl.

File metadata

File hashes

Hashes for python_template_project-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 c2711e5663a583ee22a43761d60aaf18393ac827153239bfb99276bde3878bf2
MD5 ce021aeeb9f4e5a3cb15f905540aa988
BLAKE2b-256 053b6a4b5961082a33ae2c838f59f25e7d21d90ea4963984e73c78584fad7171

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page