MiniMindsLab Key Value Parse
A tiny, deterministic parser for simple key=value text.
Features
- Parses lines in
key=valueform. - Duplicate keys are resolved by keeping the last value.
- Ignores blank lines and comment lines with configurable prefix.
- Optional trimming of surrounding whitespace for keys/values.
- Pure Python, standard library only.
Installation
pip install minimindslab-key-value-parse
Usage
from minimindslab_key_value_parse import parse_key_value_text
text = """
# sample
host = localhost
port=8080
host=example.com
"""
result = parse_key_value_text(text)
# {'host': 'example.com', 'port': '8080'}
API
parse_key_value_text(text, *, comment_prefix="#", trim_whitespace=True, ignore_blank_lines=True, ignore_comment_lines=True)
Returns a deterministic dict[str, str] parsed from input text.
- Raises
TypeErroriftextis not a string. - Raises
ValueErrorfor non-empty, non-comment lines without=. - Raises
ValueErrorif a parsed key is empty.
License
MIT
Metadata
Release files for minimindslab-key-value-parse 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimindslab_key_value_parse-0.1.0.tar.gz | 3.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_key_value_parse-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / minimindslab_key_value_parse-0.1.0.tar.gz
| Download URL | minimindslab_key_value_parse-0.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ba0a2cf5889826950afe463738fd529f488dab34e92cad7f852c30a806637f5
|
|
BLAKE2b-256 checksum How to use checksums |
3dbf50f62ca9503182e9364dd36f967536ba75ee9104a2f276680c4fe5fd9c15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_key_value_parse-0.1.0-py3-none-any.whl
| Download URL | minimindslab_key_value_parse-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbca8e4a9824595a9a86f012d414b63700957990d7301b00a722370d5d92f19f
|
|
BLAKE2b-256 checksum How to use checksums |
132fc6ac0e794be845eae41d803cfcaf3bd3f3c110a36787e9f826fa743d2644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-key-value-parse 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.