Plucking (deep) keys/paths safely from python collections has never been easier. Version 0.4.3. Low activity, last release Jul 2021.
pip install pluckyVerified import paths — ran on the pinned version, not inferred.
Basic usage of pluck and set_keys
Use pluck(data, 'missing.key', default=None) or pluck(data, 'missing.key', safe=True).
Use 'items.0.name' instead of 'items[0].name'.
Replace plucks(data, path) with pluck(data, path, default=...).
Use 'from plucky import pluck' instead of 'import plucky' and plucky.pluck.
Add default parameter: pluck(data, 'missing.key', default=None).
Ensure path segments for list indices are integers, e.g., 'items.0.name'.
No dependency data recorded yet.