dataconf 3.3.0__tar.gz → 3.4.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.
- {dataconf-3.3.0 → dataconf-3.4.0}/PKG-INFO +3 -3
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/main.py +10 -1
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/utils.py +1 -1
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/version.py +1 -1
- {dataconf-3.3.0 → dataconf-3.4.0}/pyproject.toml +9 -9
- {dataconf-3.3.0 → dataconf-3.4.0}/LICENSE +0 -0
- {dataconf-3.3.0 → dataconf-3.4.0}/README.md +0 -0
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/__init__.py +0 -0
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/cli.py +0 -0
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/exceptions.py +0 -0
- {dataconf-3.3.0 → dataconf-3.4.0}/dataconf/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dataconf
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.
|
|
5
5
|
Home-page: https://github.com/zifeo/dataconf
|
|
6
6
|
License: MPL-2.0
|
|
@@ -15,9 +15,9 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
17
|
Requires-Dist: PyYAML (>=6.0.2,<7.0.0)
|
|
18
|
-
Requires-Dist: isodate (>=0.6.1,<0.
|
|
18
|
+
Requires-Dist: isodate (>=0.6.1,<0.8.0)
|
|
19
19
|
Requires-Dist: pyhocon (>=0.3.61,<0.4.0)
|
|
20
|
-
Requires-Dist: pyparsing (>=3.1
|
|
20
|
+
Requires-Dist: pyparsing (>=3.2.1,<4.0.0)
|
|
21
21
|
Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
|
|
22
22
|
Project-URL: Repository, https://github.com/zifeo/dataconf
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
@@ -71,7 +71,16 @@ class Multi:
|
|
|
71
71
|
conf = ConfigFactory.parse_URL(uri, timeout=timeout, required=True)
|
|
72
72
|
return Multi(self.confs + [conf], self.strict, **kwargs)
|
|
73
73
|
|
|
74
|
-
def file(
|
|
74
|
+
def file(
|
|
75
|
+
self,
|
|
76
|
+
path: str,
|
|
77
|
+
loader: Optional[str] = None,
|
|
78
|
+
allow_missing: bool = False,
|
|
79
|
+
**kwargs,
|
|
80
|
+
) -> "Multi":
|
|
81
|
+
if allow_missing and not os.path.exists(path):
|
|
82
|
+
return self.dict({}, **kwargs)
|
|
83
|
+
|
|
75
84
|
if loader == YAML or (
|
|
76
85
|
loader is None and (path.endswith(".yaml") or path.endswith(".yml"))
|
|
77
86
|
):
|
|
@@ -104,7 +104,7 @@ def __parse(value: any, clazz: Type, path: str, strict: bool, ignore_unexpected:
|
|
|
104
104
|
unexpected_keys = value.keys() - {renamings.get(k, k) for k in fs.keys()}
|
|
105
105
|
if len(unexpected_keys) > 0 and not ignore_unexpected:
|
|
106
106
|
raise UnexpectedKeysException(
|
|
107
|
-
f
|
|
107
|
+
f'unexpected key(s) "{", ".join(unexpected_keys)}" detected for type {clazz} at {path}'
|
|
108
108
|
)
|
|
109
109
|
|
|
110
110
|
return clazz(**fs)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "dataconf"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.4.0"
|
|
4
4
|
description = "Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support."
|
|
5
5
|
authors = []
|
|
6
6
|
license = "MPL-2.0"
|
|
@@ -35,20 +35,20 @@ dataconf = 'dataconf.cli:run'
|
|
|
35
35
|
python = "^3.9"
|
|
36
36
|
python-dateutil = "^2.9.0.post0"
|
|
37
37
|
PyYAML = "^6.0.2"
|
|
38
|
-
isodate = "
|
|
38
|
+
isodate = ">=0.6.1,<0.8.0"
|
|
39
39
|
pyhocon = "^0.3.61"
|
|
40
|
-
pyparsing = "^3.1
|
|
40
|
+
pyparsing = "^3.2.1"
|
|
41
41
|
|
|
42
42
|
[tool.poetry.group.dev.dependencies]
|
|
43
|
-
pytest = ">=8.3.
|
|
44
|
-
pre-commit = ">=
|
|
45
|
-
commitizen = ">=
|
|
46
|
-
pytest-httpserver = "^1.1.
|
|
47
|
-
ruff = ">=0.
|
|
43
|
+
pytest = ">=8.3.5"
|
|
44
|
+
pre-commit = ">=4.2.0"
|
|
45
|
+
commitizen = ">=4.4.1"
|
|
46
|
+
pytest-httpserver = "^1.1.2"
|
|
47
|
+
ruff = ">=0.11.2"
|
|
48
48
|
|
|
49
49
|
[tool.commitizen]
|
|
50
50
|
name = "cz_conventional_commits"
|
|
51
|
-
version = "3.
|
|
51
|
+
version = "3.4.0"
|
|
52
52
|
tag_format = "v$major.$minor.$patch$prerelease"
|
|
53
53
|
version_files = [
|
|
54
54
|
"pyproject.toml:version",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|