--- id: libconf version: "2.0.1" license: MIT license_treatment: permissive maintenance: abandoned --- # libconf — A pure-Python libconfig reader/writer with permissive license License: permissive · Maintenance: abandoned · Downloads: 167.9K/mo ## What it is and what it does Libconf is a pure-Python reader and writer for libconfig format files, which are configuration files commonly used in C/C++ projects. It provides four main methods—load(), loads(), dump(), and dumps()—modeled directly after Python's json module, making it familiar to Python developers. The library parses libconfig syntax into Python dictionaries and tuples, allowing access to configuration values via both dictionary indexing and attribute notation. The package handles the nuances of libconfig's type system, including the distinction between 32-bit and 64-bit integers, and between lists (Python tuples) and arrays (Python lists). It supports character encoding with escape sequence handling and provides wrapper classes (LibconfInt64, LibconfList, LibconfArray) for fine-grained control over output formatting when writing configuration files back to disk. Use it for: - Parse configuration files from C/C++ applications into Python for programmatic access or modification - Generate libconfig-formatted configuration files from Python data structures for use by C/C++ programs - Migrate or convert libconfig files between different systems or applications that use the format - Read and validate libconfig settings in Python-based deployment or configuration management tools ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and writes configuration files in libconfig format, a format commonly used in C/C++ projects, with an API modeled after Python's json module. Yes, if you need to work with libconfig format files and can accept that the package is no longer maintained. The library is stable, has no dependencies, installs cleanly, and carries no known vulnerabilities. However, any bugs or compatibility issues with future Python or libconfig versions will not be addressed. ## Install pip install libconf uv add libconf poetry add libconf ## Installing libconf Before you install: Installation is straightforward with no runtime dependencies. However, the package has been abandoned since its last release on 2019-11-21, with no maintenance activity since. License in practice: Licensed under MIT (permissive), so there are no restrictions on commercial or proprietary use. Quickstart: import libconf # Read a libconfig file with open('example.cfg') as f: config = libconf.load(f) # Access values via indexing or attributes print(config['window']['title']) print(config.window.title) # Write configuration output = libconf.dumps({'size': [10, 15], 'flag': True}) print(output) Verify before relying: - Whether the package works reliably with Python versions beyond 3.8 (classifiers list 3.8 as the latest tested version) - Current compatibility with modern libconfig C library versions and any breaking changes in the libconfig format since 2019-11-21 ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 167.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags libconfig format parser, configuration file reader writer, c++ config file python, libconfig python library, parse libconfig files, config-parser, libconfig [View on SkillFed](https://skillfed.io/packages/libconf) · [View on PyPI](https://pypi.org/project/libconf/)