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
Python >= 3.5.
No other runtime dependencies.
However, building and running tests requires packages listed in test_requirements.txt.
Tested on Linux, OS X and Windows.
installation
For simplest installation use pip
:
pip3 install argunparse
usage
Simple example of how argunparse works:
import argunparse
options = {
'v': True,
'long-flag': True,
'o': 'out_file.txt',
'log': 'log_file.txt'
}
args = {
'in_file.txt'
}
unparser = argunparse.ArgumentUnparser()
print(unparser.unparse(*args, **options))
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 Distribution
argunparse-0.1.0.tar.gz
(13.3 kB
view hashes)
Built Distribution
Close
Hashes for argunparse-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629660e2cd2994246073392c6ea2ffbf8c1a3a87d7a20eefde1074d5eed0740d |
|
MD5 | 7b2b9d03cf1f8340f267b33130c5eaa8 |
|
BLAKE2b-256 | 1fd171017b5661c6ef29c1efde5021d0ec0c9a25e4d23aafdec176ab127c55e8 |