python-benedict 0.33.2__tar.gz → 0.34.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python-benedict-0.33.2/python_benedict.egg-info → python_benedict-0.34.0}/PKG-INFO +7 -8
- {python-benedict-0.33.2 → python_benedict-0.34.0}/README.md +5 -5
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keylist/keylist_dict.py +6 -6
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keypath/keypath_util.py +1 -1
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/metadata.py +1 -1
- {python-benedict-0.33.2 → python_benedict-0.34.0}/pyproject.toml +5 -4
- {python-benedict-0.33.2 → python_benedict-0.34.0/python_benedict.egg-info}/PKG-INFO +7 -8
- {python-benedict-0.33.2 → python_benedict-0.34.0}/LICENSE.txt +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/MANIFEST.in +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/clean.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/clone.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/dump.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/filter.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/find.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/flatten.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/groupby.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/invert.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/items_sorted.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/keylists.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/keypaths.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/match.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/merge.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/move.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/nest.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/remove.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/rename.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/search.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/standardize.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/subset.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/swap.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/traverse.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/unflatten.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/core/unique.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/base/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/base/base_dict.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/io/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/io/io_dict.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/io/io_util.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keyattr/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keyattr/keyattr_dict.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keylist/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keylist/keylist_util.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keypath/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/keypath/keypath_dict.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/parse/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/parse/parse_dict.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/dicts/parse/parse_util.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/exceptions.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/extras.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/abstract.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/base64.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/cli.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/csv.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/html.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/ini.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/json.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/pickle.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/plist.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/query_string.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/toml.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/xls.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/xml.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/serializers/yaml.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/utils/__init__.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/benedict/utils/type_util.py +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/python_benedict.egg-info/SOURCES.txt +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/python_benedict.egg-info/dependency_links.txt +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/python_benedict.egg-info/requires.txt +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/python_benedict.egg-info/top_level.txt +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/setup.cfg +0 -0
- {python-benedict-0.33.2 → python_benedict-0.34.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-benedict
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.34.0
|
|
4
4
|
Summary: 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.
|
|
5
5
|
Author-email: Fabio Caccamo <fabio.caccamo@gmail.com>
|
|
6
6
|
Maintainer-email: Fabio Caccamo <fabio.caccamo@gmail.com>
|
|
@@ -47,11 +47,10 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
47
47
|
Classifier: Natural Language :: English
|
|
48
48
|
Classifier: Operating System :: OS Independent
|
|
49
49
|
Classifier: Programming Language :: Python :: 3
|
|
50
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
51
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
52
50
|
Classifier: Programming Language :: Python :: 3.10
|
|
53
51
|
Classifier: Programming Language :: Python :: 3.11
|
|
54
52
|
Classifier: Programming Language :: Python :: 3.12
|
|
53
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
55
54
|
Classifier: Topic :: Education :: Testing
|
|
56
55
|
Classifier: Topic :: Software Development :: Build Tools
|
|
57
56
|
Classifier: Topic :: System :: Filesystems
|
|
@@ -121,7 +120,7 @@ python-benedict is a dict subclass with **keylist/keypath/keyattr** support, **I
|
|
|
121
120
|
- [Usage](#usage)
|
|
122
121
|
- [Basics](#basics)
|
|
123
122
|
- [Keyattr](#keyattr) `my_dict.x.y.z`
|
|
124
|
-
- [Keylist](#keylist) `my_dict["x", "y", "z"]`
|
|
123
|
+
- [Keylist](#keylist) `my_dict[["x", "y", "z"]]`
|
|
125
124
|
- [Keypath](#keypath) `my_dict["x.y.z"]`
|
|
126
125
|
- [Custom keypath separator](#custom-keypath-separator)
|
|
127
126
|
- [Change keypath separator](#change-keypath-separator)
|
|
@@ -224,16 +223,16 @@ Wherever a **key** is used, it is possible to use also a **list (or a tuple) of
|
|
|
224
223
|
d = benedict()
|
|
225
224
|
|
|
226
225
|
# set values by keys list
|
|
227
|
-
d["profile", "firstname"] = "Fabio"
|
|
228
|
-
d["profile", "lastname"] = "Caccamo"
|
|
226
|
+
d[["profile", "firstname"]] = "Fabio"
|
|
227
|
+
d[["profile", "lastname"]] = "Caccamo"
|
|
229
228
|
print(d) # -> { "profile":{ "firstname":"Fabio", "lastname":"Caccamo" } }
|
|
230
229
|
print(d["profile"]) # -> { "firstname":"Fabio", "lastname":"Caccamo" }
|
|
231
230
|
|
|
232
231
|
# check if keypath exists in dict
|
|
233
|
-
print(["profile", "lastname"] in d) # -> True
|
|
232
|
+
print([["profile", "lastname"]] in d) # -> True
|
|
234
233
|
|
|
235
234
|
# delete value by keys list
|
|
236
|
-
del d["profile", "lastname"]
|
|
235
|
+
del d[["profile", "lastname"]]
|
|
237
236
|
print(d["profile"]) # -> { "firstname":"Fabio" }
|
|
238
237
|
```
|
|
239
238
|
|
|
@@ -33,7 +33,7 @@ python-benedict is a dict subclass with **keylist/keypath/keyattr** support, **I
|
|
|
33
33
|
- [Usage](#usage)
|
|
34
34
|
- [Basics](#basics)
|
|
35
35
|
- [Keyattr](#keyattr) `my_dict.x.y.z`
|
|
36
|
-
- [Keylist](#keylist) `my_dict["x", "y", "z"]`
|
|
36
|
+
- [Keylist](#keylist) `my_dict[["x", "y", "z"]]`
|
|
37
37
|
- [Keypath](#keypath) `my_dict["x.y.z"]`
|
|
38
38
|
- [Custom keypath separator](#custom-keypath-separator)
|
|
39
39
|
- [Change keypath separator](#change-keypath-separator)
|
|
@@ -136,16 +136,16 @@ Wherever a **key** is used, it is possible to use also a **list (or a tuple) of
|
|
|
136
136
|
d = benedict()
|
|
137
137
|
|
|
138
138
|
# set values by keys list
|
|
139
|
-
d["profile", "firstname"] = "Fabio"
|
|
140
|
-
d["profile", "lastname"] = "Caccamo"
|
|
139
|
+
d[["profile", "firstname"]] = "Fabio"
|
|
140
|
+
d[["profile", "lastname"]] = "Caccamo"
|
|
141
141
|
print(d) # -> { "profile":{ "firstname":"Fabio", "lastname":"Caccamo" } }
|
|
142
142
|
print(d["profile"]) # -> { "firstname":"Fabio", "lastname":"Caccamo" }
|
|
143
143
|
|
|
144
144
|
# check if keypath exists in dict
|
|
145
|
-
print(["profile", "lastname"] in d) # -> True
|
|
145
|
+
print([["profile", "lastname"]] in d) # -> True
|
|
146
146
|
|
|
147
147
|
# delete value by keys list
|
|
148
|
-
del d["profile", "lastname"]
|
|
148
|
+
del d[["profile", "lastname"]]
|
|
149
149
|
print(d["profile"]) # -> { "firstname":"Fabio" }
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -8,7 +8,7 @@ class KeylistDict(BaseDict):
|
|
|
8
8
|
super().__init__(*args, **kwargs)
|
|
9
9
|
|
|
10
10
|
def __contains__(self, key):
|
|
11
|
-
if type_util.
|
|
11
|
+
if type_util.is_list(key):
|
|
12
12
|
return self._contains_by_keys(key)
|
|
13
13
|
return super().__contains__(key)
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ class KeylistDict(BaseDict):
|
|
|
19
19
|
return False
|
|
20
20
|
|
|
21
21
|
def __delitem__(self, key):
|
|
22
|
-
if type_util.
|
|
22
|
+
if type_util.is_list(key):
|
|
23
23
|
self._delitem_by_keys(key)
|
|
24
24
|
return
|
|
25
25
|
super().__delitem__(key)
|
|
@@ -35,7 +35,7 @@ class KeylistDict(BaseDict):
|
|
|
35
35
|
raise KeyError(f"Invalid keys: {keys!r}")
|
|
36
36
|
|
|
37
37
|
def __getitem__(self, key):
|
|
38
|
-
if type_util.
|
|
38
|
+
if type_util.is_list(key):
|
|
39
39
|
return self._getitem_by_keys(key)
|
|
40
40
|
return super().__getitem__(key)
|
|
41
41
|
|
|
@@ -46,7 +46,7 @@ class KeylistDict(BaseDict):
|
|
|
46
46
|
raise KeyError(f"Invalid keys: {keys!r}")
|
|
47
47
|
|
|
48
48
|
def __setitem__(self, key, value):
|
|
49
|
-
if type_util.
|
|
49
|
+
if type_util.is_list(key):
|
|
50
50
|
self._setitem_by_keys(key, value)
|
|
51
51
|
return
|
|
52
52
|
super().__setitem__(key, value)
|
|
@@ -55,7 +55,7 @@ class KeylistDict(BaseDict):
|
|
|
55
55
|
keylist_util.set_item(self, keys, value)
|
|
56
56
|
|
|
57
57
|
def get(self, key, default=None):
|
|
58
|
-
if type_util.
|
|
58
|
+
if type_util.is_list(key):
|
|
59
59
|
return self._get_by_keys(key, default)
|
|
60
60
|
return super().get(key, default)
|
|
61
61
|
|
|
@@ -68,7 +68,7 @@ class KeylistDict(BaseDict):
|
|
|
68
68
|
return default
|
|
69
69
|
|
|
70
70
|
def pop(self, key, *args):
|
|
71
|
-
if type_util.
|
|
71
|
+
if type_util.is_list(key):
|
|
72
72
|
return self._pop_by_keys(key, *args)
|
|
73
73
|
return super().pop(key, *args)
|
|
74
74
|
|
|
@@ -26,7 +26,7 @@ def parse_keys(keypath, separator):
|
|
|
26
26
|
"""
|
|
27
27
|
Parse keys from keylist or keypath using the given separator.
|
|
28
28
|
"""
|
|
29
|
-
if type_util.
|
|
29
|
+
if type_util.is_list(keypath):
|
|
30
30
|
keys = []
|
|
31
31
|
for key in keypath:
|
|
32
32
|
keys += parse_keys(key, separator)
|
|
@@ -77,11 +77,10 @@ classifiers = [
|
|
|
77
77
|
"Natural Language :: English",
|
|
78
78
|
"Operating System :: OS Independent",
|
|
79
79
|
"Programming Language :: Python :: 3",
|
|
80
|
-
"Programming Language :: Python :: 3.8",
|
|
81
|
-
"Programming Language :: Python :: 3.9",
|
|
82
80
|
"Programming Language :: Python :: 3.10",
|
|
83
81
|
"Programming Language :: Python :: 3.11",
|
|
84
82
|
"Programming Language :: Python :: 3.12",
|
|
83
|
+
"Programming Language :: Python :: 3.13",
|
|
85
84
|
"Topic :: Education :: Testing",
|
|
86
85
|
"Topic :: Software Development :: Build Tools",
|
|
87
86
|
"Topic :: System :: Filesystems",
|
|
@@ -167,11 +166,13 @@ exclude = '''
|
|
|
167
166
|
'''
|
|
168
167
|
|
|
169
168
|
[tool.ruff]
|
|
170
|
-
ignore = ["B905", "E501"]
|
|
171
169
|
line-length = 88
|
|
170
|
+
|
|
171
|
+
[tool.ruff.lint]
|
|
172
|
+
ignore = ["B905", "E501"]
|
|
172
173
|
select = ["B", "B9", "C", "E", "F", "W"]
|
|
173
174
|
|
|
174
|
-
[tool.ruff.mccabe]
|
|
175
|
+
[tool.ruff.lint.mccabe]
|
|
175
176
|
max-complexity = 10
|
|
176
177
|
|
|
177
178
|
[tool.setuptools.packages.find]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-benedict
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.34.0
|
|
4
4
|
Summary: 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.
|
|
5
5
|
Author-email: Fabio Caccamo <fabio.caccamo@gmail.com>
|
|
6
6
|
Maintainer-email: Fabio Caccamo <fabio.caccamo@gmail.com>
|
|
@@ -47,11 +47,10 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
47
47
|
Classifier: Natural Language :: English
|
|
48
48
|
Classifier: Operating System :: OS Independent
|
|
49
49
|
Classifier: Programming Language :: Python :: 3
|
|
50
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
51
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
52
50
|
Classifier: Programming Language :: Python :: 3.10
|
|
53
51
|
Classifier: Programming Language :: Python :: 3.11
|
|
54
52
|
Classifier: Programming Language :: Python :: 3.12
|
|
53
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
55
54
|
Classifier: Topic :: Education :: Testing
|
|
56
55
|
Classifier: Topic :: Software Development :: Build Tools
|
|
57
56
|
Classifier: Topic :: System :: Filesystems
|
|
@@ -121,7 +120,7 @@ python-benedict is a dict subclass with **keylist/keypath/keyattr** support, **I
|
|
|
121
120
|
- [Usage](#usage)
|
|
122
121
|
- [Basics](#basics)
|
|
123
122
|
- [Keyattr](#keyattr) `my_dict.x.y.z`
|
|
124
|
-
- [Keylist](#keylist) `my_dict["x", "y", "z"]`
|
|
123
|
+
- [Keylist](#keylist) `my_dict[["x", "y", "z"]]`
|
|
125
124
|
- [Keypath](#keypath) `my_dict["x.y.z"]`
|
|
126
125
|
- [Custom keypath separator](#custom-keypath-separator)
|
|
127
126
|
- [Change keypath separator](#change-keypath-separator)
|
|
@@ -224,16 +223,16 @@ Wherever a **key** is used, it is possible to use also a **list (or a tuple) of
|
|
|
224
223
|
d = benedict()
|
|
225
224
|
|
|
226
225
|
# set values by keys list
|
|
227
|
-
d["profile", "firstname"] = "Fabio"
|
|
228
|
-
d["profile", "lastname"] = "Caccamo"
|
|
226
|
+
d[["profile", "firstname"]] = "Fabio"
|
|
227
|
+
d[["profile", "lastname"]] = "Caccamo"
|
|
229
228
|
print(d) # -> { "profile":{ "firstname":"Fabio", "lastname":"Caccamo" } }
|
|
230
229
|
print(d["profile"]) # -> { "firstname":"Fabio", "lastname":"Caccamo" }
|
|
231
230
|
|
|
232
231
|
# check if keypath exists in dict
|
|
233
|
-
print(["profile", "lastname"] in d) # -> True
|
|
232
|
+
print([["profile", "lastname"]] in d) # -> True
|
|
234
233
|
|
|
235
234
|
# delete value by keys list
|
|
236
|
-
del d["profile", "lastname"]
|
|
235
|
+
del d[["profile", "lastname"]]
|
|
237
236
|
print(d["profile"]) # -> { "firstname":"Fabio" }
|
|
238
237
|
```
|
|
239
238
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-benedict-0.33.2 → python_benedict-0.34.0}/python_benedict.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|