cookiecutter-pypackage 0.2.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. cookiecutter_pypackage/__init__.py +3 -0
  2. cookiecutter_pypackage/cli.py +43 -0
  3. cookiecutter_pypackage/template/cookiecutter.json +12 -0
  4. cookiecutter_pypackage/template/hooks/post_gen_project.py +4 -0
  5. cookiecutter_pypackage/template/hooks/pre_gen_project.py +14 -0
  6. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.editorconfig +37 -0
  7. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/ISSUE_TEMPLATE.md +15 -0
  8. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/workflows/publish.yml +16 -0
  9. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/workflows/test.yml +39 -0
  10. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.gitignore +205 -0
  11. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/CODE_OF_CONDUCT.md +89 -0
  12. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/CONTRIBUTING.md +119 -0
  13. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/HISTORY.md +5 -0
  14. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/LICENSE +21 -0
  15. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/MANIFEST.in +10 -0
  16. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/README.md +18 -0
  17. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/index.md +16 -0
  18. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/installation.md +38 -0
  19. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/usage.md +7 -0
  20. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/justfile +86 -0
  21. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/pyproject.toml +58 -0
  22. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/__init__.py +4 -0
  23. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/__main__.py +4 -0
  24. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/cli.py +22 -0
  25. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/utils.py +2 -0
  26. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py +1 -0
  27. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/tests/__init__.py +1 -0
  28. cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/tests/test_{{cookiecutter.project_slug}}.py +22 -0
  29. cookiecutter_pypackage-0.3.1.dist-info/METADATA +114 -0
  30. cookiecutter_pypackage-0.3.1.dist-info/RECORD +33 -0
  31. {cookiecutter_pypackage-0.2.0.dist-info → cookiecutter_pypackage-0.3.1.dist-info}/WHEEL +1 -2
  32. cookiecutter_pypackage-0.3.1.dist-info/entry_points.txt +2 -0
  33. cookiecutter_pypackage-0.3.1.dist-info/licenses/LICENSE +21 -0
  34. cookiecutter_pypackage-0.2.0.dist-info/METADATA +0 -33
  35. cookiecutter_pypackage-0.2.0.dist-info/RECORD +0 -7
  36. cookiecutter_pypackage-0.2.0.dist-info/licenses/LICENSE +0 -27
  37. cookiecutter_pypackage-0.2.0.dist-info/top_level.txt +0 -1
  38. hooks/post_gen_project.py +0 -12
  39. hooks/pre_gen_project.py +0 -13
@@ -0,0 +1,3 @@
1
+ """Cookiecutter PyPackage - A modern Python package template."""
2
+
3
+ __version__ = "0.3.1"
@@ -0,0 +1,43 @@
1
+ """CLI for cookiecutter-pypackage.
2
+
3
+ Usage:
4
+ uvx cookiecutter-pypackage
5
+ uvx cookiecutter-pypackage --no-input
6
+ uvx cookiecutter-pypackage -o /path/to/output
7
+ """
8
+
9
+ from pathlib import Path
10
+ from typing import Optional
11
+
12
+ import typer
13
+ from cookiecutter.main import cookiecutter
14
+
15
+ app = typer.Typer(
16
+ help="Generate a Python package from the cookiecutter-pypackage template.",
17
+ add_completion=False,
18
+ )
19
+
20
+
21
+ @app.command()
22
+ def main(
23
+ output_dir: Optional[Path] = typer.Option(
24
+ None, "--output-dir", "-o", help="Where to output the generated project"
25
+ ),
26
+ no_input: bool = typer.Option(
27
+ False, "--no-input", help="Do not prompt for parameters, use defaults"
28
+ ),
29
+ ) -> None:
30
+ """Generate a new Python package from the cookiecutter-pypackage template."""
31
+ # Template is bundled inside the package
32
+ template_dir = Path(__file__).parent / "template"
33
+
34
+ # Run cookiecutter with the bundled template
35
+ cookiecutter(
36
+ str(template_dir),
37
+ output_dir=str(output_dir) if output_dir else ".",
38
+ no_input=no_input,
39
+ )
40
+
41
+
42
+ if __name__ == "__main__":
43
+ app()
@@ -0,0 +1,12 @@
1
+ {
2
+ "full_name": "Audrey M. Roy Greenfeld",
3
+ "email": "audreyfeldroy@example.com",
4
+ "github_username": "audreyfeldroy",
5
+ "pypi_package_name": "python-boilerplate",
6
+ "project_name": "Python Boilerplate",
7
+ "project_slug": "{{ cookiecutter.pypi_package_name.replace('-', '_') }}",
8
+ "project_short_description": "Python Boilerplate contains all the boilerplate you need to create a Python package.",
9
+ "pypi_username": "{{ cookiecutter.github_username }}",
10
+ "first_version": "0.1.0",
11
+ "__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
12
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env python
2
+
3
+ if __name__ == "__main__":
4
+ print("Your Python package project has been created successfully!")
@@ -0,0 +1,14 @@
1
+ import re
2
+ import sys
3
+
4
+ MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$"
5
+
6
+ module_name = "{{ cookiecutter.project_slug}}"
7
+
8
+ if not re.match(MODULE_REGEX, module_name):
9
+ print(
10
+ "ERROR: The project slug (%s) is not a valid Python module name. "
11
+ "Please do not use a - and use _ instead" % module_name
12
+ )
13
+ # Exit to cancel project
14
+ sys.exit(1)
@@ -0,0 +1,37 @@
1
+ # https://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ end_of_line = lf
7
+ indent_style = space
8
+ indent_size = 4
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
11
+
12
+ [*.{html,css,js,json,sh,yml,yaml}]
13
+ indent_size = 2
14
+
15
+ [*.bat]
16
+ indent_style = tab
17
+ end_of_line = crlf
18
+
19
+ [LICENSE]
20
+ insert_final_newline = false
21
+
22
+ [Makefile]
23
+ indent_style = tab
24
+ indent_size = unset
25
+
26
+ # Ignore binary or generated files
27
+ [*.{png,jpg,gif,ico,woff,woff2,ttf,eot,svg,pdf}]
28
+ charset = unset
29
+ end_of_line = unset
30
+ indent_style = unset
31
+ indent_size = unset
32
+ trim_trailing_whitespace = unset
33
+ insert_final_newline = unset
34
+ max_line_length = unset
35
+
36
+ [*.{diff,patch}]
37
+ trim_trailing_whitespace = false
@@ -0,0 +1,15 @@
1
+ * {{ cookiecutter.project_name }} version:
2
+ * Python version:
3
+ * Operating System:
4
+
5
+ ### Description
6
+
7
+ Describe what you were trying to get done.
8
+ Tell us what happened, what went wrong, and what you expected to happen.
9
+
10
+ ### What I Did
11
+
12
+ ```
13
+ Paste the command(s) you ran and the output.
14
+ If there was a crash, please include the traceback here.
15
+ ```
@@ -0,0 +1,16 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: ['v*']
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write # Required for Trusted Publishers
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: astral-sh/setup-uv@v5
15
+ - run: uv build
16
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,39 @@
1
+ # This workflow will install Python dependencies, run tests and lint.
2
+ # For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python
3
+
4
+ name: Test Python application
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main", "master" ]
9
+ pull_request:
10
+ branches: [ "main", "master" ]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build:
17
+ strategy:
18
+ matrix:
19
+ # Test all supported Python versions under Ubuntu
20
+ os: [ubuntu-latest]
21
+ python-version: ['3.12', '3.13', '3.14']
22
+
23
+ runs-on: {% raw %}${{ matrix.os }}{% endraw %}
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up uv
28
+ uses: astral-sh/setup-uv@v5
29
+ with:
30
+ python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
31
+ - name: Lint with ruff
32
+ run: |
33
+ # stop the build if there are Python syntax errors or undefined names
34
+ uv run ruff check --select=E9,F63,F7,F82
35
+ # exit-zero treats all errors as warnings
36
+ uv run ruff check --exit-zero --statistics
37
+ - name: Run tests
38
+ run: |
39
+ uv run pytest
@@ -0,0 +1,205 @@
1
+ # From https://github.com/github/gitignore/blob/main/Python.gitignore 2025-07-30
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[codz]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py.cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # UV
100
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ #uv.lock
104
+
105
+ # poetry
106
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
107
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
108
+ # commonly ignored for libraries.
109
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
110
+ #poetry.lock
111
+ #poetry.toml
112
+
113
+ # pdm
114
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
116
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
117
+ #pdm.lock
118
+ #pdm.toml
119
+ .pdm-python
120
+ .pdm-build/
121
+
122
+ # pixi
123
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
124
+ #pixi.lock
125
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
126
+ # in the .venv directory. It is recommended not to include this directory in version control.
127
+ .pixi
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule
134
+ celerybeat.pid
135
+
136
+ # SageMath parsed files
137
+ *.sage.py
138
+
139
+ # Environments
140
+ .env
141
+ .envrc
142
+ .venv
143
+ env/
144
+ venv/
145
+ ENV/
146
+ env.bak/
147
+ venv.bak/
148
+
149
+ # Spyder project settings
150
+ .spyderproject
151
+ .spyproject
152
+
153
+ # Rope project settings
154
+ .ropeproject
155
+
156
+ # mkdocs documentation
157
+ /site
158
+
159
+ # mypy
160
+ .mypy_cache/
161
+ .dmypy.json
162
+ dmypy.json
163
+
164
+ # Pyre type checker
165
+ .pyre/
166
+
167
+ # pytype static type analyzer
168
+ .pytype/
169
+
170
+ # Cython debug symbols
171
+ cython_debug/
172
+
173
+ # PyCharm
174
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
175
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
176
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
177
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
178
+ #.idea/
179
+
180
+ # Abstra
181
+ # Abstra is an AI-powered process automation framework.
182
+ # Ignore directories containing user credentials, local state, and settings.
183
+ # Learn more at https://abstra.io/docs
184
+ .abstra/
185
+
186
+ # Visual Studio Code
187
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
188
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
189
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
190
+ # you could uncomment the following to ignore the entire vscode folder
191
+ # .vscode/
192
+
193
+ # Ruff stuff:
194
+ .ruff_cache/
195
+
196
+ # PyPI configuration file
197
+ .pypirc
198
+
199
+ # Marimo
200
+ marimo/_static/
201
+ marimo/_lsp/
202
+ __marimo__/
203
+
204
+ # Streamlit
205
+ .streamlit/secrets.toml
@@ -0,0 +1,89 @@
1
+ # Contributor Covenant 3.0
2
+
3
+ ## Our Pledge
4
+
5
+ We pledge to make our community welcoming, safe, and equitable for all.
6
+
7
+ We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
8
+
9
+
10
+ ## Encouraged Behaviors
11
+
12
+ While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
13
+
14
+ With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
15
+
16
+ 1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
17
+ 2. Engaging **kindly and honestly** with others.
18
+ 3. Respecting **different viewpoints** and experiences.
19
+ 4. **Taking responsibility** for our actions and contributions.
20
+ 5. Gracefully giving and accepting **constructive feedback**.
21
+ 6. Committing to **repairing harm** when it occurs.
22
+ 7. Behaving in other ways that promote and sustain the **well-being of our community**.
23
+
24
+
25
+ ## Restricted Behaviors
26
+
27
+ We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
28
+
29
+ 1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
30
+ 2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
31
+ 3. **Stereotyping or discrimination.** Characterizing anyone’s personality or behavior on the basis of immutable identities or traits.
32
+ 4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
33
+ 5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
34
+ 6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
35
+ 7. Behaving in other ways that **threaten the well-being** of our community.
36
+
37
+ ### Other Restrictions
38
+
39
+ 1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
40
+ 2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
41
+ 3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
42
+ 4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
43
+
44
+
45
+ ## Reporting an Issue
46
+
47
+ Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
48
+
49
+ When an incident does occur, it is important to report it promptly. To report a possible violation, email {{ cookiecutter.email }}.
50
+
51
+ Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
52
+
53
+
54
+ ## Addressing and Repairing Harm
55
+
56
+ If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
57
+
58
+ 1) Warning
59
+ 1) Event: A violation involving a single incident or series of incidents.
60
+ 2) Consequence: A private, written warning from the Community Moderators.
61
+ 3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
62
+ 2) Temporarily Limited Activities
63
+ 1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
64
+ 2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
65
+ 3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
66
+ 3) Temporary Suspension
67
+ 1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
68
+ 2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
69
+ 3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
70
+ 4) Permanent Ban
71
+ 1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
72
+ 2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
73
+ 3) Repair: There is no possible repair in cases of this severity.
74
+
75
+ This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
76
+
77
+
78
+ ## Scope
79
+
80
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
81
+
82
+
83
+ ## Attribution
84
+
85
+ This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
86
+
87
+ Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
88
+
89
+ For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla’s code of conduct team](https://github.com/mozilla/inclusion).
@@ -0,0 +1,119 @@
1
+ # Contributing
2
+
3
+ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
4
+
5
+ You can contribute in many ways:
6
+
7
+ ## Types of Contributions
8
+
9
+ ### Report Bugs
10
+
11
+ Report bugs at https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/issues.
12
+
13
+ If you are reporting a bug, please include:
14
+
15
+ - Your operating system name and version.
16
+ - Any details about your local setup that might be helpful in troubleshooting.
17
+ - Detailed steps to reproduce the bug.
18
+
19
+ ### Fix Bugs
20
+
21
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
22
+
23
+ ### Implement Features
24
+
25
+ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
26
+
27
+ ### Write Documentation
28
+
29
+ {{ cookiecutter.project_name }} could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
30
+
31
+ ### Submit Feedback
32
+
33
+ The best way to send feedback is to file an issue at https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/issues.
34
+
35
+ If you are proposing a feature:
36
+
37
+ - Explain in detail how it would work.
38
+ - Keep the scope as narrow as possible, to make it easier to implement.
39
+ - Remember that this is a volunteer-driven project, and that contributions are welcome :)
40
+
41
+ ## Get Started!
42
+
43
+ Ready to contribute? Here's how to set up `{{ cookiecutter.project_slug }}` for local development.
44
+
45
+ 1. Fork the `{{ cookiecutter.project_slug }}` repo on GitHub.
46
+ 2. Clone your fork locally:
47
+
48
+ ```sh
49
+ git clone git@github.com:your_name_here/{{ cookiecutter.project_slug }}.git
50
+ ```
51
+
52
+ 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
53
+
54
+ ```sh
55
+ mkvirtualenv {{ cookiecutter.project_slug }}
56
+ cd {{ cookiecutter.project_slug }}/
57
+ python setup.py develop
58
+ ```
59
+
60
+ 4. Create a branch for local development:
61
+
62
+ ```sh
63
+ git checkout -b name-of-your-bugfix-or-feature
64
+ ```
65
+
66
+ Now you can make your changes locally.
67
+
68
+ 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
69
+
70
+ ```sh
71
+ make lint
72
+ make test
73
+ # Or
74
+ make test-all
75
+ ```
76
+
77
+ To get flake8 and tox, just pip install them into your virtualenv.
78
+
79
+ 6. Commit your changes and push your branch to GitHub:
80
+
81
+ ```sh
82
+ git add .
83
+ git commit -m "Your detailed description of your changes."
84
+ git push origin name-of-your-bugfix-or-feature
85
+ ```
86
+
87
+ 7. Submit a pull request through the GitHub website.
88
+
89
+ ## Pull Request Guidelines
90
+
91
+ Before you submit a pull request, check that it meets these guidelines:
92
+
93
+ 1. The pull request should include tests.
94
+ 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
95
+ 3. The pull request should work for Python 3.12 and 3.13. Tests run in GitHub Actions on every pull request to the main branch, make sure that the tests pass for all supported Python versions.
96
+
97
+ ## Tips
98
+
99
+ To run a subset of tests:
100
+
101
+ ```sh
102
+ pytest tests.test_{{ cookiecutter.project_slug }}
103
+ ```
104
+
105
+ ## Deploying
106
+
107
+ A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.md). Then run:
108
+
109
+ ```sh
110
+ uv version patch # or: minor, major
111
+ git commit -am "Release X.Y.Z"
112
+ just tag
113
+ ```
114
+
115
+ GitHub Actions will automatically publish to PyPI when the tag is pushed. See `.github/workflows/publish.yml` for details.
116
+
117
+ ## Code of Conduct
118
+
119
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
@@ -0,0 +1,5 @@
1
+ # History
2
+
3
+ ## {{ cookiecutter.first_version }} ({% now 'local' %})
4
+
5
+ * First release on PyPI.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) {% now 'local', '%Y' %}, {{ cookiecutter.full_name }}
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include CONTRIBUTING.md
2
+ include HISTORY.md
3
+ include LICENSE
4
+ include README.md
5
+
6
+ recursive-include tests *
7
+ recursive-exclude * __pycache__
8
+ recursive-exclude * *.py[co]
9
+
10
+ recursive-include docs *.md Makefile *.jpg *.png *.gif
@@ -0,0 +1,18 @@
1
+ # {{ cookiecutter.project_name }}
2
+
3
+ ![PyPI version](https://img.shields.io/pypi/v/{{ cookiecutter.pypi_package_name }}.svg)
4
+ [![Documentation Status](https://readthedocs.org/projects/{{ cookiecutter.pypi_package_name }}/badge/?version=latest)](https://{{ cookiecutter.pypi_package_name }}.readthedocs.io/en/latest/?version=latest)
5
+
6
+ {{ cookiecutter.project_short_description }}
7
+
8
+ * PyPI package: https://pypi.org/project/{{ cookiecutter.pypi_package_name }}/
9
+ * Free software: MIT License
10
+ * Documentation: https://{{ cookiecutter.pypi_package_name }}.readthedocs.io.
11
+
12
+ ## Features
13
+
14
+ * TODO
15
+
16
+ ## Credits
17
+
18
+ This package was created with [Cookiecutter](https://github.com/audreyfeldroy/cookiecutter) and the [audreyfeldroy/cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) project template.
@@ -0,0 +1,16 @@
1
+ # Welcome to {{ cookiecutter.project_name }}'s documentation!
2
+
3
+ ## Contents
4
+
5
+ - [Readme](readme.md)
6
+ - [Installation](installation.md)
7
+ - [Usage](usage.md)
8
+ - [Modules](modules.md)
9
+ - [Contributing](contributing.md)
10
+ - [History](history.md)
11
+
12
+ ## Indices and tables
13
+
14
+ - [Index](genindex)
15
+ - [Module Index](modindex)
16
+ - [Search](search)
@@ -0,0 +1,38 @@
1
+ # Installation
2
+
3
+ ## Stable release
4
+
5
+ To install {{ cookiecutter.project_name }}, run this command in your terminal:
6
+
7
+ ```sh
8
+ uv add {{ cookiecutter.pypi_package_name }}
9
+ ```
10
+
11
+ Or if you prefer to use `pip`:
12
+
13
+ ```sh
14
+ pip install {{ cookiecutter.pypi_package_name }}
15
+ ```
16
+
17
+ ## From source
18
+
19
+ The source files for {{ cookiecutter.project_name }} can be downloaded from the [Github repo](https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}).
20
+
21
+ You can either clone the public repository:
22
+
23
+ ```sh
24
+ git clone git://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}
25
+ ```
26
+
27
+ Or download the [tarball](https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tarball/main):
28
+
29
+ ```sh
30
+ curl -OJL https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tarball/main
31
+ ```
32
+
33
+ Once you have a copy of the source, you can install it with:
34
+
35
+ ```sh
36
+ cd {{ cookiecutter.project_slug }}
37
+ uv pip install .
38
+ ```
@@ -0,0 +1,7 @@
1
+ # Usage
2
+
3
+ To use {{ cookiecutter.project_name }} in a project:
4
+
5
+ ```python
6
+ import {{ cookiecutter.project_slug }}
7
+ ```
@@ -0,0 +1,86 @@
1
+ # Justfile for {{cookiecutter.pypi_package_name}}
2
+
3
+ # Show available commands
4
+ list:
5
+ @just --list
6
+
7
+ # Run all the formatting, linting, and testing commands
8
+ qa:
9
+ uv run --python=3.13 --extra test ruff format .
10
+ uv run --python=3.13 --extra test ruff check . --fix
11
+ uv run --python=3.13 --extra test ruff check --select I --fix .
12
+ uv run --python=3.13 --extra test ty check .
13
+ uv run --python=3.13 --extra test pytest .
14
+
15
+ # Run all the tests for all the supported Python versions
16
+ testall:
17
+ uv run --python=3.10 --extra test pytest
18
+ uv run --python=3.11 --extra test pytest
19
+ uv run --python=3.12 --extra test pytest
20
+ uv run --python=3.13 --extra test pytest
21
+
22
+ # Run all the tests, but allow for arguments to be passed
23
+ test *ARGS:
24
+ @echo "Running with arg: {{ '{{ARGS}}' }}"
25
+ uv run --python=3.13 --extra test pytest {{ '{{ARGS}}' }}
26
+
27
+ # Run all the tests, but on failure, drop into the debugger
28
+ pdb *ARGS:
29
+ @echo "Running with arg: {{ '{{ARGS}}' }}"
30
+ uv run --python=3.13 --extra test pytest --pdb --maxfail=10 --pdbcls=IPython.terminal.debugger:TerminalPdb {{ '{{ARGS}}' }}
31
+
32
+ # Run coverage, and build to HTML
33
+ coverage:
34
+ uv run --python=3.13 --extra test coverage run -m pytest .
35
+ uv run --python=3.13 --extra test coverage report -m
36
+ uv run --python=3.13 --extra test coverage html
37
+
38
+ # Build the project, useful for checking that packaging is correct
39
+ build:
40
+ rm -rf build
41
+ rm -rf dist
42
+ uv build
43
+
44
+ VERSION := `grep -m1 '^version' pyproject.toml | sed -E 's/version = "(.*)"/\1/'`
45
+
46
+ # Print the current version of the project
47
+ version:
48
+ @echo "Current version is {{ '{{VERSION}}' }}"
49
+
50
+ # Tag the current version in git and put to github
51
+ tag:
52
+ echo "Tagging version v{{ '{{VERSION}}' }}"
53
+ git tag -a v{{ '{{VERSION}}' }} -m "Creating version v{{ '{{VERSION}}' }}"
54
+ git push origin v{{ '{{VERSION}}' }}
55
+
56
+ # remove all build, test, coverage and Python artifacts
57
+ clean:
58
+ clean-build
59
+ clean-pyc
60
+ clean-test
61
+
62
+ # remove build artifacts
63
+ clean-build:
64
+ rm -fr build/
65
+ rm -fr dist/
66
+ rm -fr .eggs/
67
+ find . -name '*.egg-info' -exec rm -fr {} +
68
+ find . -name '*.egg' -exec rm -f {} +
69
+
70
+ # remove Python file artifacts
71
+ clean-pyc:
72
+ find . -name '*.pyc' -exec rm -f {} +
73
+ find . -name '*.pyo' -exec rm -f {} +
74
+ find . -name '*~' -exec rm -f {} +
75
+ find . -name '__pycache__' -exec rm -fr {} +
76
+
77
+ # remove test and coverage artifacts
78
+ clean-test:
79
+ rm -f .coverage
80
+ rm -fr htmlcov/
81
+ rm -fr .pytest_cache
82
+
83
+ # Publish to PyPI (manual alternative to GitHub Actions)
84
+ publish:
85
+ uv build
86
+ uv publish
@@ -0,0 +1,58 @@
1
+ [project]
2
+ name = "{{cookiecutter.pypi_package_name}}"
3
+ version = "{{ cookiecutter.first_version }}"
4
+ description = "{{ cookiecutter.project_short_description | replace('\\', '\\\\') | replace('\"', '\\\"') }}"
5
+ readme = "README.md"
6
+ authors = [
7
+ {name = "{{ cookiecutter.full_name | replace('\\', '\\\\') | replace('\"', '\\\"') }}", email = "{{cookiecutter.email}}"}
8
+ ]
9
+ maintainers = [
10
+ {name = "{{ cookiecutter.full_name | replace('\\', '\\\\') | replace('\"', '\\\"') }}", email = "{{cookiecutter.email}}"}
11
+ ]
12
+ classifiers = [
13
+ # TODO
14
+ ]
15
+ license = {text = "MIT"}
16
+ dependencies = [
17
+ "typer",
18
+ "rich",
19
+ ]
20
+ requires-python = ">= 3.10"
21
+
22
+ [project.optional-dependencies]
23
+ test = [
24
+ "coverage", # testing
25
+ "pytest", # testing
26
+ "ruff", # linting
27
+ "ty", # checking types
28
+ "ipdb", # debugging
29
+ ]
30
+
31
+ [project.urls]
32
+ bugs = "https://github.com/{{cookiecutter.__gh_slug}}/issues"
33
+ changelog = "https://github.com/{{cookiecutter.__gh_slug}}/blob/main/changelog.md"
34
+ homepage = "https://github.com/{{cookiecutter.__gh_slug}}"
35
+
36
+ [project.scripts]
37
+ {{cookiecutter.project_slug}} = "{{cookiecutter.project_slug}}.cli:app"
38
+
39
+ [tool.ty]
40
+ # All rules are enabled as "error" by default; no need to specify unless overriding.
41
+ # Example override: relax a rule for the entire project (uncomment if needed).
42
+ # rules.TY015 = "warn" # For invalid-argument-type, warn instead of error.
43
+
44
+ [tool.ruff]
45
+ line-length = 120
46
+
47
+ [tool.ruff.lint]
48
+ select = [
49
+ "E", # pycodestyle errors
50
+ "W", # pycodestyle warnings
51
+ "F", # Pyflakes
52
+ "I", # isort
53
+ "B", # flake8-bugbear
54
+ "UP", # pyupgrade
55
+ ]
56
+
57
+ [tool.uv]
58
+ package = true
@@ -0,0 +1,4 @@
1
+ """Top-level package for {{ cookiecutter.project_name }}."""
2
+
3
+ __author__ = """{{ cookiecutter.full_name }}"""
4
+ __email__ = '{{ cookiecutter.email }}'
@@ -0,0 +1,4 @@
1
+ from .cli import app
2
+
3
+ if __name__ == "__main__":
4
+ app()
@@ -0,0 +1,22 @@
1
+ """Console script for {{cookiecutter.project_slug}}."""
2
+
3
+ import typer
4
+ from rich.console import Console
5
+
6
+ from {{cookiecutter.project_slug}} import utils
7
+
8
+ app = typer.Typer()
9
+ console = Console()
10
+
11
+
12
+ @app.command()
13
+ def main():
14
+ """Console script for {{cookiecutter.project_slug}}."""
15
+ console.print("Replace this message by putting your code into "
16
+ "{{cookiecutter.project_slug}}.cli.main")
17
+ console.print("See Typer documentation at https://typer.tiangolo.com/")
18
+ utils.do_something_useful()
19
+
20
+
21
+ if __name__ == "__main__":
22
+ app()
@@ -0,0 +1,2 @@
1
+ def do_something_useful():
2
+ print("Replace this with a utility function")
@@ -0,0 +1 @@
1
+ """Unit test package for {{ cookiecutter.project_slug }}."""
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python
2
+ import pytest
3
+
4
+ """Tests for `{{ cookiecutter.project_slug }}` package."""
5
+
6
+ # from {{ cookiecutter.project_slug }} import {{ cookiecutter.project_slug }}
7
+
8
+
9
+ @pytest.fixture
10
+ def response():
11
+ """Sample pytest fixture.
12
+
13
+ See more at: http://doc.pytest.org/en/latest/fixture.html
14
+ """
15
+ # import requests
16
+ # return requests.get('https://github.com/audreyfeldroy/cookiecutter-pypackage')
17
+
18
+
19
+ def test_content(response):
20
+ """Sample pytest test function with the pytest fixture as an argument."""
21
+ # from bs4 import BeautifulSoup
22
+ # assert 'GitHub' in BeautifulSoup(response.content).title.string
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.4
2
+ Name: cookiecutter-pypackage
3
+ Version: 0.3.1
4
+ Summary: Cookiecutter template for a Python package
5
+ Project-URL: homepage, https://github.com/audreyfeldroy/cookiecutter-pypackage
6
+ Author-email: "Audrey M. Roy Greenfeld" <audrey@feldroy.com>
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: cookiecutter,package,template
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Natural Language :: English
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: Implementation :: CPython
22
+ Classifier: Topic :: Software Development
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: alabaster>=1.0.0
25
+ Requires-Dist: cookiecutter>=2.6.0
26
+ Requires-Dist: typer>=0.16.0
27
+ Requires-Dist: watchdog>=6.0.0
28
+ Provides-Extra: test
29
+ Requires-Dist: coverage; extra == 'test'
30
+ Requires-Dist: ipdb; extra == 'test'
31
+ Requires-Dist: pytest; extra == 'test'
32
+ Requires-Dist: pytest-cookies; extra == 'test'
33
+ Requires-Dist: ruff; extra == 'test'
34
+ Requires-Dist: ty; extra == 'test'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # Cookiecutter PyPackage
38
+
39
+ [![PyPI version](https://img.shields.io/pypi/v/cookiecutter-pypackage.svg)](https://pypi.python.org/pypi/cookiecutter-pypackage)
40
+ [![PyPI downloads](https://img.shields.io/pypi/dm/cookiecutter-pypackage.svg)](https://pypi.python.org/pypi/cookiecutter-pypackage)
41
+
42
+ [Cookiecutter](https://github.com/cookiecutter/cookiecutter) template for a Python package.
43
+
44
+ * GitHub repo: [https://github.com/audreyfeldroy/cookiecutter-pypackage/](https://github.com/audreyfeldroy/cookiecutter-pypackage/)
45
+ * Free software: MIT license
46
+ * Discord: [https://discord.gg/PWXJr3upUE](https://discord.gg/PWXJr3upUE)
47
+
48
+ ## Features
49
+
50
+ * Modern tooling: [uv](https://docs.astral.sh/uv/) for dependency management, [justfile](https://github.com/casey/just) for task running
51
+ * Testing with pytest, GitHub Actions for Python 3.10, 3.11, 3.12, 3.13, and 3.14
52
+ * Auto-release to [PyPI](https://pypi.python.org/pypi) via Trusted Publishers when you push a tag
53
+ * Command line interface using [Typer](https://typer.tiangolo.com/)
54
+
55
+ ## Quickstart
56
+
57
+ First, install [uv](https://docs.astral.sh/uv/getting-started/installation/) if you haven't already.
58
+
59
+ Generate a new Python package:
60
+
61
+ ```bash
62
+ uvx cookiecutter-pypackage
63
+ ```
64
+
65
+ You'll be prompted for some values:
66
+
67
+ ```
68
+ [1/9] full_name (Audrey M. Roy Greenfeld): Your Name
69
+ [2/9] email (audreyfeldroy@example.com): you@example.com
70
+ [3/9] github_username (audreyfeldroy): your-github-username
71
+ [4/9] pypi_package_name (python-boilerplate): my-package
72
+ [5/9] project_name (Python Boilerplate): My Package
73
+ [6/9] project_slug (my_package):
74
+ [7/9] project_short_description (...): A short description of your package.
75
+ [8/9] pypi_username (your-github-username):
76
+ [9/9] first_version (0.1.0):
77
+ ```
78
+
79
+ <details>
80
+ <summary>Traditional way (without uvx)</summary>
81
+
82
+ ```bash
83
+ uv venv
84
+ source .venv/bin/activate
85
+ uv pip install cookiecutter
86
+ cookiecutter gh:audreyfeldroy/cookiecutter-pypackage
87
+ ```
88
+
89
+ </details>
90
+
91
+ Then:
92
+
93
+ * Create a GitHub repo and push your code
94
+ * Set up [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/) for your repo
95
+ * Release your package by pushing a tag: `git tag v0.1.0 && git push --tags`
96
+
97
+ ## Not Exactly What You Want?
98
+
99
+ Don't worry, you have options:
100
+
101
+ ### Fork This / Create Your Own
102
+
103
+ If you have differences in your preferred setup, I encourage you to fork this
104
+ to create your own version. Or create your own; it doesn't strictly have to
105
+ be a fork.
106
+
107
+ ### Similar Cookiecutter Templates
108
+
109
+ Explore other forks to get ideas. See the [network](https://github.com/audreyfeldroy/cookiecutter-pypackage/network) and [family tree](https://github.com/audreyfeldroy/cookiecutter-pypackage/network/members) for this repo.
110
+
111
+ ### Or Submit a Pull Request
112
+
113
+ I also accept pull requests on this, if they're small, atomic, and if they
114
+ make my own packaging experience better.
@@ -0,0 +1,33 @@
1
+ cookiecutter_pypackage/__init__.py,sha256=WDed3GQsdiAT_RjTKIkCxvs2D4x6wL5Wv8h1n43Hedc,88
2
+ cookiecutter_pypackage/cli.py,sha256=P5-1gkljvw0y5UyuU5a1Kb08LyIn3N0Ttr9VMqYOEiw,1110
3
+ cookiecutter_pypackage/template/cookiecutter.json,sha256=vwW0v8LRT61tu4rN_Ci6VRjD9992qaYayG2jLaQ9_OA,573
4
+ cookiecutter_pypackage/template/hooks/post_gen_project.py,sha256=AS4vyATxgPwT4D8svzUTpApYcuBz_abnmu6b9b5zdCA,122
5
+ cookiecutter_pypackage/template/hooks/pre_gen_project.py,sha256=Q2LgpeI-JztI1t47_QzXYIL7xMUrriQfY1YP1-lquJ4,359
6
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.editorconfig,sha256=ApOhM0df3iTTbSwBnjtEwYDx-MsgDzAS9C9mylQlZW8,663
7
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.gitignore,sha256=Zuf56zBhnTKpvrmxiQrAmyzL2m1vMVWONgp6iisugEc,4521
8
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/CODE_OF_CONDUCT.md,sha256=YxbJvW-YZG7FnC4eavwO7_eJMDv76uRa3Iy-EapQ6qc,8493
9
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/CONTRIBUTING.md,sha256=-VjhxyduKnRHjhyrIvrDC5AA36XstHXxcYVZNTAHelU,3871
10
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/HISTORY.md,sha256=PYeH6H2uaeYfSTReCx4LkKnb5OtB581MSulS2f1LO5I,93
11
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/LICENSE,sha256=CUybc5eSu0epdA3N-tWsJ3bBQ1T-_mEmsuYCSmGGxKY,1105
12
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/MANIFEST.in,sha256=CgQfcEPusonTMMu1S_2fFbqg73XtEZbdOINPjeSpJLA,221
13
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/README.md,sha256=n7biltzuUt9mPrh-pS2tCqfsLjhfZ6SHgnvqev2K_fA,810
14
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/justfile,sha256=Fj5MBzZnXel5Roq8s_aSOsZZRhJmQV01U8bUGdwvzRY,2531
15
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/pyproject.toml,sha256=rwZXnSCLZNAkrKTqCfeTN7u25HHVu4H6ZN5rbq9tsok,1609
16
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/ISSUE_TEMPLATE.md,sha256=uh2KIB8YW7Jl1DTXEp4irIkCQkSg1w0czvqVHILBQ7U,342
17
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/workflows/publish.yml,sha256=4WayUsd1YiSYPplicKVxQUB8l-qSVm5dgXsyi4Wvo2U,327
18
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/.github/workflows/test.yml,sha256=EdZomjwk0hPpuoiOaQlVAdBAnV5mwWABoj0kcxoK4WA,1108
19
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/index.md,sha256=RhtW6tFgRGt59VIw5NmIuWydZzqirkUtRYUVdOAHuNk,324
20
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/installation.md,sha256=CAPcmUD-_o3iMSR9d11y0uUm7JHP3oHxBjZPa6KK-zc,983
21
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/docs/usage.md,sha256=4mEwuA0Wby0otc7MTLxVf2d7pnZl459h5DgL8zkfL3E,116
22
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/__init__.py,sha256=SB94Bs6t5mGZXEcTw-wy-PJSs6LAJ05tVqG-MhaK-TM,149
23
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/__main__.py,sha256=Qd-f8z2Q2vpiEP2x6PBFsJrpACWDVxFKQk820MhFmHo,59
24
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/cli.py,sha256=OIII0xxFg2XUKG7QSB7CL180sfwkVqebvoOy7zIwEgk,554
25
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/utils.py,sha256=1RxiNQM7rpegUEPuFvOlbSGesR4gnWpXr82bZQCgELM,77
26
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/src/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py,sha256=h0hwdogXGFqerm-5ZPeT-irPn91pCcQRjiHThXsRzEk,19
27
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/tests/__init__.py,sha256=iAzxVEdL8bFF_-yRdlf_xgKhB0y9XCNPvwe0qmxa8_k,61
28
+ cookiecutter_pypackage/template/{{cookiecutter.pypi_package_name}}/tests/test_{{cookiecutter.project_slug}}.py,sha256=BTNSRWuf_1boZhu6tZsEh3ka1yQaXuqMLXNFE_2Tetc,631
29
+ cookiecutter_pypackage-0.3.1.dist-info/METADATA,sha256=rXXitCppD8EGHjJBJYDV0F5IJlZdxgmF6_ZsxGi7zf8,4223
30
+ cookiecutter_pypackage-0.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
+ cookiecutter_pypackage-0.3.1.dist-info/entry_points.txt,sha256=PNqgcmBDp6Uphq0pjh6nkh0yZQJJe27nB3UIEaL-09I,74
32
+ cookiecutter_pypackage-0.3.1.dist-info/licenses/LICENSE,sha256=WW7yb6Jur8QGwqGTihAsf_jSAvVMCfyV2sulBep2xS4,1079
33
+ cookiecutter_pypackage-0.3.1.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cookiecutter-pypackage = cookiecutter_pypackage.cli:app
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Audrey M. Roy Greenfeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,33 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: cookiecutter-pypackage
3
- Version: 0.2.0
4
- Summary: Cookiecutter template for a Python package
5
- Author-email: "Audrey M. Roy Greenfeld" <audrey@feldroy.com>
6
- License: BSD
7
- Project-URL: homepage, https://github.com/audreyfeldroy/cookiecutter-pypackage
8
- Keywords: cookiecutter,template,package
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: Environment :: Console
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Natural Language :: English
13
- Classifier: License :: OSI Approved :: BSD License
14
- Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: Implementation :: CPython
20
- Classifier: Programming Language :: Python :: Implementation :: PyPy
21
- Classifier: Topic :: Software Development
22
- Requires-Python: >=3.10
23
- Description-Content-Type: text/markdown
24
- License-File: LICENSE
25
- Requires-Dist: cookiecutter>=2.6.0
26
- Requires-Dist: ruff>=0.12.4
27
- Requires-Dist: pytest>=8.4.1
28
- Requires-Dist: pytest-cookies>=0.7.0
29
- Requires-Dist: typer>=0.16.0
30
- Requires-Dist: nox>=2025.5.1
31
- Requires-Dist: alabaster>=1.0.0
32
- Requires-Dist: watchdog>=6.0.0
33
- Dynamic: license-file
@@ -1,7 +0,0 @@
1
- cookiecutter_pypackage-0.2.0.dist-info/licenses/LICENSE,sha256=GPb7Bicu3qGhPElEp2FzlTgIvdrDoeBaFYdpJ470FdY,1551
2
- hooks/post_gen_project.py,sha256=PF6fIWYiIdgzxtnw94H2tCrKG0qpUeEfGyCTDHrU0HM,332
3
- hooks/pre_gen_project.py,sha256=SlT833xxMsc1oX0IxUfREgsVsnSbM5VgjOqKiaRUJIg,347
4
- cookiecutter_pypackage-0.2.0.dist-info/METADATA,sha256=ceVKFBw2cpkr56Ucp6abj2UZaD9uI3Bxov6XsdIIl4E,1309
5
- cookiecutter_pypackage-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- cookiecutter_pypackage-0.2.0.dist-info/top_level.txt,sha256=I0gcmmeA3xdjjkokY-bVx5WycqQcFVAk4RHQB-wl9h8,6
7
- cookiecutter_pypackage-0.2.0.dist-info/RECORD,,
@@ -1,27 +0,0 @@
1
- Copyright (c) Audrey Roy Greenfeld and individual contributors.
2
-
3
- All rights reserved.
4
-
5
- Redistribution and use in source and binary forms, with or without modification,
6
- are permitted provided that the following conditions are met:
7
-
8
- * Redistributions of source code must retain the above copyright notice,
9
- this list of conditions and the following disclaimer.
10
- * Redistributions in binary form must reproduce the above copyright notice,
11
- this list of conditions and the following disclaimer in the documentation
12
- and/or other materials provided with the distribution.
13
- * Neither the name of Audrey Roy Greenfeld nor the names of its contributors
14
- may be used to endorse or promote products derived from this software
15
- without specific prior written permission.
16
-
17
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1 +0,0 @@
1
- hooks
hooks/post_gen_project.py DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env python
2
- import pathlib
3
-
4
-
5
- if __name__ == '__main__':
6
-
7
- if '{{ cookiecutter.create_author_file }}' != 'y':
8
- pathlib.Path('AUTHORS.rst').unlink()
9
- pathlib.Path('docs', 'authors.rst').unlink()
10
-
11
- if 'Not open source' == '{{ cookiecutter.open_source_license }}':
12
- pathlib.Path('LICENSE').unlink()
hooks/pre_gen_project.py DELETED
@@ -1,13 +0,0 @@
1
- import re
2
- import sys
3
-
4
-
5
- MODULE_REGEX = r'^[_a-zA-Z][_a-zA-Z0-9]+$'
6
-
7
- module_name = '{{ cookiecutter.project_slug}}'
8
-
9
- if not re.match(MODULE_REGEX, module_name):
10
- print('ERROR: The project slug (%s) is not a valid Python module name. '
11
- 'Please do not use a - and use _ instead' % module_name)
12
- #Exit to cancel project
13
- sys.exit(1)