{"id":24244,"library":"plucky","title":"plucky","description":"Plucking (deep) keys/paths safely from python collections has never been easier. Version 0.4.3. Low activity, last release Jul 2021.","status":"maintenance","version":"0.4.3","language":"python","source_language":"en","source_url":"https://github.com/randomir/plucky","tags":["pluck","deep-get","nested-dict","data-access"],"install":[{"cmd":"pip install plucky","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"pluck","correct":"from plucky import pluck"},{"note":"","wrong":null,"symbol":"set_keys","correct":"from plucky import set_keys"}],"quickstart":{"code":"from plucky import pluck, set_keys\n\ndata = {'a': {'b': [{'c': 1}, {'c': 2}]}}\n# pluck deep key\nresult = pluck(data, 'a.b.0.c')\nprint(result)  # 1\n\n# set deep key\nset_keys(data, 'a.b.0.c', 42)\nprint(pluck(data, 'a.b.0.c'))  # 42","lang":"python","description":"Basic usage of pluck and set_keys"},"warnings":[{"fix":"Use pluck(data, 'missing.key', default=None) or pluck(data, 'missing.key', safe=True).","message":"pluck raises KeyError by default if path does not exist; use default= or safe=True to avoid exceptions.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Use 'items.0.name' instead of 'items[0].name'.","message":"Path syntax uses dot-separated keys and integer indices for lists (e.g., 'a.0.b'), not bracket notation.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace plucks(data, path) with pluck(data, path, default=...).","message":"The function 'plucks' (plural) is deprecated in favor of 'pluck' with safe=True or default.","severity":"deprecated","affected_versions":">=0.3.0"}],"env_vars":null,"search_vec":"'0.4.3':14 '2021':20 'access':30 'activ':16 'collect':8 'data':29 'data-access':28 'deep':3,23 'deep-get':22 'dict':27 'easier':12 'get':24 'jul':19 'keys/paths':4 'last':17 'low':15 'nest':26 'nested-dict':25 'never':10 'pluck':2,21 'plucki':1 'python':7 'releas':18 'safe':5 'version':13","created_at":"2026-05-01T08:12:02.616786+00:00","updated_at":"2026-05-01T08:12:02.616786+00:00","problems":[{"fix":"Use 'from plucky import pluck' instead of 'import plucky' and plucky.pluck.","cause":"Importing incorrectly (e.g., import plucky then plucky.pluck) but module exposes functions only via direct import.","error":"AttributeError: module 'plucky' has no attribute 'pluck'"},{"fix":"Add default parameter: pluck(data, 'missing.key', default=None).","cause":"Using pluck without a default or safe mode when path doesn't exist.","error":"KeyError: 'missing'"},{"fix":"Ensure path segments for list indices are integers, e.g., 'items.0.name'.","cause":"Path segment is not a valid integer index when accessing a list element.","error":"ValueError: invalid literal for int() with base 10: 'key'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.4.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/randomir/plucky","docs":null,"changelog":null,"pypi":"https://pypi.org/project/plucky/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}