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.2.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for inheritson-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1af4424d3ae3a634bd401ca6f58fefd4d5ae4bc7d44d52fee7e987b76b671f0 |
|
MD5 | 78f54ea71afff6fb0365ae80bc284442 |
|
BLAKE2b-256 | f8f5d273a3ba9f5f8480ed670af4cc6bf8b613af8c8a28135cbcd590f0a1b29f |