- Python 90.6%
- Dockerfile 9.4%
| .github | ||
| docs | ||
| hooks | ||
| tools | ||
| {{cookiecutter.project_name}} | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .readthedocs.yml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| cookiecutter.json | ||
| LICENSE | ||
| noxfile.py | ||
| README.md | ||
cookiecutter-neopy
Hi there!
I'm an amateur Python developer, and I love tyrannosaurus,
and equally love cookiecutter-hypermodern-python.
However, in my extended use of both, I noticed some shortcomings that I wanted to address.
tyrannosaurususes its own templating engine, but it unfortunately is very buggy and most of its exclusive features (like sync) are poorly implemented. I wanted to usecookiecutter's templating engine, which is much more robust and well-maintained.tyrannosaurustries too hard to make testing into a monolith, which yields unintelligible test results. Even though I prefer tox over nox, I still chose to takecookiecutter-hypermodern-python's approach of using nox, because it's much more flexible and easier to use.tyrannosaurusnever seems to update its dependencies, and it's stuck on Python 3.8. I wanted to use Python 3.11 exclusively to make use of the increased performance and syntax features, and I wanted to use the latest versions of all the dependencies.tyrannosaurushas a lot of boilerplate code pre-included, mainly for capturing test data and retrieving assets. While this is a good idea. It doesn't help that half of it is wrong and fails its own type checks. 🙃 The boilerplate I chose to implement in my template is a lot lighter and only supplies things that EVERY project uses.cookiecutter-hypermodern-pythonis a great template, but it lacks the tooling for containerization and deployment with Docker liketyrannosaurushas. I wanted to add that to this template.cookiecutter-hypermodern-pythonalso favors lower-level libraries like click over higher-level libraries like typer. I wanted to use typer, because it's a great library that makes it easy to build CLI applications.
For all of these reasons, I decided to fork cookiecutter-hypermodern-python and make my own template, cookiecutter-neopy. I hope you enjoy it!
TODO
- Convert to Python 3.11
- Update dependencies
- Add settings.yml for GitHub Probot
- Add
typer - Add Dockerfile
- Add docker-compose.yml
- Add GitHub Actions for publishing Docker image
- Write typer boilerplate & tests
- Write asset & metadata boilerplate & tests
Usage
# install pip & pipx through your distribution's package manager
pipx install poetry
pipx inject poetry poetry-plugin-export
pipx install nox
pipx inject nox nox-poetry
pipx install cookiecutter
# confirm poetry can find both Python~3.11 and Python~3.12
pipx python list
cookiecutter gh:regulad/cookiecutter-neopy
Please note, you must have the following installed and on PATH: nox, Python 3.11/3.12, poetry & git
The following segment of the README is the original README from cookiecutter-hypermodern-python.
cookiecutter-hypermodern-python

Cookiecutter template for a Python package based on the Hypermodern Python article series.
✨📚✨ Read the full documentation
Usage
cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout=2022.8.23
Special branches in the frameworks folder are available for some Python frameworks like FastAPI, Discord.py, and more. Check GitHub to see if there's a branch for your framework of choice.
These special templates also carry the opinionated nature of the base template, so you can expect the same quality of code and documentation.
cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout=frameworks/fastapi
Features
- Packaging and dependency management with Poetry
- Test automation with Nox
- Linting with pre-commit and Flake8
- Continuous integration with GitHub Actions
- Documentation with Sphinx, MyST, and Read the Docs using the furo theme
- Automated uploads to PyPI and TestPyPI
- Automated release notes with Release Drafter
- Automated dependency updates with Dependabot
- Code formatting with Black and Prettier
- Import sorting with isort
- Testing with pytest
- Code coverage with Coverage.py
- Coverage reporting with Codecov
- Command-line interface with Click
- Static type-checking with mypy
- Runtime type-checking with Typeguard
- Automated Python syntax upgrades with pyupgrade
- Security audit with Bandit and Safety
- Check documentation examples with xdoctest
- Generate API documentation with autodoc and napoleon
- Generate command-line reference with sphinx-click
- Manage project labels with GitHub Labeler
The template supports Python 3.7, 3.8, 3.9, and 3.10.