Skip to main content

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


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)

Uploaded Source

Built Distribution

inheritson-0.0.3-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page