Skip to main content

Parguments: A simple cli args parser for Python

Project description

A simple cli args parser for Python.

Useful for creating command-line scripts.

Example

"""
catsup v1.0

Usage:
    catsup init [<path>]
    catsup build
    catsup deploy
    catsup -h | --help
    catsup --version

Options:
    -h --help             Show this screen and exit.
    -s --settings=<file>  path to config file. [default: config.json]
"""
from parguments import Parguments

parguments = Parguments(__doc__, version='1.0')

@parguments.command
def init(path):
  """
  Usage:
    catsup init [<path>]

  Options:
    -h --help             Show this screen and exit.
    -s --settings=<file>  path to setting file. [default: config.json]
  """
  pass

@parguments.command
def build(settings):
  """
  Usage:
    catsup build [-s <file>|--settings=<file>]

  Options:
    -h --help             Show this screen and exit.
    -s --settings=<file>  path to setting file. [default: config.json]
  """
  pass

@parguments.command
def deploy(settings):
  """
  Usage:
    catsup deploy [-s <file>|--settings=<file>]

  Options:
    -h --help             Show this screen and exit.
    -s --settings=<file>  path to setting file. [default: config.json]
  """
  pass

if __name__ == '__main__':
  parguments.run()

Documents at http://parguments.rtfd.org/

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

parguments-0.3.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

parguments-0.3.1-py2.7.egg (9.0 kB view details)

Uploaded Source

File details

Details for the file parguments-0.3.1.tar.gz.

File metadata

  • Download URL: parguments-0.3.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for parguments-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a2abbd2023aeb4cd826217396893af9890995185734e8b406bf5043a53bbae32
MD5 d301be6c46f5e8a0b607094fc3c3417e
BLAKE2b-256 f81928a26d531b9ab60fc69e3ff7bd543ea1e5d0c108b5f0ff2b3435fe6cc9f8

See more details on using hashes here.

File details

Details for the file parguments-0.3.1-py2.7.egg.

File metadata

File hashes

Hashes for parguments-0.3.1-py2.7.egg
Algorithm Hash digest
SHA256 a99fcbf090f0cbe879da34f4731e68808d6e4d28be5b102991a63586fc77a507
MD5 da79c359d93b93287f6e1fc50741918c
BLAKE2b-256 86e41b66e6c1b7642adfd9610cb238bbb9de4f3dbc7d0fc600c2a6c1da0c4888

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