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.2.tar.gz
(5.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
parguments-0.3.2-py2.7.egg
(9.0 kB
view details)
File details
Details for the file parguments-0.3.2.tar.gz.
File metadata
- Download URL: parguments-0.3.2.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a58340fa8578aba50243e57399ec9efaf77f5e0c47c2c3435ec38d9cefec528f
|
|
| MD5 |
38d35c856d65c0ed9da383de80b56b6c
|
|
| BLAKE2b-256 |
3118fc5de25e446e16088eed5ca9fc9953645ab8cf6e3e50f90f85c2a0bdd1b2
|
File details
Details for the file parguments-0.3.2-py2.7.egg.
File metadata
- Download URL: parguments-0.3.2-py2.7.egg
- Upload date:
- Size: 9.0 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8676bd877596233d82ae29359eb22a62bc6f06793cfe4d6c3b880ea73a02060
|
|
| MD5 |
f9adaa84f8a98ce534173924a6d3ee97
|
|
| BLAKE2b-256 |
3b9854faf9a63762973f25f5475aadcfdcf9c7e4b2462cff91bdd203eb0f41a2
|