{"id":16508878,"url":"https://github.com/goerz/cookiecutter-pypackage","last_synced_at":"2025-10-09T01:13:53.770Z","repository":{"id":54967733,"uuid":"126534312","full_name":"goerz/cookiecutter-pypackage","owner":"goerz","description":"Cookiecutter template for Python 3 packages","archived":false,"fork":false,"pushed_at":"2021-01-19T05:00:27.000Z","size":239,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T01:13:39.600Z","etag":null,"topics":["appveyor","cookiecutter","cookiecutter-pypackage","doctr","documentation-tool","jupyter-notebook","python","sphinx-documentation","travis-ci"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goerz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-23T20:11:44.000Z","updated_at":"2024-11-06T09:43:47.000Z","dependencies_parsed_at":"2022-08-14T07:40:35.173Z","dependency_job_id":null,"html_url":"https://github.com/goerz/cookiecutter-pypackage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goerz/cookiecutter-pypackage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goerz%2Fcookiecutter-pypackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goerz%2Fcookiecutter-pypackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goerz%2Fcookiecutter-pypackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goerz%2Fcookiecutter-pypackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goerz","download_url":"https://codeload.github.com/goerz/cookiecutter-pypackage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goerz%2Fcookiecutter-pypackage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000724,"owners_count":26082894,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["appveyor","cookiecutter","cookiecutter-pypackage","doctr","documentation-tool","jupyter-notebook","python","sphinx-documentation","travis-ci"],"created_at":"2024-10-11T15:48:13.940Z","updated_at":"2025-10-09T01:13:53.727Z","avatar_url":"https://github.com/goerz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"cookiecutter-pypackage\n======================\n\n[![Tests](https://github.com/goerz/cookiecutter-pypackage/workflows/Tests/badge.svg)](https://github.com/goerz/cookiecutter-pypackage/actions?query=workflow%3ATests)\n\nA [cookiecutter][] template for a Python 3 package.\n\n[cookiecutter]: https://github.com/audreyr/cookiecutter\n\n\nFeatures\n--------\n\n\n* Python 3 only.\n* The actual package code is in a `src` directory. See \u003chttps://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure\u003e for the reasoning behind this.\n* Testing with [pytest](https://docs.pytest.org)\n* Use [tox](https://tox.readthedocs.io/) for development tasks and for testing against multiple versions of Python\n* Makefile wrapping around `tox` for convenience on Unix. Run `make help` inside the generated project for details.\n* Keep imports sorted with [`isort`](https://github.com/timothycrosley/isort#readme)\n* [Black code style](https://github.com/ambv/black#readme)\n* Enforce code style with [pre-commit](https://pre-commit.com) git hooks\n* Testing on [Github Actions][]\n* Use [Codecov](http://codecov.io) for coverage tracking\n* Optional Sphinx documentation, built and deployed by [Github Actions][] to [Github Pages][]\n* Optional use of the [better_apidoc](https://github.com/goerz/better-apidoc) tool for generating API documentation with templates.\n* Versions menu in online documentation with [Doctr Versions Menu][]\n* Upload to [PyPI](https://pypi.org) through `make release`\n* Github templates for bug reports\n* Interactive post-setup script for initializing git\n\nThis template does not support hosting the documentation on [ReadTheDocs](https://readthedocs.org) (RTD), despite the immense popularity of that service. I find that RTD has quite a few hoops to jump to get all but the most straightforward documentations to build. On top of that, I find the injections of advertisements into the documentation ([ethical](https://docs.readthedocs.io/en/stable/advertising/ethical-advertising.html) or not) completely unacceptable. Both of these problems are easily solved by hosting the documentation on [Github Pages][], and the \"extra features\" of RTD (the version menu) is supplied by [Doctr Versions Menu][].\n\n[Github Actions]: https://github.com/features/actions\n[Github Pages]: https://pages.github.com\n[Doctr Versions Menu]: https://github.com/goerz/doctr_versions_menu\n\n\nUsage\n-----\n\nFirst, make sure to have `cookiecutter` installed:\n\n    pip install cookiecutter\n\nThen, create a new project with\n\n    cookiecutter gh:goerz/cookiecutter-pypackage\n\nFollow the prompts. You can also pass values for variables on the command line, e.g.\n\n    cookiecutter gh:goerz/cookiecutter-pypackage  --no-input interactive_postsetup=no project_name=\"My Project\"\n\n\nVariables\n---------\n\n* `full_name`: Full author name, will show up in README, in the module, and on PyPI\n* `email` Author email address\n* `github_username` Username (or organization name) on github\n* `project_name`: The name of the package on PyPI, also the name of the folder that will be generated\n* `project_slug`: The name of the repository as it appears in Github URLs\n* `project_short_description`: (Short) description to appear as the doc-string of the module, in the documentation of the console script, in the README, and on PyPI\n* `version`: Initial version of the package\n* `open_source_license`: The license under which the code will be available .\n* `linelength`: The allowed line length of code lines (for `black` formatting). PEP 8 requires 79 characters. This is not a hard limit; code may extend beyond the `linelength` if this increases readability.\n* `on_pypi`: Whether the package will be uploaded to the Python Package Index\n* `sphinx_docs`: Whether the package will use Sphinx to generate its documentation\n* `better_apidoc`: Whether to use \u003chttps://github.com/goerz/better-apidoc\u003e for generating the package API for Sphinx.\n* `support_py36`: Does the package support Python 3.6?\n* `support_py37`: Does the package support Python 3.7?\n* `support_py38`: Does the package support Python 3.8?\n* `support_py39`: Does the package support Python 3.9?\n* `main_python`: The version of Python to use for development tasks like building the documentation\n* `main_branch`: The name of the main development branch\n* `interactive_postsetup`: Whether to run the interactive post-setup script, which will e.g. set up git for the project\n\n\nPost-Setup\n----------\n\nAfter you generate a new project from the cookiecutter template, you should do the following:\n\n*   Declare dependencies in `setup.py`, both for installation and development (testing).  There are no additional [pip requirement files](https://pip.pypa.io/en/stable/user_guide/#requirements-files) (These are for app deployment, not for packages!).\n\n*   If you didn't do so during project creation, initialize git and push the project to Github\n\n*   Create a `gh-pages` branch and push it to Github.\n\n*   If using better-apidoc, review the custom RTD templates in `docs/_templates`.\n\n*   Review the classifiers in `setup.py`. The full list of PyPI classifiers can be found [here](https://pypi.python.org/pypi?:action=list_classifiers).\n\n*   If the package should be registered on PyPI, upload it. You can do this with `make release`.\n\n*   Make sure to tag releases on Github (using a leading `v` in the tag name, e.g. `v0.1.0`)\n\n*   Activate branch protection for the main branch, to prohibit history rewriting.\n\nThe [Wiki][] describes additional best practices.\n\n[Wiki]: https://github.com/goerz/cookiecutter-pypackage/wiki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoerz%2Fcookiecutter-pypackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoerz%2Fcookiecutter-pypackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoerz%2Fcookiecutter-pypackage/lists"}