Skip to main content

LazyGroup implementation for Click which imports only nessesery commands

Project description

click-lazy

$ click_lazy

Click lazy is an extention for click.

Click lazy allow you to separate set of commands in file and import it only if necessary.

A Simple Example

from click_lazy import LazyGroup

...

if __name__ == '__main__':
    # This group of commands will import group_heavy only if needed
    cli.add_command(LazyGroup(name='heavy', import_name='group_heavy:cli'))

    cli()

group_heavy.py

import click


@click.group()
def cli():
    """Havy script"""


@cli.command(name='heavy_cmd')
def run_heavy_cmd():
    print('Running command from heavy group file')

See complete example on github

Links

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

click-lazy-0.0.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

click_lazy-0.0.1-py2.py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 2 Python 3

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