--- id: python-benedict version: "0.38.0" license: MIT License Copyright (c) 2019-present Fabio Caccamo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) license_treatment: permissive maintenance: active --- # python-benedict — python-benedict is a dict subclass with keylist/keypath/keyattr support, normalized I/O operations (base64, csv, ini, json, pickle, plist, query-string, toml, xls, xml, yaml) and many utilities... for humans, obviously. License: permissive · Maintenance: active · Downloads: 1.5M/mo ## What it is and what it does python-benedict is a drop-in dict subclass that extends Python dictionaries with three main conveniences: keypath access (using dot notation like `d["a.b.c"]`), attribute-style access (like `d.a.b.c`), and keylist access (using lists of keys). It also normalizes I/O operations across common data formats—JSON, YAML, CSV, XML, TOML, INI, HTML, pickle, plist, base64, and query-strings—allowing you to load and save data from files, URLs, or S3 with a single method call. Because it's a true dict subclass, you can wrap existing dictionaries without breaking code that expects a dict. The package includes utility methods for common operations like flattening, merging, filtering, and searching nested structures. It's fully backward-compatible and well-tested, with optional Pydantic v2 schema validation available when needed. Use it for: - Load configuration from JSON, YAML, or TOML files and access nested values using dot notation instead of chained bracket access. - Parse CSV or query-string data into a dict-like object and traverse results using keypath syntax with list-index support. - Transform data between formats (e.g., read XML, manipulate as a dict, export as JSON) using unified I/O methods. - Build dynamic nested structures using attribute assignment (with keyattr_dynamic=True) without pre-creating intermediate dicts. - Flatten or unflatten nested dictionaries for database storage or API payloads using built-in utility methods. - Integrate into Django views to parse request parameters with type coercion (e.g., get_int, get_decimal). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A dict subclass that adds dot-notation access, keypath queries, and normalized I/O for formats like JSON, YAML, CSV, XML, and others. Yes. Low install friction, active maintenance, permissive MIT license, no known vulnerabilities, and a well-established codebase (since 2019) with solid adoption. Install it if you work frequently with nested dicts, multi-format data loading, or want cleaner syntax for accessing deeply nested values—the keypath and I/O features alone justify it for data-heavy applications. ## Install pip install python-benedict uv add python-benedict poetry add python-benedict ## Installing python-benedict Before you install: Low friction install with only two runtime dependencies (python-slugify and typing_extensions). Active maintenance with a recent release 38 days ago and 1609 repository stars. License in practice: MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: from benedict import benedict # Create from dict or data source d = benedict({"profile": {"name": "Alice"}}) # Access via keypath (dot notation) name = d["profile.name"] # Or via attribute access name = d.profile.name Verify before relying: - Whether optional I/O backends (S3, URL, filesystem) require additional system dependencies beyond the listed runtime deps - Performance characteristics when working with deeply nested structures or large datasets - Compatibility with non-string dictionary keys and edge cases in keypath parsing ## Package facts - License: MIT License Copyright (c) 2019-present Fabio Caccamo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags dict with dot notation access, keypath dictionary queries, multi-format data loading, nested dict traversal, json yaml csv xml dict, attribute-style dict access, dictionary utility library, data-transformation, config-management, dict-utilities [View on SkillFed](https://skillfed.io/packages/python-benedict) · [View on PyPI](https://pypi.org/project/python-benedict/)