kieran-ryan / python-package-template

Template repository for Python packages

Home Page:https://kieran-ryan.github.io/python-package-template/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Package Template

Release version License Python version Supported platforms Code style: black Imports: isort Pipeline status

A template repository for creating Python packages.

Features

  • Common repository files:
    • .gitignore with common files to be excluded by git for Python
    • .pre-commit-config.yaml with automated pre-commit validation for Python
    • LICENSE outlining usage rights
    • Makefile standardising commands
    • CODE_OF_CONDUCT.md outlining community practice
    • OWNERS.md outlining owners and roles
    • README.md overview documentation
  • Tool configuration:
  • Examples:
    • Repository tree structure
    • Python module
    • Unit tests

Installation

pysamplelib is available via Test PyPI (via Platform Wheels):

pip install --index-url https://test.pypi.org/simple/ pysamplelib

Examples

Running fizzbuzz against a number:

import pysamplelib

print(pysamplelib.fizzbuzz(5))

Running fizzbuzz against a number range:

import pysamplelib

for number in range(1, 101):
    print(pysamplelib.fizzbuzz(number))

Running fizzbuzz against a number, using a custom keyword mapping:

import pysamplelib

CUSTOM_KEYWORD_MAPPING = {
    7: "Riff",
    9: "Blip",
}

print(pysamplelib.fizzbuzz(7, CUSTOM_KEYWORD_MAPPING))

License

pysamplelib is licensed under the MIT License

About

Template repository for Python packages

https://kieran-ryan.github.io/python-package-template/

License:MIT License


Languages

Language:Python 92.8%Language:Makefile 7.2%