Cookiecutter project for a standard Python project. Mirrored to GH https://github.com/titom73/cookiecutter-python-project
Find a file
2024-07-04 15:50:17 +02:00
.github/ISSUE_TEMPLATE feat: cookiecutter python project 2024-05-28 10:15:41 +02:00
hooks fix: Use slugify filter for project name 2024-05-28 13:53:31 +02:00
{{cookiecutter.project_name | slugify}} fix: Upate CI workflow title (#9) 2024-06-24 12:01:34 +02:00
.gitignore feat: cookiecutter python project 2024-05-28 10:15:41 +02:00
.yamllint.yml fix: Add missing YAML Lint configuration (#8) 2024-06-24 12:00:48 +02:00
CONTRIBUTING.md feat: cookiecutter python project 2024-05-28 10:15:41 +02:00
cookiecutter.json fix: Update code with jinja2-time syntax for year (#6) 2024-05-30 11:35:16 +02:00
LICENCE doc: Add missing licence file 2024-05-28 10:29:22 +02:00
README.md doc: Update repository path 2024-07-04 15:50:17 +02:00
requirements.txt fix: Update code with jinja2-time syntax for year (#6) 2024-05-30 11:35:16 +02:00

Python Project template

Overview

Git repository to easily generate structure for a Python 3 project with the following elements:

  • pyproject.toml for python packaging
  • Ruff, Pylint, Mypy configurations
  • tox configurations
  • pre-commit hook configuration (not installed: run pre-commit install)
  • Dockerfile for easy packaging
  • GH actions for standard CI.
  • Drone CI for homelab CI.
  • Devcontainer and VScode settings
  • Licence selection

Getting Started

# Install cookiecutter (if not already installed)
pipx install cookiecutter jinja2-time

# Create your project (custom git server)
cookiecutter git@git.as73.inetsix.net:Templates/cookiecutter-python-project.git

# Create your project (github)
cookiecutter gh:titom73/cookiecutter-python-project.git

Project inputs

This project uses following inputs to build content:

  • author: Author Full Name
  • email: Author Email address,
  • author_github_handle: Git Nickname,
  • git_server: Git server,
  • project_name: Project's name (similar to repository name), it will be used to derive a slug,
  • package_name: default is {{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }},
  • project_description: Project description,
  • version: Initial version of the project,
  • include_github_actions: Activate or not GH Actions,
  • include_drone_ci: Activate or not Drone-CI
  • codecov: Activate or not Codecov,
  • dockerfile: Activate or not Dockerfile,
  • devcontainer: Activate or not Devcontainer,
  • open_source_license: Project's licence type,

Hidden variables

Some variables are automatically built by cookicutter:

  • __year: {% now 'utc', '%Y' %},

Contribution guide

Contributions are welcome. Please refer to the contribution guide

Licence

The project is published under Apache-2.0