Cookiecutter for rapidly creating modern & high-quality Python packages
A cookiecutter (project template) for rapidly developing new open source Python packages. Best practices with all the modern bells and whistles included.
cruft update
and creates a PR)Make sure you have cruft
installed. Alternatively, you can use
cookiecutter
if you are not interested in
getting updates to the project "boilerplate" in the future.
Create a new project:
cruft create https://github.com/woltapp/wolt-python-package-cookiecutter
The CLI interface will ask some basic questions, such the name of the project, and then generate all the goodies automatically.
After that you can make it a proper git repo:
cd <your-project-slug>
git init
git add .
git commit -m "Initial project structure from Wolt Python Package cookiecutter"
We update this cookiecutter template regularly to keep it up-to-date with the best practices of the Python world. You can get the updates into your project with:
cruft update
PYPI_TOKEN
Required for publishing the package to PyPI. You can generate a token by logging into PyPI and navigating to Add API token in your account settings.
AUTO_UPDATE_GITHUB_TOKEN
This cookiecutter template comes with an auto update feature if the project was created using cruft. A GitHub action automatically checks for updates and creates a pull request.
Generate personal access token
and use it as the value for AUTO_UPDATE_GITHUB_TOKEN
secret. When creating the access token, the following
permissions have to be granted
The first release will create gh-pages
branch which will contain the static files for the documentation. Enable GitHub
Pages in the Pages section of the repository settings.