Skip to main content

argunparse is intended to perform approximate reverse of argparse

Project description

package version from PyPI build status from Travis CI build status from AppVeyor grade from Codacy test coverage from Codecov license

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.

how to use

Simple example of how argunparse works:

import argunparse

options = {
    'v': True,
    'long-flag': True,
    'o': 'out_file.txt',
    'log': 'log_file.txt'
args = {

unparser = argunparse.ArgumentUnparser()
print(unparser.unparse(*args, **options))
# -v --long-flag -o=out_file.txt --log=log_file.txt in_file.txt

print(unparser.unparse_to_list(*args, **options))
# ['-v', '--long-flag', '-o=out_file.txt', '--log=log_file.txt', 'in_file.txt']

for more examples see examples.ipynb notebook.


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.


For simplest installation use pip:

pip3 install argunparse

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
argunparse-0.1.1-py3-none-any.whl (4.0 kB) Copy SHA256 hash SHA256 Wheel py3
argunparse-0.1.1.tar.gz (15.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page