Fill in missing data that is inherited by a reference field in a flat list of dictionaries without inheritance depth limit.
Project description
InheritsON
Fill in missing data that is inherited by a reference field in a flat list of dictionaries without inheritance depth limit.
Name is a portmanteau of Inheritance and JSON.
Usage
>>> from inheritson import fill
>>> fill([{"id": "parent", "common": "value"}, {"id": "child", "parent_id": "parent"}, {"id": "grandchild", "parent_id": "child"}])
[{'id': 'parent', 'common': 'value'}, {'id': 'child', 'common': 'value', 'parent_id': 'parent'}, {'id': 'grandchild', 'common': 'value', 'parent_id': 'child'}]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inheritson-0.0.3.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for inheritson-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f141b52a9fe5c403cfefe8d69e8943a4b604a669898ff6685f2a60dd168341 |
|
MD5 | 4dfa88b8ac4a21596054a5add6778d5f |
|
BLAKE2b-256 | 8ca1f4ee91371a1344e140719c8dc4b668567f3e0b75f52e5a1139eb467bf1f3 |