argunparse is intended to perform approximate reverse of argparse
Project description
The argunparse is intended to perform an approximate reverse of what argparse does. In short: generating string of command-line arguments from a dict and/or a list.
requirements
This package is intended for Python 3.5 and later. It was tested on 64 bit Ubuntu, but it might work on other systems too.
installation
For simplest installation use pip
:
pip3.5 install argunparse
You can also build your own version:
git clone https://github.com/mbdevpl/argunparse
cd argunparse
python3.5 -m unittest discover # make sure the tests pass
python3.5 setup.py bdist_wheel
ls -1tr dist/*.whl | tail -n 1 | xargs pip3.5 install
usage
Simple example of how argunparse works:
import argunparse
flags = {
'v': True,
'long-flag': True,
'o': 'out_file.txt',
'log': 'log_file.txt'
}
args = {
'in_file.txt'
}
unparser = argunparse.ArgumentUnparser()
print(unparser.unparse_args(flags, args))
for more examples see examples.ipynb
notebook.
links
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for argunparse-0.1.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeed4cd821284337ec2038682e9a07a11cbad580a29ac98cd22cb475ec3d6fe8 |
|
MD5 | 84d82c170eb40483579b3bf1ae96b40f |
|
BLAKE2b-256 | 7aa6d4fc9ff8896832a03bbe1d69cc675bea232d173bdf42991af750e626232a |