mbdevpl / argunparse

Reversed argparse: generate string of command-line args from Python objects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

argunparse

Reversed argparse: generate string of command-line args from Python objects.

package version from PyPI

build status from GitHub

test coverage from Codecov

grade from Codacy

license

The argunparse is intended to perform an approximate reverse of what argparse does. In short: generating string (or a list of strings) of command-line arguments from a dict and/or a list.

How to use

Simple example of how argunparse works:

Special option values are:

  • True -- option will be treated as a flag;
  • False and None -- option will be ignored.

All other values will be converted to strings using str().

For more examples see examples.ipynb notebook.

Requirements

Python version 3.8 or later.

Python libraries as specified in requirements.txt.

Building and running tests additionally requires packages listed in requirements_test.txt.

Tested on Linux, macOS and Windows.

Installation

For simplest installation use pip:

About

Reversed argparse: generate string of command-line args from Python objects.

License:Apache License 2.0


Languages

Language:Python 68.3%Language:Jupyter Notebook 26.6%Language:Dockerfile 5.0%