Metadata-Version: 2.5
Name: pypkg-factory
Version: 0.1.0
Summary: Cookiecutter template for a Python package
Project-URL: homepage, https://github.com/mtouzot/pypkg-factory
Project-URL: changelog, https://github.com/mtouzot/pypkg-factory/releases
Project-URL: documentation, https://mtouzot.github.io/pypkg-factory/
Project-URL: issues, https://github.com/mtouzot/pypkg-factory/issues
Project-URL: security, https://github.com/mtouzot/pypkg-factory/security/policy
Author-email: Martin TOUZOT <mtouzot@proton.me>
License-Expression: MIT
License-File: LICENSE
Keywords: cookiecutter,package,template
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development
Requires-Python: >=3.12
Requires-Dist: alabaster>=1.0.0
Requires-Dist: cookiecutter>=2.6.0
Requires-Dist: typer>=0.16.0
Requires-Dist: watchdog>=6.0.0
Description-Content-Type: text/markdown

# PyPkg Factory

[![PyPI version](https://img.shields.io/pypi/v/pypkg-factory.svg)](https://pypi.org/project/pypkg-factory/)
[![PyPI downloads](https://static.pepy.tech/badge/pypkg-factory/month)](https://pepy.tech/projects/pypkg-factory)

[Cookiecutter](https://github.com/cookiecutter/cookiecutter) template for a Python package with production-ready CI and automated PyPI publishing.

* [GitHub](https://github.com/mtouzot/pypkg-factory/) | [PyPI](https://pypi.org/project/pypkg-factory/) | [Documentation](https://mtouzot.github.io/pypkg-factory/)
* Created by [Martin TOUZOT](https://mtouzot.github.io/) | GitHub [@mtouzot](https://github.com/mtouzot) | PyPI [@audreyr](https://pypi.org/user/audreyr/)
* MIT License

## Credits

PyPkg Factory is a fork from [Cookiecutter PyPackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) by [Audrey M. Roy Greenfeld](https://audrey.feldroy.com/q)

## What you get

### Tooling

| | Tool | |
|---|---|---|
| Package manager | [uv](https://docs.astral.sh/uv/) | Fast, handles venvs automatically |
| Task runner | [just](https://github.com/casey/just) | `just fix` applies safe fixes, `just check` verifies, and `just fix-and-check` does both |
| Linting | [ruff](https://docs.astral.sh/ruff/) | Format + lint in one tool |
| Type checking | [ty](https://docs.astral.sh/ty/) | All rules enabled, watch mode with `just type-check-watch` |
| Testing | [pytest](https://docs.pytest.org/) | `just check` tests Python 3.14; `just testall` and CI cover 3.12, 3.13, and 3.14 |
| CLI framework | [Typer](https://typer.tiangolo.com/) | Entry point + `__main__.py` included |
| Docs | [Zensical](https://zensical.org/) + [mkdocstrings](https://mkdocstrings.github.io/) | GitHub Pages deployment, API docs from docstrings |

### CI/CD (GitHub Actions, [security-hardened](https://mtouzot.github.io/pypkg-factory/github_actions/))

| Workflow | Trigger | What happens |
|---|---|---|
| **CI** | Push to main, PRs | Lint, type check, test across 3 Python versions |
| **Publish** | `v*` tag | Build, [Sigstore](https://docs.pypi.org/attestations/) attestation, PyPI via [Trusted Publishers](https://docs.pypi.org/trusted-publishers/) (no tokens) |
| **Docs** | Push to main | Build and deploy to GitHub Pages |
| **Dependabot** | Weekly | PRs to update Python dependencies and SHA-pinned actions |

All actions pinned by SHA, minimal permissions, no persisted credentials.

## Quickstart

Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:

```bash
uvx pypkg-factory
```

You'll be prompted for your package name, GitHub username, and a few other
values ([full list](https://mtouzot.github.io/pypkg-factory/prompts/)).
Follow the [tutorial](https://mtouzot.github.io/pypkg-factory/tutorial/)
to generate, verify, and release your package.

<details>
<summary>Without uvx</summary>

```bash
uv venv
source .venv/bin/activate
uv pip install cookiecutter
cookiecutter --keep-project-on-failure gh:mtouzot/pypkg-factory
```

</details>

## Override template variables

Pass `key=value` arguments to prefill prompts, or add `--no-input` for
automation:

```bash
uvx pypkg-factory full_name="Your Name"
```

See [Template prompts and command-line options](https://mtouzot.github.io/pypkg-factory/prompts/)
for all variables, defaults, and automation options.

## Documentation

**[mtouzot.github.io/pypkg-factory](https://mtouzot.github.io/pypkg-factory/)**

- [Tutorial](https://mtouzot.github.io/pypkg-factory/tutorial/) - from generation to first PyPI release
- [Project Structure](https://mtouzot.github.io/pypkg-factory/project_structure/) - what's in the generated project
- [GitHub Actions](https://mtouzot.github.io/pypkg-factory/github_actions/) - CI, publish, docs deployment, security hardening
- [Prompts](https://mtouzot.github.io/pypkg-factory/prompts/) - what each prompt means
- [Troubleshooting](https://mtouzot.github.io/pypkg-factory/troubleshooting/)

## Alternatives

This template is opinionated. If it doesn't fit:

- Browse the [fork network](https://github.com/mtouzot/pypkg-factory/network/members) for variants
- [Create your own](https://github.com/cookiecutter/cookiecutter) template from scratch

Pull requests welcome if they're small, atomic, and improve the template.

---
