Skip to content

Hypermodern Python Cookiecutter, with some added conveniences borrowed from Tyrannosaurus

License

Notifications You must be signed in to change notification settings

regulad/cookiecutter-neopy

 
 

Repository files navigation

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.

  1. tyrannosaurus uses its own templating engine, but it unfortunately is very buggy and most of its exclusive features (like sync) are poorly implemented. I wanted to use cookiecutter's templating engine, which is much more robust and well-maintained.
  2. tyrannosaurus tries too hard to make testing into a monolith, which yields unintelligible test results. Even though I prefer tox over nox, I still chose to take cookiecutter-hypermodern-python's approach of using nox, because it's much more flexible and easier to use.
  3. tyrannosaurus never 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.
  4. tyrannosaurus has 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.
  5. cookiecutter-hypermodern-python is a great template, but it lacks the tooling for containerization and deployment with Docker like tyrannosaurus has. I wanted to add that to this template.
  6. cookiecutter-hypermodern-python also 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

All testing was done on cookiecutter 2.3.0 and Python 3.11.4.

cookiecutter gh:regulad/cookiecutter-neopy --checkout=2023.8.4

The following segment of the README is the original README from cookiecutter-hypermodern-python.


cookiecutter-hypermodern-python

Status Python Version CalVer License
Read the documentation Tests Codecov
pre-commit enabled Black codestyle Contributor Covenant

logo

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

The template supports Python 3.7, 3.8, 3.9, and 3.10.

About

Hypermodern Python Cookiecutter, with some added conveniences borrowed from Tyrannosaurus

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.1%
  • Dockerfile 6.9%