Skip to content

klen/inirama

Repository files navigation

logo Inirama

Inirama -- Simplest parser for INI-style files.

Features:

  • One single module;
  • No requirements;
  • Tiny interface;
  • Supports variable interpolation;
Build Status Coverals Version Downloads Donate

Docs are available at https://inirama.readthedocs.org/. Pull requests with documentation enhancements and/or fixes are awesome and most welcome.

  • python (2.6, 2.7, 3.2, 3.3)

Inirama could be installed using pip:

pip install inirama
from inirama import Namespace

ns = Namespace()
ns.read('config.ini')

print ns['section']['key']

ns['other']['new'] = 'value'
ns.write('new_config.ini')
from inirama import InterpolationNamespace

ns = InterpolationNamespace()
ns.parse("""
    [main]
    test = value
    foo = bar {test}
    more_deep = wow {foo}
""")
print ns['main']['more_deep']  # wow bar value

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/inirama/issues

Development of inirama happens at github: https://github.com/klen/inirama

  • klen (Kirill Klenov)

Licensed under a BSD license.

About

Simple INI parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •