skillfed

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.

python-benedict v0.38.0 1.5M downloads/30d#3,870 on PyPI1,609
Permissive 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) Active released

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 on this page — 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

python-benedict on PyPI

pip

pip install python-benedict

uv

uv add python-benedict

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — python-slugify, typing_extensions
Maintenance actively maintained — 38 days since the last release
Last repo commit
First released
Downloads 1,470,710/month — #3,870 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_benedict-0.38.0-py3-none-any.whl

Keywords: python, dictionary, dictionaries, dict, benedict, subclass, extended, keylist, keypath, utility, io, data, file, url, read, write, parse, configparser, config, cfg, pickle, plist, base64, csv, html, ini, json, query-string, toml, xml, yaml, clean, clone, deepclone, deepupdate, dump, filter, flatten, groupby, invert, merge, move, nest, remove, rename, search, standardize, subset, swap, traverse, unflatten, unique

Development Status :: 5 - Production/StableEnvironment :: MacOS XEnvironment :: Other EnvironmentEnvironment :: Web EnvironmentEnvironment :: Win32 (MS Windows)Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Education :: TestingTopic :: Software Development :: Build ToolsTopic :: System :: FilesystemsTopic :: Text Processing :: Markup :: XMLTopic :: UtilitiesTyping :: Typed

Tags

dict with dot notation accesskeypath dictionary queriesmulti-format data loadingnested dict traversaljson yaml csv xml dictattribute-style dict accessdictionary utility library
data-transformationconfig-managementdict-utilities

More Utilities packages