NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #5323 most downloaded on PyPI
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.
Latest stable
0.40.1
Last release 1 months ago
20 Oct 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
74 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Fix items and values returning generators instead of views (no len, single iteration), eg. with toml-rs. #636 (by @Gabrieljr42 in #637)
items and values returning generators instead of views (no len, single iteration), eg. with toml-rs. #636 (by @Gabrieljr42 in #637)benedict instance. (by @helo060228 in #635)update method (eg. update(key=value)). (by @xiehuanyi in #633)BaseDict.get and pop type annotations with fallback values of a different type. (by @xiehuanyi in #632)setuptools version in [build-system].Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix arbitrary code execution: exclude pickle from format auto-detection, it must be requested explicitly with format="pickle" or from_pickle. (GHSA-v3
Python 3.15 support.Python 3.10 support.pickle from format auto-detection, it must be requested explicitly with format="pickle" or from_pickle. (GHSA-v3xm-c46x-phwc) (by @Sengtocxoen)match string patterns: match special characters literally (only * is a wildcard) and prevent catastrophic backtracking (ReDoS). #624match string patterns matching keys with a trailing newline. (by @fhgffy in #619)keypaths discovery and match. (by @xiehuanyi in #620)flatten, unflatten, subset, filter, invert). (by @itzzdev09 in #614)flatten quadratic time complexity (up to ~25x faster on nested data).flatten with indexes=True on benedict instances: flattened keys (eg. a[0]) were parsed as keypaths.BaseDict.setdefault raising AssertionError with omitted or None default. (by @harbinresearcher in #626)benedict(d, key=value)), they are now set on the wrapped dict. (by @sricharanreddycheruku in #627)remove with a single non-string key (eg. remove(0)). (by @xiehuanyi in #628)BaseDict.dict and union operator type annotations to return a plain dict. (by @xiehuanyi in #629)rename and remove with deep=True to traverse nested lists and tuples. (by @xiehuanyi in #616)base64 serializer to keep the Base64 representation ASCII with non-UTF-8 payload encodings. (by @xiehuanyi in #615)ini decoding of valueless options when using allow_no_value=True. (by @ac1982 in #618)ini encoding of valueless [DEFAULT] options when using allow_no_value=True.csv decoding of strings using carriage-return line endings. (by @fhgffy in #621)csv encoding losing values of non-string keys. (by @fhgffy in #622)xls decoding of sheets without columns row and with numeric column names. (by @fhgffy in #623)Forward missing overwrite argument in move method. #602
overwrite argument in move method. #602clean recursive cleaning of nested collections (when collections=True). (by @x0Lazarus)reverse. (by @x0Lazarus in #607)popitem method. (by @vitalivo in #601)RecursionError when a dict contains itself. #592 (by @dualfroz in #597)pre-commit hooks.Fix keylists / keypaths to handle non-string dict keys holding lists. (by @Sanjays2402 in #583)
keylists / keypaths to handle non-string dict keys holding lists. (by @Sanjays2402 in #583)match to anchor string patterns and consume the full keypath. (by @gaoflow in #579)query-string serializer to accept array/bracketed keys and trailing &. (#586)keypath_separator. (by @CodingFeng101 in #580)int parsing to catch OverflowError. #578 (#584)pre-commit hooks.Fix orjson and requests requirements to address CVE-2025-67221 and CVE-2024-27454.
schema kwarg support (python-benedict[schema] with pydantic v2) to all from_* and to_* I/O methods. (#565)indexes=True option to flatten / unflatten for list/tuple flattening with round-trip support. (#561)deep argument support to filter method to apply the predicate recursively to all nested dicts.deep argument support to remove method to remove the key(s) at every nesting level.deep argument support to rename method to rename the key at every nesting level.uiri/toml encoder for tomli_w. #439yaml serializer to use safe_dump and add pickle security warning (CWE-502). (#563)orjson and requests requirements to address CVE-2025-67221 and CVE-2024-27454. (#562)CONTRIBUTING.md.pre-commit hooks.Add freeze / unfreeze / frozen support to make a benedict instance immutable. #71
Python 3.14 support.freeze / unfreeze / frozen support to make a benedict instance immutable. #71keyattr. #502ValueError in groupby when key values contain the keypath_separator. #540ResourceWarning in xls serializer by explicitly closing vba_archive.pre-commit hooks.Add type annotations. #157 (by @Tatsh in #491)
pre-commit hooks.Add sort parameter to keypaths method. #404 (by @kotfu in #467)
sort parameter to keypaths method. #404 (by @kotfu in #467)pre-commit hooks.Drop Python 3.8 and Python 3.9 support.
Python 3.13 support.Python 3.8 and Python 3.9 support.dict backward-compatibility making keylist feature working only with lists. #412 #413 #432pyproject Ruff config sections.pre-commit hooks.Fix clean method not working on nested dicts. #383
clean method not working on nested dicts. #383merge method. #367pre-commit hooks.Fix calling from_xls passing custom options. #355
from_xls passing custom options. #355Black and isort with Ruff-format.pre-commit hooks.Add possibility to restrict input data sources with sources argument (more info here). #287
Fix items and values methods returned values type (cast to benedict). #333
items and values methods returned values type (cast to benedict). #333dict). #334Add CLISerializer and from_cli method. (by @Denperidge in #311)
CLISerializer and from_cli method. (by @Denperidge in #311)Add parse extra (optional dependencies). #300
parse extra (optional dependencies). #300 (#303)Allow ini format to support nested structures (encode to json only dicts). #284
ini format to support nested structures (encode to json only dicts). #284Allow ini format to support nested structures. #284 (by @fabiocaccamo in https://github.com/fabiocaccamo/python-benedict/pull/289)
ini format to support nested structures. #284 (by @fabiocaccamo in https://github.com/fabiocaccamo/python-benedict/pull/289)setup.cfg to pyproject.toml.flake8 with Ruff.tox test command.Full Changelog: https://github.com/fabiocaccamo/python-benedict/compare/0.30.0...0.30.1
ini format to support nested structures. #284 (#289)setup.cfg to pyproject.toml.flake8 with Ruff.tox test command.Add keyattr_dynamic property (False by default). #261
keyattr_dynamic property (False by default). #261 (#266)ini serializer case-sensitive by default and accept optionxform option. #263 (#265)TypeError when decoding .xls with None columns.Fix missing dependency on pyyaml. #260
pyyaml. #260json items preventing automatic keys creation when getting __protected__ attributes. #259NEW Add keyattr *(keys as attributes)* support.
NEW Add keyattr (keys as attributes) support. (#257)NEW Separate installation targets (extras requires). #200 (#258)Python >= 3.8.flake8 config to setup.cfg.flake8 checks.flake8-bugbear to pre-commit.flake8 also on tests files.pre-commit also with tox.master to main.- Remove tests/ from dist. - Bump requirements.
tests/ from dist.Fix FileNotFoundError if file is just the filename. #226
FileNotFoundError if file is just the filename. #226Add pyupgrade to pre-commit config.
pyupgrade to pre-commit config.setup.cfg (setuptools declarative syntax) generated using setuptools-py2cfg.pathlib.Path. #144Replace str.format with f-strings.
Python 3.7 support.str.format with f-strings.python setup.py test usage.s3_options option forwarded to json decoder. #198 (#204)Add pre-commit with black, isort and flake8.
Python 3.11 support. #143pre-commit with black, isort and flake8.toml files using the standard tomlib (if available). #143boto3, python-slugify, orjson) version.Add s3 support to I/O operations. #17
s3 support to I/O operations. #17 (#126)Add xls files (.xlsx, .xlsm, .xls) support (read-only). #70
xls files (.xlsx, .xlsm, .xls) support (read-only). #70 (#122)Python 3.6 support. (#123)Fix toml encoding circular reference error. #110
toml encoding circular reference error. #110Fix set dict item value in list. #109
Fixed orjson compatibility. #102
orjson compatibility. #102swap between dict items.deepcopy with pointer.Fixed broken yaml serialization with benedict attributes. #89
yaml serialization with benedict attributes. #89flatten not working when separator is equal to keypath_separator. #88Added official python 3.10 support.
python 3.10 support.python 2.7 and python 3.5 support.Added tuple index support when getting items. #66
type_util.is_dict_or_list_or_tuple method.Fixed json.dumps() when benedict is initialized with an empty dict. #57 #61
json.dumps() when benedict is initialized with an empty dict. #57 #61merge not working with an empty dict. #59Fixed json.dumps() when benedict is initialized with an empty dict. #57
json.dumps() when benedict is initialized with an empty dict. #57Added ini format support. #36 #40
ini format support. #36 #40python 3.9 to CI (tox, travis and GitHub actions).to_toml circular reference error. #53ftfy requirement version depending on python version.QueryStringSerializer regex.Fixed merge method lists concat when merging nested dicts. #48
merge method lists concat when merging nested dicts. #48BaseDict initialized with BaseDict subclass argument.Fixed get_int_list with single value.
get_int_list with single value.Removed sort_keys=True by default in JSON serializer.
sort_keys=True by default in JSON serializer.Added concat option to merge method. #45
concat option to merge method. #45sort_keys=True by default in JSON serializer.memo option to clone core method.json.dumps using cloned instance. #46Fixed benedict yaml representer. #43
benedict yaml representer. #43Fixed dump benedict object to yaml not working correctly. #43
benedict object to yaml not working correctly. #43Added get_uuid and get_uuid_list methods.
get_uuid and get_uuid_list methods.Fixed to_json returns empty dict from generator. #38
to_json returns empty dict from generator. #38BaseDict class and enforced tests.Added match utility method. #11 #16
match utility method. #11 #16indexes option support to keypaths method. #13keypaths method to use the default keypath_separator (.) instead of None.keypath_separator inheritance when init from another benedict instance. #35json.dumps no longer works directly with benedict. #34Added BaseDict as base class to keep pointer to the initial input dict. #32
BaseDict as base class to keep pointer to the initial input dict. #32benedict casting to all methods that return dict instances.flatten method, now a KeyError is raised in case of existing key.Enforced IODict initial check when using filepath or data-string.
plist format support.IODict initial check when using filepath or data-string.KeyError messages. PR #28io_util.read_file and io_util.write_file.Added overwrite option support to merge method. #24
find method. #23overwrite option support to merge method. #24Added data format auto-detection when creating instance with data from filepath or url.
keypath_separator support when using from_{format} methods.Added from_pickle and to_pickle methods.
from_pickle and to_pickle methods.PickleSerializer.datetime, Decimal and set support to JSONSerializer.dump method to use JSONSerializer.Base64Serializer.type_util.is_json_serializable with set objects.search method for int no results - #7invert method to handles correctly lists and tuples.io_util.read_file and io_util.write_file methods.Reorganized lib and tests packages.
groupby utility method.nest utility method.keylists core method.Added KeylistDict with list indexes support. #1
KeylistDict with list indexes support. #1benedict.utils.type_util with many utility functions.- Added rename method. - Added search method. - Added unflatten method.
rename method.search method.unflatten method.Fixed keypath_separator value in instances returned by copy, clone, filter, flatten, invert, subset methods. #4
keypath_separator value in instances returned by copy, clone, filter, flatten, invert, subset methods. #4get doesn't work when the key is a list with one element. #5pickle AttributeError. #6Added docstrings to methods. #2
unittest.fromkeys method.io_util.read_content.standardize utility method.benedicton decorator.options arg to choices in ParseDict methods.yaml.load with yaml.safe_load.Refactored I/O dict class and utils.
csv I/O support.Added standardize utility method.
standardize utility method.traverse utility method.keypath_separator getter/setter.base64 I/O support.benedict class and utilies.Added io_util.decode_bytes utility method.
io_util.decode_bytes utility method.Added query-string I/O support.
query-string I/O support.unique utility method.format=None support to io_util.decode_base64 utility.benedict class and utilies.Added items_sorted_by_keys utility method.
base64 I/O support.invert utility method.items_sorted_by_keys utility method.items_sorted_by_values utility method.benedict class and utilies.One column per quarter.