A kickstarter tool for python package development projects.
cookiecutter-python-package is a tool that kickstarts the process of creating a new python package project, a.k.a. library that can be installed with pip.
It creates a sensible project layout and builds a virtual environment within the projects root folder (.venv directory). It then installs and configures development dependencies such as linters and formatters in the virtualenv, generates a poetry.lock file, and installs the new package in the virtualenv. Vscode then opens up completely configured.
cookiecutter-python-package saves you from having to do a lot of installation and configuration tasks when starting a new project. Instead, it provides a
full development environment setup with a base project layout so you can get started right away.
- A clean folder structure with some sample boilerplate code
- A pyproject.toml project configuration that uses Poetry as dependency manager
- Pytest setup and configuration
- Black + iSort code formatters setup and configuration
- Pylint setup and configuration
- Vscode configuration
Make sure poetry is installed.
Also install cookiecutter.
Both should be callable in the terminal as poetry and cookiecutter.
vscode is optional but will get the most out of cookiecutter-python-package.
Open a terminal and paste the following command:
$ cookiecutter gh:TvanMeer/cookiecutter-python-package
It will ask you to enter a bunch of options, such as project name and description.
Then the installer runs and the new project opens in Vscode.
Should run on all operating systems, but I have only tested it on Linux.