Inirama -- Simplest parser for INI files. Interpolation supported.
Project description
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;
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Inirama-0.5.1.tar.gz
.
File metadata
- Download URL: Inirama-0.5.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2892853ac0dde6da11a495cbed0f7d756d4c6ea2ecb27f7a6cef461b76a3eead |
|
MD5 | cfb9de03be77a8b44adadbf98ca9a244 |
|
BLAKE2b-256 | ab8a72cd69ae8b09518413c720d0172cbd5e847c62135221976e7aeca401dc62 |