Metadata-Version: 2.1
Name: python-whiteprint
Version: 0.9.1
Summary: Generating Python projects using best practices
Home-page: https://github.com/RomainBrault/python-whiteprint
License: MIT
Keywords: Python,Cookiecutter,copier,template,rich,typer,nox,poetry,beartype,oci-image,container,docker,podman,ruff
Author: Romain Brault
Author-email: mail@romainbrault.com
Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Typing :: Typed
Requires-Dist: beartype (>=0.15.1)
Requires-Dist: colorama (>=0.4.3)
Requires-Dist: copier (>=7.1.0)
Requires-Dist: jinja2-time (>=0.2.0)
Requires-Dist: platformdirs (>=3.2.0)
Requires-Dist: pygit2 (>=1.11.1)
Requires-Dist: pygithub (>=1.58.1)
Requires-Dist: python-slugify (>=8.0.1)
Requires-Dist: returns (>=0.22.0)
Requires-Dist: rich (>=12.5.0)
Requires-Dist: shellingham (>=1.3.0)
Requires-Dist: typer (>=0.7.0)
Requires-Dist: typing-extensions (>=4.5.0)
Project-URL: Documentation, https://RomainBrault.github.io/python-whiteprint/
Project-URL: Repository, https://github.com/RomainBrault/python-whiteprint.git
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: © 2023 Romain Brault <mail@romainbrault.com>

SPDX-License-Identifier: MIT
-->

<h1 align="center">
  <a href="https://python-whiteprint.readthedocs.io/"><img src="https://raw.githubusercontent.com/RomainBrault/python-whiteprint/main/docs/images/logo.png" alt="python whiteprint"></a>
</h1>
<p align="center">
    <em>Python Whiteprint, generate easily Python projects with (opinionated) best practices.</em>
</p>
<p align="center">
  <a href="https://pypi.python.org/pypi/python-whiteprint">
    <img alt="PyPI" src="https://img.shields.io/pypi/v/python-whiteprint.svg"/>
  </a>
  <a href="https://github.com/RomainBrault/python-whiteprint/actions/workflows/tests.yml">
    <img alt="PyPI" src="https://github.com/RomainBrault/python-whiteprint/actions/workflows/tests.yml/badge.svg?branch=main"/>
  </a>
  <a href="https://codecov.io/gh/RomainBrault/python-whiteprint">
    <img alt="pypi" src="https://codecov.io/gh/RomainBrault/python-whiteprint/branch/main/graph/badge.svg?token=GSYS7VUB5R"/>
  </a>
  <a href="https://github.com/psf/black">
    <img alt="pypi" src="https://img.shields.io/badge/code%20style-black-000000.svg"/>
  </a>
  <a href="https://mypy-lang.org/">
    <img alt="pypi" src="https://www.mypy-lang.org/static/mypy_badge.svg"/>
  </a>
  <a href="https://pre-commit.com/">
    <img alt="pypi" src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white"/>
  </a>
  <a href="https://opensource.org/licenses/MIT">
    <img alt="pypi" src="https://img.shields.io/github/license/RomainBrault/python-whiteprint"/>
  </a>
  <a href="https://www.contributor-covenant.org/version/2/1/code_of_conduct/">
    <img alt="pypi" src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg"/>
  </a>
</p>

---

**Documentation**: <a href="https://python-whiteprint.readthedocs.io/en/latest/" target="_blank">https://python-whiteprint.readthedocs.io/en/latest/</a>

**Source Code**: <a href="https://github.com/RomainBrault/python-whiteprint" target="_blank">https://github.com/RomainBrault/python-whiteprint</a>

---

# Installation

Ensure that you have [git](https://git-scm.com/) and
[python3](https://www.python.org/) installed.

Then install the required Python tools:

```console
$ python3 -m pip install --user --upgrade pipx
$ pipx install poetry
$ pipx install nox
$ pipx inject nox nox-poetry rich
```

Eventually install Python Whiteprint:

```console
$ pipx install python-whiteprint
```

# Example

Create a local project

```console
$ whiteprint init <my_project>
```

Create a GitHub project

```console
$ whiteprint init <my_project> --github-token <my_github_token>
```

Note that the GitHub token must have repository, workflows and packages
permissions.

# Yet another Python Project scaffold/cookiecutter/generator?

<p align="center"><em>
Yes.
</em></p>

This project build upon the excellents [cookiecutter-hypermodern-python] by
[@cjolowicz](https://github.com/cjolowicz) as well as [python-blueprint] by
[@johnthagen](https://github.com/johnthagen).

You might want to check these projects as they might be more suited to your
needs.

The documentation of this project is heavily inspired from @cjolowicz's work.
We also recommend readings @cjolowicz's [guide on modern Python
tooling](https://cjolowicz.github.io/posts/hypermodern-python-01-setup/).

# Differences compared to [cookiecutter-hypermodern-python]

- Use [copier](https://copier.readthedocs.io/en/latest/) instead of the
  cookiecutter project,
- tweaks in the generated project (non exhaustively: CLI with Typer
  instead of Click, dynamic type checking with beartype, [auto-API
  documentation](https://sphinx-autoapi.readthedocs.io/en/latest/)),
- manage licenses with [Reuse](https://reuse.software/),
- more Github Actions and Community Standards and Community Standards,
- [Ruff](https://beta.ruff.rs/docs/) instead of Flake8 to auto-fix a maximum of
  code smells,
- strict linting with [pylint](https://pylint.readthedocs.io/en/latest/),
- OCI Container images,
- localization with [Babel](https://babel.pocoo.org/en/latest/index.html).

[cookiecutter-hypermodern-python]: https://cookiecutter-hypermodern-python.readthedocs.io/en/2022.6.3.post1/
[python-blueprint]: https://github.com/johnthagen/python-blueprint

