Skip to main content

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)

Source distribution for interactive-click 0.0.2
File Size Uploaded
interactive_click-0.0.2.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interactive-click 0.0.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page