Skip to main content

Yet another modern Python Package (pypi) with emphasis in CI/CD and automation.

Project description

Python Package Generator

Python Package Generator supporting 3 different Project types to scaffold.
Emphasizing on CI/CD, Testing and Automation, implemented on top of Cookiecutter.
GitHub Workflow Status (with event) Read the Docs (version) Codecov OpenSSF Maintainability Codacy Code Climate technical debt Black
Production Version PyPI - Wheel Supported Python versions GitHub GitHub commits since tagged version (branch) GitHub commits since latest release (by SemVer)

Features

  1. Scaffold a modern ready-to-develop Python Package (see Quickstart)

  2. Automatically generate over 24 files, to setup Test Suite, build scripts & CI Pipeline

  3. Python Package Template (source code at src/cookiecutter_python/) implemented as a Cookiecutter

  4. Extensively Tested on various systems, factoring the below:

    1. System’s platform: “Linux”, “MacOS” & “Windows”

    2. System’s Python: 3.7, 3.8, 3.9 & 3.10, 3.11

    See the Test Workflow on the CI server.

Auto Generated Sample Package Biskotaki

Check the Biskotaki Python Package Project, for a taste of the project structure and capabilities this Template can generate!

It it entirely generated using this Python Package Template:

Source Code hosted on Github at https://github.com/boromir674/biskotaki
Python Package hosted on pypi.org at https://pypi.org/project/biskotaki/
CI Pipeline hosted on Github Actions at https://github.com/boromir674/biskotaki/actions

Generated Python Package Features

  1. Test Suite, using pytest, located in tests dir

  2. Parallel Execution of Unit Tests, on multiple cpu’s

  3. Documentation Pages, hosted on readthedocs server, located in docs dir

  4. Automation, using tox, driven by single tox.ini file

    1. Code Coverage measuring

    2. Build Command, using the build python package

    3. Pypi Deploy Command, supporting upload to both pypi.org and test.pypi.org servers

    4. Type Check Command, using mypy

    5. Lint Check and Apply commands, using isort and black

  5. CI Pipeline, running on Github Actions, defined in .github/

    1. Job Matrix, spanning different platform’s and python version’s

      1. Platforms: ubuntu-latest, macos-latest

      2. Python Interpreters: 3.6, 3.7, 3.8, 3.9, 3.10

    2. Parallel Job execution, generated from the matrix, that runs the Test Suite

Quickstart

Installation

pip install --user cookiecutter-python

Usage

Open a console/terminal and run:

generate-python

Now, you should have generated a new Project for a Python Package, based on the Template!

Just ‘enter’ (cd into) the newly created directory, ie cd <my-great-python-package>.

Develop your package’s Source Code (business logic) inside src/my_great_python_package dir :)
Develop your package’s Test Suite (ie unit-tests, integration tests) inside tests dir :-)

Try Running the Test Suite!

tox

Read the Documentation’s Use Cases section for more on how to leverage your generated Python Package features.

License

GitHub

Free/Libre and Open Source Software (FLOSS)

OpenSSF

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

cookiecutter_python-1.8.1.tar.gz (224.5 kB view details)

Uploaded Source

Built Distribution

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

cookiecutter_python-1.8.1-py3-none-any.whl (149.7 kB view details)

Uploaded Python 3

File details

Details for the file cookiecutter_python-1.8.1.tar.gz.

File metadata

  • Download URL: cookiecutter_python-1.8.1.tar.gz
  • Upload date:
  • Size: 224.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/7.0.0 packaging/23.2 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.12

File hashes

Hashes for cookiecutter_python-1.8.1.tar.gz
Algorithm Hash digest
SHA256 e6516c24ba31c904e1552257b28b317e478d98bc05616da1b5df57e65a494331
MD5 4a0bb9579234cf5d20044f0ad0eb8b77
BLAKE2b-256 b3b2968b921253e34492abe251995db758b4f5b30790b6c128e5664d6c6fc091

See more details on using hashes here.

File details

Details for the file cookiecutter_python-1.8.1-py3-none-any.whl.

File metadata

  • Download URL: cookiecutter_python-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 149.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/7.0.0 packaging/23.2 pkginfo/1.9.6 requests/2.31.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.10.12

File hashes

Hashes for cookiecutter_python-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bb67ac03f7f9dd3597e2c10699564a84581efee4271512380c160f535596ca1
MD5 0cf5bc5d8d01cedd496d4158ebfc6aca
BLAKE2b-256 bce6ee67b1653faa68f28c2773bfd270f369091d9554635e71d39e872d8c1b7c

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