Cookiecutter template for a Click CLI project with optional SQLAlchemy/Alembic support and more.
This tool will create Python Click CLI project with the following features:
- Poetry: Manage dependency, build and release
- Click: Command line interface framework
- structlog: Production-ready structured logging for your CLI
- SQLAlchemy: (optional) Connect to database for you CLI including session handling decorator
- Alembic: (optional) For updating your database schemas alongside your code
- tabulate: (optional) Pretty-print tabular data easily with included decorator
- termgraph: (optional) Draw basic graphs in your CLI easily with included decorator
- Testing with Pytest (unittest is still supported out of the box)
- Code coverage report and endorsed by Codecov
- Format with Black and Isort
- Lint code with Flake8 and Flake8-docstrings
- bump2version: Pre-configured version bumping with a single command
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):
pip install -U cookiecutter
Generate a Python package project:
cookiecutter https://github.com/michaeltoohig/click-cli-boilerplate.git
This repo is forked from waynerv/cookiecutter-pypackage, which is forked from zillionare/python-project-wizard, which originally forked from audreyfeldroy/cookiecutter-pypackage