Tools for building ESP-IDF related apps.
Project description
esp-bool-parser
esp-bool-parser is a package that provides a way to process boolean statements based on soc_caps files in the ESP-IDF.
It helps you locate soc_headers files in the ESP-IDF, parse them, and store the parsed values as constants, which are then used in ChipAttr.
When you import esp_bool_parser, you will gain access to the following functions:
Key Functions
parse_bool_expr(stmt: str)
Parses a boolean expression.
-
Parameters:
stmt(str): A string containing the boolean expression.
-
Returns:
- A parsed representation of the boolean expression.
-
Usage Example:
stmt_string = 'IDF_TARGET == "esp32"' stmt = parse_bool_expr(stmt_string) result = stmt.get_value("esp32", "config_name")
register_addition_attribute(attr: str, action: t.Callable[..., t.Any]) -> None
Registers an additional attribute for ChipAttr.
You can extend the functionality of ChipAttr by adding custom handlers for new attributes.
Use the register_addition_attribute function to register additional attributes.
When these attributes are encountered, the associated handler function will be called.
Additionally, you can override existing attributes, as the newly registered handler will take priority over the original ones.
-
Parameters:
attr(str): The name of the additional attribute.action(Callable): A callable that processes**kwargs. Thetargetandconfig_nameparameters will be passed askwargswhen the attribute is detected.
-
Usage Example:
def my_action(target, config_name, **kwargs): # Custom logic to handle the attribute print(f"Processing {target} with {config_name}") return target register_addition_attribute("CUSTOM_ATTR", my_action)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lala_esp_bool_parser-0.1.1.tar.gz.
File metadata
- Download URL: lala_esp_bool_parser-0.1.1.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8076f18100bc64d7e6f6320ba0d416f05c6340cfa4372ce9b64df3caf9fd2618
|
|
| MD5 |
1d6cdbfb08d54f1c37443b14bca4edb0
|
|
| BLAKE2b-256 |
d7404f634ac862f97aa9ee6521f3cf6870876b910fc2a7b0035d8a08c086ebc5
|
Provenance
The following attestation bundles were made for lala_esp_bool_parser-0.1.1.tar.gz:
Publisher:
publish-pypi.yml on horw/esp-bool-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lala_esp_bool_parser-0.1.1.tar.gz -
Subject digest:
8076f18100bc64d7e6f6320ba0d416f05c6340cfa4372ce9b64df3caf9fd2618 - Sigstore transparency entry: 159801949
- Sigstore integration time:
-
Permalink:
horw/esp-bool-parser@88dff99b6908736555ca08680a570c6153255f73 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/horw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@88dff99b6908736555ca08680a570c6153255f73 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lala_esp_bool_parser-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lala_esp_bool_parser-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96cd37ac219f1ee0d27a7c8e7e813be53282ba3b5195ac7fb4c88e7e4895de0c
|
|
| MD5 |
6d53a98a302a05452b6d8ca9c20beee0
|
|
| BLAKE2b-256 |
b5f0b0ea53029e18116ab9fc2e7c2d0708b0f82d30c02192268cc89fb9dd3bdf
|
Provenance
The following attestation bundles were made for lala_esp_bool_parser-0.1.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on horw/esp-bool-parser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lala_esp_bool_parser-0.1.1-py3-none-any.whl -
Subject digest:
96cd37ac219f1ee0d27a7c8e7e813be53282ba3b5195ac7fb4c88e7e4895de0c - Sigstore transparency entry: 159801951
- Sigstore integration time:
-
Permalink:
horw/esp-bool-parser@88dff99b6908736555ca08680a570c6153255f73 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/horw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@88dff99b6908736555ca08680a570c6153255f73 -
Trigger Event:
push
-
Statement type: