Skip to main content

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.0.1.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file cli-builder-0.0.1.tar.gz.

File metadata

  • Download URL: cli-builder-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6

File hashes

Hashes for cli-builder-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0f4f4bd2780f0531348d687eb1d6c31cbdaf45e965f15e95f941370696280846
MD5 5de73193815fdbfd5d88321b64c8a523
BLAKE2b-256 b5c528565bc1e2855e79ff416f3c0b253d11448c44880e4c0cdba8f35e8c827c

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