No project description provided
Project description
interactive-click
Installation
pip install interactive-click
Usage
import click
@click.command()
@click.option('--name', prompt='Your name', help='The person to greet.')
def cli(name):
click.echo('Hello %s!' % name)
if __name__ == '__main__':
import sys
# Can be simply run by:
# run_interactive(cli)
# But we can also wrap it by checking whether the user is running the script without any arguments
if len(sys.argv) == 1:
# No arguments, run interactive mode
try:
from interactive_click import run_interactive
run_interactive(cli)
except ImportError:
cli()
else:
cli()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file interactive_click-0.0.2.tar.gz
.
File metadata
- Download URL: interactive_click-0.0.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a62ad471274665b0fdebf8abdf11a225404b84fee36ac2b9a0f39faaab1cfb99 |
|
MD5 | d0c043ff2edbc6088ae3b8fb831edb50 |
|
BLAKE2b-256 | 6fd9a3527688c8e09c90c1eca758c66c886969b8cee691e371e1e300ffaeb81d |
File details
Details for the file interactive_click-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: interactive_click-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85381dca5977cd1be1368c6a0415abda7bb4ea0c599247561be0b2241606a8ea |
|
MD5 | 57813cb2fcb3d6d9edeaa2965938c28c |
|
BLAKE2b-256 | 2bee7419d1d5848422ac7e63833ac3f9294164561843801f5649d9abe0b65d74 |