Skip to main content

MiniMindsLab Key Value Parse

A tiny, deterministic parser for simple key=value text.

Features

  • Parses lines in key=value form.
  • 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 TypeError if text is not a string.
  • Raises ValueError for non-empty, non-comment lines without =.
  • Raises ValueError if 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)

Source distribution for minimindslab-key-value-parse 0.1.0
File Size Uploaded Provenance
minimindslab_key_value_parse-0.1.0.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for minimindslab-key-value-parse 0.1.0
File Interpreter ABI Platform
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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page