This repository has been archived on 2026-03-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
jakob.scheid d34c40e52a neue Datei: .gitignore
neue Datei:     pyproject.toml
	umbenannt:      config_parser.py -> src/config_parser/__init__.py
	neue Datei:     src/config_parser/__main__.py
2026-02-02 13:59:37 +01:00
2026-02-02 13:59:37 +01:00
2026-02-02 13:59:37 +01:00
2026-02-02 13:59:37 +01:00
2026-02-02 13:43:19 +01:00

config-parser

A library to parse configuration files. Currently it supports only INI format, but support for other formats is planned.

Installation

You can install the library using pip:

pip install config-parser --index-url https://jcloud-services.ddns.net/simple/

Usage

Here's a simple example of how to use the config-parser library to read an INI configuration file:

from config_parser import parse_ini

with open('config.conf', 'r') as file:
    config_content = file.read()

parsed = parse_ini(config_content)
print(parsed)

If the configuration file content is:

[section1]
key1=value1
key2=value2

[section2]
hello=world

[section3]
key=value

the result will be {'section1': {'key1': 'value1', 'key2': 'value2'}, 'section2': {'hello': 'world'}, 'section3': {'key': 'value'}}

S
Description
A library to parse configuration files.
Readme 78 KiB
Languages
Python 99.1%
Shell 0.9%