--- id: kconfiglib version: "14.1.0" license: ISC license_treatment: permissive maintenance: dormant --- # kconfiglib — A flexible Python Kconfig implementation License: permissive · Maintenance: dormant · Downloads: 1.4M/mo ## What it is and what it does Kconfiglib is a complete Kconfig parser and implementation written in pure Python, designed to replace or supplement the C-based Kconfig tools used in Linux kernel builds and embedded systems projects. It parses Kconfig files, evaluates configuration dependencies and constraints, and provides both programmatic access via its library API and interactive command-line interfaces (menuconfig, guiconfig) for editing configurations. The library supports the Kconfig preprocessor syntax, environment variable expansion, and generates C headers from configuration selections—making it suitable for build automation, documentation generation, and embedded system configuration workflows. The package is self-contained with no third-party dependencies, runs on Python 2.7 and 3.2+, and is used in production by major projects like Zephyr RTOS, ESP-IDF, and ACRN. It includes a suite of command-line utilities (oldconfig, defconfig, allnoconfig, genconfig, setconfig, and others) that mirror the behavior of traditional Kconfig tools, allowing developers to script configuration workflows or integrate Kconfig handling into custom build systems. Use it for: - Parse and programmatically query Kconfig files in embedded firmware projects to extract symbol definitions and dependencies. - Generate C configuration headers at build time from Kconfig selections using the genconfig utility. - Provide an interactive terminal or GUI menuconfig interface for end-users to configure embedded systems or kernel options. - Automate configuration management in CI/CD pipelines by setting or validating Kconfig symbols via the setconfig or oldconfig utilities. - Generate Kconfig cross-reference documentation by leveraging the library's robust parser instead of brittle ad-hoc text parsing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Kconfiglib is a Python implementation of the Kconfig configuration language used in Linux kernel builds and embedded systems, providing both a library API and command-line tools for parsing, generating, and interactively editing Kconfig files. Yes, if you work with Kconfig files in embedded systems, kernel builds, or projects using Zephyr, esp-idf, or similar frameworks. The package is production-stable, dependency-free, and widely trusted. No, if you require active maintenance or compatibility guarantees with the latest kernel versions—the last release was January 2020 and maintenance is dormant. For most use cases, the stable feature set and lack of dependencies make it a safe choice despite the age. ## Install pip install kconfiglib uv add kconfiglib poetry add kconfiglib ## Installing kconfiglib Before you install: Low friction: pure Python with no runtime dependencies. Dormant maintenance (last release January 2020, last commit September 2023), but the package is marked Production/Stable and widely used by established projects like Zephyr, esp-idf, and ACRN, suggesting it is feature-complete rather than abandoned. License in practice: ISC license is permissive and poses no restrictions on commercial or proprietary use. You may use, modify, and distribute this package freely with minimal obligations. Quickstart: pip install kconfiglib import kconfiglib kconf = kconfiglib.Kconfig('path/to/Kconfig') for symbol in kconf.defined_symbols: print(symbol.name, symbol.str_value) For terminal menuconfig on Windows, windows-curses must be installed separately (no longer bundled); on other platforms, curses is typically available in the standard library. Verify before relying: - Whether the dormant maintenance status (2+ years since last release) affects compatibility with recent Linux kernel versions or modern Python environments. - Current test coverage and whether the package is actively tested against Python 3.9+. ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kconfig parser python, kernel configuration management, menuconfig terminal interface, kbuild configuration tool, embedded system config, kconfig implementation, configuration file generation, kconfig-parser, embedded-systems, build-automation [View on SkillFed](https://skillfed.io/packages/kconfiglib) · [View on PyPI](https://pypi.org/project/kconfiglib/)