Skip to main content

argunparse is intended to perform approximate reverse of argparse

Project description

package version from PyPI build status from Travis CI test coverage from Coveralls code health from Landscape code GPA from Code Climate issue count from Code Climate 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.

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.

Project details


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

argunparse-0.1.0.dev0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page