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
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
click-lazy-0.0.1.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for click_lazy-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786e97a0845731f306cbf9ffed23310c729345842aaf8eb3ec0aac2f420fa098 |
|
MD5 | a7a4d0bf08f8092cb775146bedb49024 |
|
BLAKE2b-256 | 630baca4379e86cf4c4f14fa0074867ced1c13f549d2c813f6737f6ad0a27f55 |