Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.118s · 18.7MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.6s · import 0.107s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
verbose_option
✓ from more_click import verbose_option
Common utility for adding a `--verbose` flag.
make_web_command
✓ from more_click import make_web_command
Utility for quickly creating a web application command.
host_option
✓ from more_click import host_option
Pre-defined option for specifying a host address.
port_option
✓ from more_click import port_option
Pre-defined option for specifying a port number.
run_app
✓ from more_click import run_app
Helper function to run a Flask app, optionally with Gunicorn.
This quickstart demonstrates how to use `more-click`'s `make_web_command` to integrate a Flask application into a Click CLI, and how to use a pre-defined option like `verbose_option` alongside custom Click options. Remember to replace 'my_package.wsgi:app' with the actual path to your Flask application instance.
import click
from more_click import make_web_command, verbose_option
# Example of a simple web command using more-click's utility
web_command = make_web_command('my_package.wsgi:app') # Replace 'my_package.wsgi:app' with your actual Flask app import path
@click.group()
def cli():
pass
@cli.command()
@verbose_option
@click.option('--custom-flag', is_flag=True, help='A custom flag.')
def my_tool(verbose: bool, custom_flag: bool):
"""A command demonstrating more-click options and custom logic."""
if verbose:
click.echo("Verbose mode enabled.")
if custom_flag:
click.echo("Custom flag enabled.")
click.echo("Running my_tool.")
cli.add_command(web_command, name='web') # Add the web command to your CLI group
if __name__ == '__main__':
# To run the web command: python your_cli.py web --host 0.0.0.0 --port 8000
# To run my_tool: python your_cli.py my-tool -v --custom-flag
cli()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'more-click'
Attempting to import the library using its PyPI package name (with a hyphen) instead of its module name (with an underscore).
fixChange your import statement from `import more-click` to `import more_click` or `from more_click import ...`.
AttributeError: 'NoneType' object has no attribute 'run' (when using make_web_command)
The `make_web_command` utility expects a string pointing to a valid Flask application instance (e.g., 'my_package.wsgi:app'). If the specified path is incorrect or the app cannot be loaded, `run_app` will receive a `None` object.
fixVerify that the string passed to `make_web_command('your_module:your_app_instance')` correctly points to your Flask application object. Ensure `your_module.py` and `your_app_instance` exist and are accessible. Upgrade
Version history
0.1.3latest on PyPI · released Oct 21, 2025
Audit
Dependencies
clickrequiredCore dependency for building CLIs; more-click extends its functionality.
pythonrequiredRequires Python 3.10 or higher.