skip to navigation
skip to content

iniget 0.3.0

A command-line tool to extract, normalize, and JSONify values from an iniherit-enabled "INI" file.

Latest Version: 0.4.2

A command-line tool to extract, normalize, and JSONify values from an iniherit -enabled “INI” file.


$ pip install iniget


Given the following two files, base.ini:

foo = bar

and config.ini:

%inherit = base.ini

The following will extract the inherited foo value:

$ iniget config.ini sect1 foo

Much more is possible, including:

  • listing sections
  • listing options
  • JSON-encoding the configuration
  • JSON-interpreting option values
  • Control case-sensitivity, interpolation, and default values


  • -s SECTION, --section SECTION:

    Specify additional sections to extract from; can be specified multiple times to add multiple sections.

  • -C, --no-case:

    Handle option names case insensitively.

  • -I, --no-inherit:

    Disable processing of “%inherit” directives.

  • -E, --no-expansion:

    Disable ConfigParser option expansion (“interpolation”).

  • -K, --list-options:

    List the option names only, not the values.

  • -S, --list-sections:

    List the section names only.

  • -J, --json-parse:

    If option values are JSON-parseable, parse as such; additionally, the following are interpreted as boolean values: ‘yes’, ‘true’, ‘on’, ‘off’, ‘no’, ‘false’.

  • -j, --json-output:

    Render the output using JSON syntax.

  • -d JSON, --defaults JSON:

    Set the ConfigParser default values from this JSON-parsed dictionary.

  • -r, --raw:

    Don’t do anything fancy: show exactly what ConfigParser interprets (requires exactly one section and one option); note that options “–no-case”, “–no-inherit”, “–no-expansion” and “–defaults” are still honored, but “–json-parse” is not.

File Type Py Version Uploaded on Size
iniget-0.3.0.tar.gz (md5) Source 2014-03-27 7KB