Metadata-Version: 2.4
Name: minimindslab-ini-key-diff
Version: 0.1.0
Summary: Compare two INI documents and report added, removed, and changed keys per section with deterministic output.
Author: MiniMindsLab
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab INI Key Diff

A tiny offline Python library to compare two INI documents and report added, removed, and changed keys per section with deterministic output.

## Features

- Pure Python, standard library only
- Preserves section and key casing
- Deterministic output ordering
- Handles:
  - empty sections
  - repeated sections (merged by INI semantics)
  - whitespace around `=` in key/value lines

## Installation

```bash
pip install minimindslab-ini-key-diff
```

## Usage

```python
from minimindslab_ini_key_diff import diff_ini_strings

left = """
[Core]
mode = safe
old = 1

[Empty]
"""

right = """
[Core]
mode = fast
new = 2

[Empty]
"""

result = diff_ini_strings(left, right)
print(result)
```

Example result:

```python
{
  'sections': [
    {
      'section': 'Core',
      'added': [{'key': 'new', 'value': '2'}],
      'removed': [{'key': 'old', 'value': '1'}],
      'changed': [{'key': 'mode', 'from': 'safe', 'to': 'fast'}]
    }
  ]
}
```

## API

- `diff_ini_strings(left_ini: str, right_ini: str) -> dict`

Raises `TypeError` if either input is not a string.

## License

MIT
