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()
Metadata
Release files for interactive-click 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| interactive_click-0.0.2.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| interactive_click-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / interactive_click-0.0.2.tar.gz
| Download URL | interactive_click-0.0.2.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a62ad471274665b0fdebf8abdf11a225404b84fee36ac2b9a0f39faaab1cfb99
|
|
BLAKE2b-256 checksum How to use checksums |
6fd9a3527688c8e09c90c1eca758c66c886969b8cee691e371e1e300ffaeb81d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / interactive_click-0.0.2-py3-none-any.whl
| Download URL | interactive_click-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85381dca5977cd1be1368c6a0415abda7bb4ea0c599247561be0b2241606a8ea
|
|
BLAKE2b-256 checksum How to use checksums |
2bee7419d1d5848422ac7e63833ac3f9294164561843801f5649d9abe0b65d74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|