Command-line generator from a dictionary.
Project description
This module is a wrapper to argparse module. Its goal is to generate a custom and advanced command-line from a formatted dictionary. As python dictionnaries are easily exportable to a file like YAML or JSON, the idea is to outsource the command-line definition to a file instead of writing dozens or hundreds lines of code.
Code is available on Github (http://github.com/fmenabe/python-clg).
Documentation is available on readthedocs (https://clg.readthedocs.org/en/latest/).
Releases notes
1.0
Rewrite module for matching at best argparse
Allow bultins
Remove compatibility to python2.6 (because of dict comprehension)
0.5
Port code to Python 3 (with compatiblity at least until Python 2.6)
0.4
Add description of parser (via desc keyword).
0.3
Add an iterable and accessible namespace for arguments.
Change behaviour of parse method (now return a namespace with arguments).
Set default value for list type to empty list.
Change behaviour of the execution of an external module. It is no longer a python path of a module in ‘sys.path’ but directly the path of a file. In addition, keyword ‘lib’ has be replaced by ‘path’.
Replace ‘__FILE__’ in default value of an option by the directory of the program.
Update the license to MIT.
0.2
CommandLine object doesn’t take anymore a JSON or YAML file but a dictionary.
Add documentation.
Updating setup for PyPi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file clg-1.0.tar.gz
.
File metadata
- Download URL: clg-1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b601fcf2eeb762f2f547f7baabd7e4c8c948319bd5623599af5f4c30fa8fca45 |
|
MD5 | a7bb1ede5711f6061c966a5d07cdf273 |
|
BLAKE2b-256 | c019de6fc128d2ccc4f0c091ec4037839318f44a1b71014c3ed1baa230edc38b |