Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interactive_click-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

interactive_click-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file interactive_click-0.0.1.tar.gz.

File metadata

  • Download URL: interactive_click-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for interactive_click-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dcd0a9fda79b128358ea45113147b4c6d5fe23ce6bb489aa53a6d31e332fdb0c
MD5 20dccd2a223198583d345877c5865df5
BLAKE2b-256 d1ea2b12fe083919da9d9e4d9b1a7ec1831783feb9e4d75a386c7be3715c935b

See more details on using hashes here.

File details

Details for the file interactive_click-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for interactive_click-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 87928c021063037becda9984e09443f76dba5ab72051dd9d109d2badd89a8923
MD5 0be5c829669a3cf3a0546bf72b02ca60
BLAKE2b-256 3acd5a57ad52126d942fca745e502f6d5e84fd0f43f1141dfcd6853e68fdbd68

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page