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.0.tar.gz
(5.0 kB
view details)
Built Distribution
parguments-0.3.0-py2.7.egg
(9.1 kB
view details)
File details
Details for the file parguments-0.3.0.tar.gz
.
File metadata
- Download URL: parguments-0.3.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c53c2e83cb57271e91e7611b929f69ea438c761080c9e074aa4438a709050dd9 |
|
MD5 | 8d6040684ae065897054d59d9aa6eee8 |
|
BLAKE2b-256 | 12fd8f913cb183cf83ddbb22c4d267d94e3800e6cb51b4c1ffe477db3c8439de |
File details
Details for the file parguments-0.3.0-py2.7.egg
.
File metadata
- Download URL: parguments-0.3.0-py2.7.egg
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 169f1ef23486fc9668c9910e2f6335206b615d21e44e90588ebbb7547b2e6f38 |
|
MD5 | 5d0e6bff784e46039c690e395059522c |
|
BLAKE2b-256 | 7b147d06ed644de4a7ad529993a1264eb0b9b494649de0e6494b71ed91a67cc0 |