{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"}],"enrichment":{"capability":"Provides nested attribute access and modification on objects, lists, and dictionaries using a dot-and-bracket notation string, without eval.","skillfed_tags":["object-introspection","data-access"],"use_cases":["Retrieve or modify configuration nested in dictionaries and objects without manual traversal.","Update deeply nested properties in data models or ORM objects via a single path string.","Delete attributes or list items at arbitrary depths in a complex object tree.","Parse and apply user-provided paths to objects without the security risk of eval."],"what_it_does":"Magicattr extends Python's getattr and setattr to work on deeply nested structures\u2014objects with attributes, lists, and dictionaries\u2014by parsing a path string into an abstract syntax tree and evaluating it safely without using eval. Instead of raising a generic AttributeError, it preserves the actual failure cause, making debugging easier.\n\nThe package is useful when you need to read or write values deep within a complex object hierarchy using a single string path, such as `'friends[0].settings[\"style\"][\"width\"]'`. It supports get, set, and delete operations on combinations of object attributes, list indices (including negative indexing), and dictionary keys. It explicitly blocks unsafe operations like function calls, expressions, and slicing.","worth_installing":"Yes, if you need safe nested attribute access and can accept an abandoned package. The code is simple and has no dependencies, so the risk of breakage is low for stable use cases. However, do not rely on it for new projects requiring active maintenance or support for future Python versions\u2014consider it a utility for existing codebases where the feature set is complete and stable."},"id":"magicattr","links":{"html":"https://skillfed.io/packages/magicattr","md":"https://skillfed.io/packages/magicattr.md","pypi":"https://pypi.org/project/magicattr/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2022-01-25","license_spdx":null,"license_treatment":"permissive","name":"magicattr","python_support":"unspecified","summary":"A getattr and setattr that works on nested objects, lists, dicts, and any combination thereof without resorting to eval"},"popularity":{"monthly_downloads":5930589,"position":2008,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.1.6"}
