Metadata-Version: 2.3
Name: dictpress
Version: 0.1.0
Summary: A Python library designed for deep-merging, updating, and compressing dictionaries.
License: MIT
Author: Allen Chou
Author-email: f1470891079@gmail.com
Requires-Python: >=3.11,<4
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: python-benedict
Description-Content-Type: text/markdown

# dictpress

Simple dictionary manipulation utilities for Python.

## Installation

```bash
pip install dictpress
```

## Usage

```python
from dictpress import flatten_dict, unflatten_dict, merge

# Flatten nested dictionaries
data = {"a": {"b": {"c": 1}}, "x": 2}
flattened = flatten_dict(data)
# {"a.b.c": 1, "x": 2}

# Unflatten back to nested structure
nested = unflatten_dict(flattened)
# {"a": {"b": {"c": 1}}, "x": 2}

# Deep merge dictionaries
base = {"a": {"b": 1}, "c": 2}
update = {"a": {"d": 3}, "e": 4}
merged = merge(base, update)
# {"a": {"b": 1, "d": 3}, "c": 2, "e": 4}
```

## API

### `flatten_dict(data: dict) -> dict`

Flatten nested dictionary into single-level with dot notation keys.

### `unflatten_dict(data: dict) -> dict`

Convert flattened dictionary back to nested structure.

### `merge(data: dict, update: dict) -> dict`

Deep merge two dictionaries. Values from `update` take precedence.

