{"id":16458254,"url":"https://github.com/boromir674/cookiecutter-python-package","last_synced_at":"2025-03-16T18:31:23.581Z","repository":{"id":37092024,"uuid":"483867987","full_name":"boromir674/cookiecutter-python-package","owner":"boromir674","description":":globe_with_meridians: Scaffold modern Python Package Project, from a configurable Template, delivering public releases to PyPI and Dockerhub and having a CI/CD Pipeline, which supports DevOps processes with best practices.","archived":false,"fork":false,"pushed_at":"2024-03-14T14:31:30.000Z","size":1757,"stargazers_count":9,"open_issues_count":20,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-23T13:18:48.462Z","etag":null,"topics":["automation","ci","cli","cookiecutter","devops","docker","generator","gitops","image","module","plugin","poetry","pytest","sdist","testing","wheel","workflow"],"latest_commit_sha":null,"homepage":"https://python-package-generator.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boromir674.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-21T01:33:49.000Z","updated_at":"2024-02-22T14:44:33.000Z","dependencies_parsed_at":"2024-10-11T10:44:49.621Z","dependency_job_id":"9f9a86a9-b5d1-4eb8-801a-7345c4feffd8","html_url":"https://github.com/boromir674/cookiecutter-python-package","commit_stats":null,"previous_names":[],"tags_count":119,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boromir674%2Fcookiecutter-python-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boromir674%2Fcookiecutter-python-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boromir674%2Fcookiecutter-python-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boromir674%2Fcookiecutter-python-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boromir674","download_url":"https://codeload.github.com/boromir674/cookiecutter-python-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","ci","cli","cookiecutter","devops","docker","generator","gitops","image","module","plugin","poetry","pytest","sdist","testing","wheel","workflow"],"created_at":"2024-10-11T10:44:43.871Z","updated_at":"2025-03-16T18:31:22.068Z","avatar_url":"https://github.com/boromir674.png","language":"Python","readme":"========================\nPython Package Generator\n========================\n\n| |build| |coverage| |docs| |maintainability| |codacy| |tech-debt|\n| |release_version| |wheel| |supported_versions| |commits_since_specific_tag_on_master| |commits_since_latest_github_release|\n| |pypi_stats| |ossf| |ruff| |black| |gh-lic|\n\n|\n| **Generate** Python Project and enjoy **streamlined DevOps** using a powerful **CI/CD Pipeline.**\n|\n| **Documentation** available at https://python-package-generator.readthedocs.io/.\n\n\nWhat's included?\n================\n\n* **Generator** of **Python Project** (see `Quickstart`_), with **CLI** for **Linux**, **MacOS**, and **Windows**\n* **Option** to Generate Python Package designed as `module`, `module+cli`, or `pytest-plugin`!\n* Scaffold over **24 files**, from `Template`_, to have a `ready-to-develop` **Project equipped** with:\n\n  * Fully-featured **CI/CD Pipeline**, running on `Github Actions`_, defined in `.github/`\n  * **Continuous Delivery** to *PyPI* (i.e. `pypi.org`_, `test.pypi.org`_) and *Dockerhub*\n  * **Continuous Integration**, with **Test Suite** running `pytest`_, located in the `tests` dir\n  * **Continuous Documentation**, building with `mkdocs` or `sphinx`, and hosting on `readthedocs`, located in the `docs` dir\n  * **Static Type Checking**, using `mypy`_\n  * **Lint** *Check* and `Apply` commands, using the fast `Ruff`_ linter, along with standard `isort`_, and `black`_\n  * **Build Command**, using the `build`_ python package\n\n\n\nWhat to expect?\n===============\n\nYou can to be up and running with a new Python Package, and run workflows on Github Actions, such as:\n\n.. image is expected to mostly be rendered on github.com, pypi.org, readthedocs.io\n   in any case we care for these pages. Adjust images props (ie width if needed)\n\n.. image:: https://raw.githubusercontent.com/boromir674/cookiecutter-python-package/master/docs/assets/CICD-Pipe.png\n   :alt: CI Pipeline, running on Github Actions, for a Biskotaki Python Package\n   :align: center\n   :width: 100%\n\nLink: https://github.com/boromir674/biskotaki/actions/runs/4157571651\n\n1. **CI Pipeline**, running on `Github Actions`_, defined in `.github/`\n\n   a. **Job Matrix**, spanning different `platform`'s and `python version`'s\n\n      1. Platforms: `ubuntu-latest`, `macos-latest`\n      2. Python Interpreters: `3.7`, `3.8`, `3.9`, `3.10`, `3.11`, `3.12`\n   b. **Parallel Job** execution, generated from the `matrix`, that runs the `Test Suite`\n   c. **Artifact** store of **Source** and **Wheel** Distributions, factoring Platform and Python Version\n\n\nAuto Generated Sample Package **Biskotaki**\n-------------------------------------------\n\nCheck the **Biskotaki** *Python Package Project*, for a taste of the project structure and capabilities this Template can generate!\n\nIt it entirely generated using this **Python Package Template:**\n\n| **Source Code** hosted on *Github* at https://github.com/boromir674/biskotaki\n| **Python Package** hosted on *pypi.org* at https://pypi.org/project/biskotaki/\n| **CI Pipeline** hosted on *Github Actions* at https://github.com/boromir674/biskotaki/actions\n\n\nQuickstart\n==========\n\nTo **install** the latest ``Generator`` in your environment, run:\n\n.. code-block:: shell\n\n    pip install cookiecutter-python\n\nThe ``generate-python`` (executable) CLI should now be available in your environment.\n\nNext, **create** a file, let's call it ``gen-config.yml``, with the following content:\n\n.. code-block:: yaml\n\n    default_context:\n        project_name: Demo Generated Project\n        project_type: module+cli\n        full_name: John Doe\n        email: john.doe@something.org\n        github_username: john-doe\n        project_short_description: 'Demo Generated Project Description'\n        initialize_git_repo: 'no'\n        interpreters: {\"supported-interpreters\": [\"3.8\", \"3.9\", \"3.10\", \"3.11\"]}\n\n\nTo **generate** a Python Package Project, run:\n\n.. code-block:: sh\n\n    mkdir gen-demo-dir\n    cd gen-demo-dir\n    \n    generate-python --config-file ../gen-config.yml --no-input\n\n\nNow, you should have generated a new Project for a Python Package, based on the `Template`_!\n\nThe Project should be located in the newly created ``demo-generated-project`` directory.\n\n\nTo leverage all out-of-the-box development operations (ie scripts), install `tox`_:\n\n.. code-block:: shell\n\n    python3 -m pip install --user 'tox==3.27.1'\n\nTo verify tox available in your environment, run: ``tox --version``\n\n\nPlease, do a `cd` into the newly created directory, ie `cd \u003cmy-great-python-package\u003e`.\n\nTo run the Test Suite, `cd` into the newly created Project folder, and run:\n\n.. code-block:: shell\n\n    tox -e dev\n\nAll Tests should pass, and you should see a `coverage` report!\n\n\nTo run Type Checking against the Source Code, run:\n\n.. code-block:: shell\n\n    tox -e type\n\nAll Type Checks should pass!\n\n\nTo setup a Git Repository, run:\n\n.. code-block:: shell\n\n    git init\n    git add .\n    git checkout -b main\n    git commit -m \"Initial commit\"\n\n\nTo setup a Remote Repository, run for example:\n\n.. code-block:: shell\n\n    git remote add origin \u003cremote-repository-url\u003e\n    git push -u origin main\n\n\nTo trigger the CI/CD Pipeline, run:\n\n.. code-block:: shell\n\n    git push\n\nNavigate to your github.com/username/your-repo/actions page, to see the CI Pipeline running!\n\n| Develop your package's **Source Code** (`business logic`) inside `src/my_great_python_package` dir :)\n| Develop your package's **Test Suite** (ie `unit-tests`, `integration tests`) inside `tests` dir :-)\n\nRead the Documentation's `Use Cases`_ section for more on how to leverage your generated Python Package features.\n\n\nNext Steps\n----------\n\nTo prepare for an Open Source Project Development Lifecycle, you should visit the following websites:\n\n* PyPI, test.pypi.org, Dockerhub, and Read the Docs, for setting up Release and Documentation Pipelines\n* github.com/your-account to configure Actions, through the web UI\n* Codecov, Codacy, and Codeclimate, for setting up Automated Code Quality, with CI Pipelines\n* https://www.bestpractices.dev/ for registering your Project for OpenSSF Best Practices Badge\n\n**Happy Developing!**\n\nLicense\n=======\n\n|gh-lic|\n\n* `GNU Affero General Public License v3.0`_\n\n\nFree/Libre and Open Source Software (FLOSS)\n-------------------------------------------\n\n|ossf|\n\n\n\n\n.. URL LINKS\n\n.. _Cookiecutter documentation: https://cookiecutter.readthedocs.io/en/stable/\n\n.. _CI: https://github.com/boromir674/cookiecutter-python-package/actions\n\n.. _tox: https://tox.wiki/en/latest/\n\n.. _pytest: https://docs.pytest.org/en/7.1.x/\n\n.. _build: https://github.com/pypa/build\n\n.. _pypi.org: https://pypi.org/\n\n.. _test.pypi.org: https://test.pypi.org/\n\n.. _mypy: https://mypy.readthedocs.io/en/stable/\n\n.. _Github Actions: https://github.com/boromir674/cookiecutter-python-package/actions\n\n.. _src/cookiecutter_python/: https://github.com/boromir674/cookiecutter-python-package/tree/master/src/cookiecutter_python\n\n.. _Template: https://github.com/boromir674/cookiecutter-python-package/tree/master/src/cookiecutter_python/%7B%7B%20cookiecutter.project_slug%20%7D%7D\n\n.. _Use Cases: https://python-package-generator.readthedocs.io/en/master/contents/30_usage/index.html#new-python-package-use-cases\n\n.. _GNU Affero General Public License v3.0: https://github.com/boromir674/cookiecutter-python-package/blob/master/LICENSE\n\n.. _Ruff: https://docs.astral.sh/ruff/\n\n.. _isort: https://pycqa.github.io/isort/\n\n.. _black: https://black.readthedocs.io/en/stable/\n\n\n\n.. BADGE ALIASES\n\n.. Build Status\n.. Github Actions: Test Workflow Status for specific branch \u003cbranch\u003e\n\n.. |build| image:: https://img.shields.io/github/actions/workflow/status/boromir674/cookiecutter-python-package/test.yaml?link=https%3A%2F%2Fgithub.com%2Fboromir674%2Fcookiecutter-python-package%2Factions%2Fworkflows%2Ftest.yaml%3Fquery%3Dbranch%253Amaster\n   :alt: GitHub Workflow Status (with event)\n\n.. build target https://github.com/boromir674/cookiecutter-python-package/actions/workflows/test.yaml?query=branch%3Amaster\n\n\n.. Documentation\n\n.. |docs| image:: https://img.shields.io/readthedocs/python-package-generator/master?logo=readthedocs\u0026logoColor=lightblue\n    :alt: Read the Docs (version)\n    :target: https://python-package-generator.readthedocs.io/en/master/\n\n.. Code Coverage\n\n.. |coverage| image:: https://img.shields.io/codecov/c/github/boromir674/cookiecutter-python-package/master?logo=codecov\n    :alt: Codecov\n    :target: https://app.codecov.io/gh/boromir674/cookiecutter-python-package\n\n.. PyPI\n\n.. |release_version| image:: https://img.shields.io/pypi/v/cookiecutter_python\n    :alt: Production Version\n    :target: https://pypi.org/project/cookiecutter-python/\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/cookiecutter-python?color=green\u0026label=wheel\n    :alt: PyPI - Wheel\n    :target: https://pypi.org/project/cookiecutter-python\n\n.. |supported_versions| image:: https://img.shields.io/pypi/pyversions/cookiecutter-python?color=blue\u0026label=python\u0026logo=python\u0026logoColor=%23ccccff\n    :alt: Supported Python versions\n    :target: https://pypi.org/project/cookiecutter-python\n\n.. |pypi_stats| image:: https://img.shields.io/pypi/dm/cookiecutter-python?logo=pypi\u0026logoColor=%23849ED9\u0026color=%23849ED9\u0026link=https%3A%2F%2Fpypi.org%2Fproject%2Fcookiecutter-python%2F\u0026link=https%3A%2F%2Fpypistats.org%2Fpackages%2Fcookiecutter-python\n    :alt: PyPI - Downloads\n    :target: https://pypistats.org/packages/cookiecutter-python\n\n.. Github Releases \u0026 Tags\n\n.. |commits_since_specific_tag_on_master| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v2.4.0/master?color=blue\u0026logo=github\n    :alt: GitHub commits since tagged version (branch)\n    :target: https://github.com/boromir674/cookiecutter-python-package/compare/v2.4.0..master\n\n.. |commits_since_latest_github_release| image:: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue\u0026logo=semver\u0026sort=semver\n    :alt: GitHub commits since latest release (by SemVer)\n\n\n.. LICENSE (eg AGPL, MIT)\n.. Github License\n\n.. |gh-lic| image:: https://img.shields.io/github/license/boromir674/cookiecutter-python-package\n    :alt: GitHub\n    :target: https://github.com/boromir674/cookiecutter-python-package/blob/master/LICENSE\n\n\n.. Free/Libre Open Source Software\n.. Open Source Software Best Practices\n\n.. |ossf| image:: https://bestpractices.coreinfrastructure.org/projects/5988/badge\n    :alt: OpenSSF\n    :target: https://bestpractices.coreinfrastructure.org/en/projects/5988\n\n\n.. CODE QUALITY\n\n.. Codacy\n.. Code Quality, Style, Security\n\n.. |codacy| image:: https://app.codacy.com/project/badge/Grade/5be4a55ff1d34b98b491dc05e030f2d7\n    :alt: Codacy\n    :target: https://app.codacy.com/gh/boromir674/cookiecutter-python-package/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=boromir674/cookiecutter-python-package\u0026amp;utm_campaign=Badge_Grade\n\n\n.. Code Climate CI\n.. Code maintainability \u0026 Technical Debt\n\n.. |maintainability| image:: https://api.codeclimate.com/v1/badges/1d347d7dfaa134fd944e/maintainability\n   :alt: Maintainability\n   :target: https://codeclimate.com/github/boromir674/cookiecutter-python-package/\n\n.. |tech-debt| image:: https://img.shields.io/codeclimate/tech-debt/boromir674/cookiecutter-python-package\n    :alt: Code Climate technical debt\n    :target: https://codeclimate.com/github/boromir674/cookiecutter-python-package/\n\n.. Ruff linter for Fast Python Linting\n\n.. |ruff| image:: https://img.shields.io/badge/code%20style-ruff-000000.svg\n    :alt: Ruff\n    :target: https://docs.astral.sh/ruff/\n\n.. Code Style with Black\n\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :alt: Black\n    :target: https://github.com/psf/black\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboromir674%2Fcookiecutter-python-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboromir674%2Fcookiecutter-python-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboromir674%2Fcookiecutter-python-package/lists"}