Decorators for building command group CLIs
Project description
cli-builder: Decorators for building command group CLIs
cli-builder provides a user-friendly interface to quickly build up command group CLIs.
import cli_builder
dispatch = cli_builder.Dispatch()
my_cool_group = dispatch.group("my_cool_group")
my_other_cool_group = dispatch.group("my_other_cool_group")
@my_cool_group.command("do-stuff", arguments={
"positional": dict(type=str),
"--named": dict(type=int, default=5)
})
def my_func(args):
print(args.positional, args.named)
@my_cool_group.command("do-other-stuff", arguments=dict())
def my_other_func(args):
pass
@my_other_cool_group.command("do-stuff-in-other-group")
def other_group_command(args):
pass
Installation
pip install cli-builder
Links
Project home page GitHub
Package distribution PyPI
Bugs
Please report bugs, issues, feature requests, etc. on GitHub.
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
cli-builder-0.1.5.tar.gz
(3.5 kB
view details)
File details
Details for the file cli-builder-0.1.5.tar.gz
.
File metadata
- Download URL: cli-builder-0.1.5.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aee1931096259692d9c24d56866bf5583c2a52b55635e3d611c44a1546ea066 |
|
MD5 | 48cdde9b99bf1748a2d40e9c2d6b7873 |
|
BLAKE2b-256 | 13b3d95ba23833f61fb0d3e7e3a7579bced3dfc8e312e6107552d31289a03db4 |