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.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for inheritson-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c8a0fc4c530c0ea8645d7a2627dc0b627b60cb3bec4f2de682db3c2a88e2a72 |
|
MD5 | a14989da478f0f5251ddbebfa284c8fa |
|
BLAKE2b-256 | 71b5fa3577783c052115fadcab303a54ff1f2c3d8d517dd3be3623706be1351f |