initools

0.3.1 · abandoned · verified Fri Apr 17

initools is a Python library for parsing INI-style configuration files, providing convenient attribute-like access to configuration values. It was last released in 2013 (version 0.3.1) and is no longer actively maintained, making it effectively abandoned. For new projects, the standard library's `configparser` module is recommended.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to parse an INI string using `IniConfig` and access its values via both attribute and dictionary-like notation.

import io
from initools.ini import IniConfig

ini_string = """
[server]
host = 127.0.0.1
port = 8080

[database]
type = postgres
user = admin
"""

# Parse the INI string
config = IniConfig(io.StringIO(ini_string))

# Access values using attribute-like syntax
print(f"Server Host: {config.server.host}")
print(f"Database Type: {config.database.type}")
print(f"Database User: {config.database.user}")

# Access values using dictionary-like syntax
print(f"Server Port: {config['server']['port']}")

view raw JSON →