Metadata-Version: 2.3
Name: hydraters
Version: 0.0.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
License-File: LICENSE
Summary: Hydrate Python dictionaries with Rust.
Author-email: David Bitner <bitner@dbspatial.com>, Pete Gadomski <pete.gadomski@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/gadomski/hydraters

# hydraters

Hydrate Python dictionaries with Rust.
A general-purpose algorithm, used in [pgstac](https://github.com/stac-utils/pgstac) to reduce the size of the `items` table.

```python
import hydraters

base = {"a": "first", "b": "second", "c": {"d": "third"}}
item = {"c": {"e": "fourth", "f": "fifth"}}
result = hyrdraters.hydrate(base, item)
assert result == {
    "a": "first",
    "b": "second",
    "c": {"d": "third", "e": "fourth", "f": "fifth"},
}
```

## Installation

```shell
python -m pip install hydraters
```

## Background

The code for this package was taken from [pypgstac](https://github.com/stac-utils/pgstac/blob/f1d71d5e00392acb970e3b19a62d5f1aa8d50cc6/src/pypgstac/src/lib.rs).
It came from some [benchmarking](https://github.com/gadomski/json-hydrate-benchmark) that determined it was much faster to do this operation in Rust than in pure Python.

## License

MIT

