Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple INI parser

branch: develop

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Changelog
Octocat-spinner-32 DESCRIPTION
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.rst
Octocat-spinner-32 inirama.py
Octocat-spinner-32 setup.py
Octocat-spinner-32 tests.py
Octocat-spinner-32 tox.ini
README.rst

logo Inirama

Inirama -- Simplest parser for INI files. Useful for project integration, one file and interface is pretty nice.

Features:

  • One single file;
  • Tiny interface;
  • Interpolation support;
  • No dependencies from python modules;
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.

Requirements

  • python (2.6, 2.7, 3.2, 3.3)

Installation

Inirama should be installed using pip:

pip install inirama

Quickstart

from inirama import Namespace

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

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

ns['other']['new'] = 'value'
ns.write('new_config.ini')

Interpolation

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

Bug tracker

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

Contributing

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

Contributors

  • klen (Kirill Klenov)

License

Licensed under a BSD license.

Something went wrong with that request. Please try again.