skillfed

esp-bool-parser

Tools for building ESP-IDF related apps.

esp-bool-parser v0.2.3 152.7K downloads/30d#10,896 on PyPI
Permissive license Active released

What it is and what it does

esp-bool-parser is a utility for parsing and evaluating boolean expressions used in ESP-IDF (Espressif IoT Development Framework) configuration files. It reads boolean statements from soc_caps files, parses them into an evaluable form, and stores the results as constants for use in chip attribute lookups. The package depends on pyparsing for expression parsing and packaging for version handling.

The main use case is evaluating conditional logic tied to ESP chip targets and configuration names. You can parse a boolean expression like `IDF_TARGET == "esp32"` and then call `get_value()` with a target name and config identifier to determine if the expression evaluates to true. Additionally, you can register custom attribute handlers to extend the parser's behavior when it encounters new or overridden attributes during evaluation.

Use it for:

  • Evaluate ESP-IDF target-specific configuration conditionals during build or runtime chip detection
  • Parse soc_caps files to extract and cache chip capability flags as constants for application logic
  • Register custom attribute handlers to inject domain-specific evaluation logic into boolean expressions
  • Build ESP32 or other Espressif chip tooling that needs to conditionally apply settings based on target type

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and evaluates boolean expressions from ESP-IDF configuration files, with support for registering custom attribute handlers to extend evaluation logic.

Yes. The package is actively maintained, has no known vulnerabilities, supports a wide range of Python versions (3.7–3.14), and carries a permissive Apache license. Install friction is low with only two common dependencies. It is purpose-built for ESP-IDF workflows and is worth installing if you are working with Espressif chip configuration or build systems.

Install

esp-bool-parser on PyPI

pip

pip install esp-bool-parser

uv

uv add esp-bool-parser

poetry

poetry add esp-bool-parser

Installing esp-bool-parser

Before you install

Low install friction with only two lightweight runtime dependencies (pyparsing and packaging). Active maintenance status with recent releases.

License in practice

Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install esp-bool-parser

from esp_bool_parser import parse_bool_expr, register_addition_attribute

stmt = parse_bool_expr('IDF_TARGET == "esp32"')
result = stmt.get_value("esp32", "config_name")

Verify before relying

  • Whether the package works with ESP-IDF versions beyond the current release cycle
  • Performance characteristics when parsing large or deeply nested boolean expressions
  • Specific error handling and exception types raised during parsing failures

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pyparsing, packaging
Maintenance actively maintained — 149 days since the last release
First released
Downloads 152,670/month — #10,896 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: esp_bool_parser-0.2.3-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

ESP-IDF boolean expression parserparse boolean statements ESPchip attribute configuration parserESP32 config file parserboolean logic evaluator
esp-idfembedded-systemsconfiguration-parser

More Build Tools packages