Perfect Python Package#

PyPI Status Python Version License

Tests Codecov

GitHub Pages Docs Read the documentation at https://perf-py-pkg.readthedocs.io/

Poetry pre-commit Black imports: isort

Python package template with all the bells and whistles. An adaptation of cookiecutter hypermodern pypackage with some additional features.

Features#

  • Packaging and dependency management with Poetry

  • Test automation with Nox

  • Pre-commit hooks:

    • Linting with Flake8

    • Code formatting with Black and Prettier

    • Import sorting with isort

    • Doc string linting with Darglint

    • Automated Python syntax upgrades with pyupgrade

  • Continuous integration with GitHub Actions

  • Documentation with Sphinx & MyST using the furo theme

  • Automated documentation deployment to Read the Docs and GitHub Pages

  • Automated uploads to PyPI and TestPyPI

  • Automated release notes with Release Drafter

  • Automated dependency updates with Dependabot

  • Testing with pytest

  • Code coverage with Coverage.py

  • Coverage reporting with Codecov

  • Static type-checking with mypy

  • Runtime type-checking with Typeguard

  • Security audit with Bandit and Safety

  • Check documentation examples with xdoctest

  • Generate API documentation with autodoc and napoleon

  • Manage project labels with GitHub Labeler

Requirements#

NOTE: pipx is recommended to install the following tools.

Poetry

$ pipx install poetry

Nox

$ pipx install nox

nox-poetry

$ pipx inject nox nox-poetry

Installation#

You can install Perfect Python Package via pip from PyPI:

$ pip install perf-py-pkg

Usage#

Documentation is available at Read the Docs and GitHub Pages.

Example

from perf_py_pkg import core as c

c.add_one(1)
#> 2

Contributing#

Contributions are very welcome. To learn more, see the Contributor Guide.

Issues#

If you encounter any problems, please file an issue along with a detailed description.