configaroo 0.1.0__tar.gz → 0.1.1__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.
- configaroo-0.1.1/LICENSE +20 -0
- configaroo-0.1.1/PKG-INFO +41 -0
- configaroo-0.1.1/pyproject.toml +63 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/__init__.py +2 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/configuration.py +68 -14
- configaroo-0.1.1/src/configaroo.egg-info/PKG-INFO +41 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo.egg-info/SOURCES.txt +1 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_configuration.py +67 -9
- configaroo-0.1.0/PKG-INFO +0 -21
- configaroo-0.1.0/pyproject.toml +0 -15
- configaroo-0.1.0/src/configaroo.egg-info/PKG-INFO +0 -21
- {configaroo-0.1.0 → configaroo-0.1.1}/README.md +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/setup.cfg +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/exceptions.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/loaders/__init__.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/loaders/json.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/loaders/toml.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo/py.typed +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo.egg-info/dependency_links.txt +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo.egg-info/requires.txt +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/src/configaroo.egg-info/top_level.txt +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_environment.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_json.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_loaders.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_toml.py +0 -0
- {configaroo-0.1.0 → configaroo-0.1.1}/tests/test_validation.py +0 -0
configaroo-0.1.1/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright © 2025 Geir Arne Hjelle
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the “Software”), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: configaroo
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Bouncy handling of configuration files
|
5
|
+
Author-email: Geir Arne Hjelle <geirarne@gmail.com>
|
6
|
+
Maintainer-email: Geir Arne Hjelle <geirarne@gmail.com>
|
7
|
+
License-Expression: MIT
|
8
|
+
Project-URL: homepage, https://github.com/gahjelle/configaroo
|
9
|
+
Project-URL: github, https://github.com/gahjelle/configaroo
|
10
|
+
Project-URL: issues, https://github.com/gahjelle/configaroo/issues
|
11
|
+
Project-URL: changelog, https://github.com/gahjelle/configaroo/blob/main/CHANGELOG.md
|
12
|
+
Keywords: configuration,configuration-management,toml,json
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: Natural Language :: English
|
16
|
+
Classifier: Operating System :: OS Independent
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
+
Classifier: Typing :: Typed
|
24
|
+
Requires-Python: >=3.11
|
25
|
+
Description-Content-Type: text/markdown
|
26
|
+
License-File: LICENSE
|
27
|
+
Requires-Dist: pydantic>=2.0
|
28
|
+
Requires-Dist: pyplugs>=0.4.0
|
29
|
+
Requires-Dist: python-dotenv>=1.1.0
|
30
|
+
Dynamic: license-file
|
31
|
+
|
32
|
+
# Configaroo - Bouncy Configuration Handling
|
33
|
+
|
34
|
+
Configaroo is a light configuration package for Python that offers the following features:
|
35
|
+
|
36
|
+
- Access configuration settings with dotted keys: `config.nested.key`
|
37
|
+
- Use different configuration file formats, including TOML and JSON
|
38
|
+
- Override key configuration settings with environment variables
|
39
|
+
- Validate a configuration based on a Pydantic model
|
40
|
+
- Convert the type of configuration values based on a Pydantic model
|
41
|
+
- Dynamically format certain configuration values
|
@@ -0,0 +1,63 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=61"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
|
6
|
+
[project]
|
7
|
+
name = "configaroo"
|
8
|
+
description = "Bouncy handling of configuration files"
|
9
|
+
readme = "README.md"
|
10
|
+
authors = [{ name = "Geir Arne Hjelle", email = "geirarne@gmail.com" }]
|
11
|
+
maintainers = [{ name = "Geir Arne Hjelle", email = "geirarne@gmail.com" }]
|
12
|
+
requires-python = ">=3.11"
|
13
|
+
license = "MIT"
|
14
|
+
license-files = ["LICENSE"]
|
15
|
+
keywords = ["configuration", "configuration-management", "toml", "json"]
|
16
|
+
classifiers = [
|
17
|
+
"Development Status :: 5 - Production/Stable",
|
18
|
+
"Intended Audience :: Developers",
|
19
|
+
"Natural Language :: English",
|
20
|
+
"Operating System :: OS Independent",
|
21
|
+
"Programming Language :: Python :: 3.11",
|
22
|
+
"Programming Language :: Python :: 3.12",
|
23
|
+
"Programming Language :: Python :: 3.13",
|
24
|
+
"Programming Language :: Python :: 3.14",
|
25
|
+
"Programming Language :: Python :: 3",
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
27
|
+
"Typing :: Typed",
|
28
|
+
]
|
29
|
+
dependencies = ["pydantic>=2.0", "pyplugs>=0.4.0", "python-dotenv>=1.1.0"]
|
30
|
+
dynamic = ["version"]
|
31
|
+
|
32
|
+
[project.urls]
|
33
|
+
homepage = "https://github.com/gahjelle/configaroo"
|
34
|
+
github = "https://github.com/gahjelle/configaroo"
|
35
|
+
issues = "https://github.com/gahjelle/configaroo/issues"
|
36
|
+
changelog = "https://github.com/gahjelle/configaroo/blob/main/CHANGELOG.md"
|
37
|
+
|
38
|
+
[dependency-groups]
|
39
|
+
build = ["build>=1.2.2.post1", "twine>=6.1.0"]
|
40
|
+
dev = [
|
41
|
+
"bumpver>=2024.1130",
|
42
|
+
"ipython>=8.36.0",
|
43
|
+
"pytest>=8.3.5",
|
44
|
+
"ruff>=0.11.11",
|
45
|
+
"tomli-w>=1.2.0",
|
46
|
+
]
|
47
|
+
|
48
|
+
|
49
|
+
[tool.setuptools.dynamic]
|
50
|
+
version = { attr = "configaroo.__version__" }
|
51
|
+
|
52
|
+
[tool.bumpver]
|
53
|
+
current_version = "v0.1.1"
|
54
|
+
version_pattern = "vMAJOR.MINOR.PATCH"
|
55
|
+
commit_message = "bump version {old_version} -> {new_version}"
|
56
|
+
tag_message = "{new_version}"
|
57
|
+
commit = true
|
58
|
+
tag = true
|
59
|
+
push = false
|
60
|
+
|
61
|
+
[tool.bumpver.file_patterns]
|
62
|
+
"pyproject.toml" = ['current_version = "{version}"']
|
63
|
+
"src/configaroo/__init__.py" = ['__version__ = "MAJOR.MINOR.PATCH"']
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"""A dict-like configuration with support for envvars, validation and type conversion"""
|
2
2
|
|
3
|
+
import inspect
|
3
4
|
import os
|
5
|
+
import re
|
4
6
|
from collections import UserDict
|
5
7
|
from pathlib import Path
|
6
8
|
from typing import Any, Self, Type
|
@@ -27,7 +29,9 @@ class Configuration(UserDict):
|
|
27
29
|
) -> Self:
|
28
30
|
"""Read a Configuration from a file"""
|
29
31
|
config_dict = loaders.from_file(file_path, loader=loader)
|
30
|
-
return cls(
|
32
|
+
return cls(config_dict).initialize(
|
33
|
+
envs=envs, env_prefix=env_prefix, extra_dynamic=extra_dynamic, model=model
|
34
|
+
)
|
31
35
|
|
32
36
|
def initialize(
|
33
37
|
self,
|
@@ -51,7 +55,7 @@ class Configuration(UserDict):
|
|
51
55
|
"""Make sure nested sections have type Configuration"""
|
52
56
|
value = self.data[key]
|
53
57
|
if isinstance(value, dict | UserDict | Configuration):
|
54
|
-
return Configuration(
|
58
|
+
return Configuration(value)
|
55
59
|
else:
|
56
60
|
return value
|
57
61
|
|
@@ -76,21 +80,21 @@ class Configuration(UserDict):
|
|
76
80
|
|
77
81
|
def get(self, key: str, default: Any = None) -> Any:
|
78
82
|
"""Allow dotted keys when using .get()"""
|
79
|
-
if key
|
80
|
-
prefix, _, rest = key.partition(".")
|
81
|
-
try:
|
82
|
-
return self[prefix].get(rest, default=default)
|
83
|
-
except KeyError:
|
84
|
-
return default
|
85
|
-
else:
|
83
|
+
if key in self.data:
|
86
84
|
return self[key]
|
87
85
|
|
86
|
+
prefix, _, rest = key.partition(".")
|
87
|
+
try:
|
88
|
+
return self[prefix].get(rest, default=default)
|
89
|
+
except KeyError:
|
90
|
+
return default
|
91
|
+
|
88
92
|
def add(self, key: str, value: Any) -> Self:
|
89
93
|
"""Add a value, allow dotted keys"""
|
90
94
|
prefix, _, rest = key.partition(".")
|
91
95
|
if rest:
|
92
96
|
cls = type(self)
|
93
|
-
return self | {prefix: cls(
|
97
|
+
return self | {prefix: cls(self.setdefault(prefix, {})).add(rest, value)}
|
94
98
|
else:
|
95
99
|
return self | {key: value}
|
96
100
|
|
@@ -116,15 +120,15 @@ class Configuration(UserDict):
|
|
116
120
|
cls = type(self)
|
117
121
|
variables = (
|
118
122
|
self.to_flat_dict()
|
119
|
-
| {"project_path":
|
123
|
+
| {"project_path": _find_pyproject_toml()}
|
120
124
|
| ({} if extra is None else extra)
|
121
125
|
)
|
122
126
|
return cls(
|
123
|
-
|
127
|
+
{
|
124
128
|
key: (
|
125
129
|
value.parse_dynamic(extra=variables)
|
126
130
|
if isinstance(value, Configuration)
|
127
|
-
else value
|
131
|
+
else _incomplete_format(value, variables)
|
128
132
|
if isinstance(value, str)
|
129
133
|
else value
|
130
134
|
)
|
@@ -140,7 +144,7 @@ class Configuration(UserDict):
|
|
140
144
|
def convert(self, model: Type[BaseModel]) -> Self:
|
141
145
|
"""Convert data types to match the given model"""
|
142
146
|
cls = type(self)
|
143
|
-
return cls(
|
147
|
+
return cls(model(**self.data).model_dump())
|
144
148
|
|
145
149
|
def to_dict(self) -> dict[str, Any]:
|
146
150
|
"""Dump the configuration into a Python dictionary"""
|
@@ -166,3 +170,53 @@ class Configuration(UserDict):
|
|
166
170
|
self[nested_key].to_flat_dict(_prefix=f"{_prefix}{nested_key}.").items()
|
167
171
|
)
|
168
172
|
}
|
173
|
+
|
174
|
+
|
175
|
+
def _find_pyproject_toml(
|
176
|
+
path: Path | None = None, _file_name: str = "pyproject.toml"
|
177
|
+
) -> Path:
|
178
|
+
"""Find a directory that contains a pyproject.toml file.
|
179
|
+
|
180
|
+
This searches the given directory and all direct parents. If a
|
181
|
+
pyproject.toml file isn't found, then the root of the file system is
|
182
|
+
returned.
|
183
|
+
"""
|
184
|
+
path = _get_foreign_path() if path is None else path
|
185
|
+
if (path / _file_name).exists() or path == path.parent:
|
186
|
+
return path.resolve()
|
187
|
+
else:
|
188
|
+
return _find_pyproject_toml(path.parent, _file_name=_file_name)
|
189
|
+
|
190
|
+
|
191
|
+
def _get_foreign_path() -> Path:
|
192
|
+
"""Find the path to the library that called this package.
|
193
|
+
|
194
|
+
Search the call stack for the first source code file outside of configaroo.
|
195
|
+
"""
|
196
|
+
self_prefix = Path(__file__).parent.parent
|
197
|
+
return next(
|
198
|
+
path
|
199
|
+
for frame in inspect.stack()
|
200
|
+
if not (path := Path(frame.filename)).is_relative_to(self_prefix)
|
201
|
+
)
|
202
|
+
|
203
|
+
|
204
|
+
def _incomplete_format(text: str, replacers: dict[str, Any]) -> str:
|
205
|
+
"""Replace some, but not necessarily all format specifiers in a text string.
|
206
|
+
|
207
|
+
Regular .format() raises an error if not all {replace} parameters are
|
208
|
+
supplied. Here, we only replace the given replace arguments and leave the
|
209
|
+
rest untouched.
|
210
|
+
"""
|
211
|
+
dot = "__DOT__" # Escape . in fields as they have special meaning in .format()
|
212
|
+
pattern = r"({{{word}(?:![ars])?(?:|:[^}}]*)}})" # Match {word} or {word:...}
|
213
|
+
|
214
|
+
for word, replacement in replacers.items():
|
215
|
+
for match in re.findall(pattern.format(word=word), text):
|
216
|
+
# Split expression to only replace . in the field name
|
217
|
+
field, colon, fmt = match.partition(":")
|
218
|
+
replacer = f"{field.replace('.', dot)}{colon}{fmt}".format(
|
219
|
+
**{word.replace(".", dot): replacement}
|
220
|
+
)
|
221
|
+
text = text.replace(match, replacer)
|
222
|
+
return text
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: configaroo
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Bouncy handling of configuration files
|
5
|
+
Author-email: Geir Arne Hjelle <geirarne@gmail.com>
|
6
|
+
Maintainer-email: Geir Arne Hjelle <geirarne@gmail.com>
|
7
|
+
License-Expression: MIT
|
8
|
+
Project-URL: homepage, https://github.com/gahjelle/configaroo
|
9
|
+
Project-URL: github, https://github.com/gahjelle/configaroo
|
10
|
+
Project-URL: issues, https://github.com/gahjelle/configaroo/issues
|
11
|
+
Project-URL: changelog, https://github.com/gahjelle/configaroo/blob/main/CHANGELOG.md
|
12
|
+
Keywords: configuration,configuration-management,toml,json
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: Natural Language :: English
|
16
|
+
Classifier: Operating System :: OS Independent
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
23
|
+
Classifier: Typing :: Typed
|
24
|
+
Requires-Python: >=3.11
|
25
|
+
Description-Content-Type: text/markdown
|
26
|
+
License-File: LICENSE
|
27
|
+
Requires-Dist: pydantic>=2.0
|
28
|
+
Requires-Dist: pyplugs>=0.4.0
|
29
|
+
Requires-Dist: python-dotenv>=1.1.0
|
30
|
+
Dynamic: license-file
|
31
|
+
|
32
|
+
# Configaroo - Bouncy Configuration Handling
|
33
|
+
|
34
|
+
Configaroo is a light configuration package for Python that offers the following features:
|
35
|
+
|
36
|
+
- Access configuration settings with dotted keys: `config.nested.key`
|
37
|
+
- Use different configuration file formats, including TOML and JSON
|
38
|
+
- Override key configuration settings with environment variables
|
39
|
+
- Validate a configuration based on a Pydantic model
|
40
|
+
- Convert the type of configuration values based on a Pydantic model
|
41
|
+
- Dynamically format certain configuration values
|
@@ -1,8 +1,16 @@
|
|
1
1
|
"""Test base Configuration functionality"""
|
2
2
|
|
3
|
+
from pathlib import Path
|
4
|
+
|
3
5
|
import pytest
|
4
6
|
|
5
|
-
from configaroo import Configuration
|
7
|
+
from configaroo import Configuration, configuration
|
8
|
+
|
9
|
+
|
10
|
+
@pytest.fixture
|
11
|
+
def file_path():
|
12
|
+
"""The path to the current file"""
|
13
|
+
return Path(__file__).resolve()
|
6
14
|
|
7
15
|
|
8
16
|
def test_read_simple_values_as_attributes(config):
|
@@ -93,18 +101,68 @@ def test_contains_with_dotted_key(config):
|
|
93
101
|
assert "nested.number" not in config
|
94
102
|
|
95
103
|
|
96
|
-
def test_parse_dynamic_default(config):
|
104
|
+
def test_parse_dynamic_default(config, file_path):
|
97
105
|
"""Test parsing of default dynamic variables"""
|
98
|
-
parsed_config = config.parse_dynamic()
|
99
|
-
|
106
|
+
parsed_config = (config | {"diameter": "2 x {nested.pie}"}).parse_dynamic()
|
107
|
+
print("pyproject.toml dir: ", configuration._find_pyproject_toml(file_path))
|
108
|
+
print(f"{parsed_config.paths.dynamic = }")
|
109
|
+
assert parsed_config.paths.dynamic == str(file_path)
|
100
110
|
assert parsed_config.phrase == "The meaning of life is 42"
|
111
|
+
assert parsed_config.diameter == "2 x 3.14"
|
101
112
|
|
102
113
|
|
103
|
-
def test_parse_dynamic_extra(config):
|
114
|
+
def test_parse_dynamic_extra(config, file_path):
|
104
115
|
"""Test parsing of extra dynamic variables"""
|
105
|
-
parsed_config = (config | {"animal": "{adjective}
|
106
|
-
extra={"number": 14, "adjective": "
|
116
|
+
parsed_config = (config | {"animal": "{adjective} kangaroo"}).parse_dynamic(
|
117
|
+
extra={"number": 14, "adjective": "bouncy"}
|
107
118
|
)
|
108
|
-
assert parsed_config.paths.dynamic ==
|
119
|
+
assert parsed_config.paths.dynamic == str(file_path)
|
109
120
|
assert parsed_config.phrase == "The meaning of life is 14"
|
110
|
-
assert parsed_config.animal == "
|
121
|
+
assert parsed_config.animal == "bouncy kangaroo"
|
122
|
+
|
123
|
+
|
124
|
+
def test_parse_dynamic_formatted(config):
|
125
|
+
"""Test that formatting works for dynamic variables"""
|
126
|
+
parsed_config = (
|
127
|
+
config
|
128
|
+
| {
|
129
|
+
"string": "Hey {word!r}",
|
130
|
+
"three": "->{nested.pie:6.0f}<-",
|
131
|
+
"centered": "|{word:^12}|",
|
132
|
+
}
|
133
|
+
).parse_dynamic()
|
134
|
+
assert parsed_config.centered == "| platypus |"
|
135
|
+
assert parsed_config.three == "-> 3<-"
|
136
|
+
assert parsed_config.string == "Hey 'platypus'"
|
137
|
+
|
138
|
+
|
139
|
+
def test_parse_dynamic_ignore(config):
|
140
|
+
"""Test that parsing of dynamic variables ignores unknown replacements"""
|
141
|
+
parsed_config = (
|
142
|
+
config
|
143
|
+
| {
|
144
|
+
"animal": "{adjective} kangaroo",
|
145
|
+
"phrase": "one {nested.non_existent} dollar",
|
146
|
+
}
|
147
|
+
).parse_dynamic()
|
148
|
+
assert parsed_config.animal == "{adjective} kangaroo"
|
149
|
+
assert parsed_config.phrase == "one {nested.non_existent} dollar"
|
150
|
+
|
151
|
+
|
152
|
+
def test_find_pyproject_toml():
|
153
|
+
"""Test that the pyproject.toml file can be located"""
|
154
|
+
assert configuration._find_pyproject_toml() == Path(__file__).parent.parent
|
155
|
+
|
156
|
+
|
157
|
+
def test_find_foreign_caller():
|
158
|
+
"""Test that a foreign caller (outside of configaroo) can be identified"""
|
159
|
+
assert configuration._get_foreign_path() == Path(__file__)
|
160
|
+
|
161
|
+
|
162
|
+
def test_incomplete_formatter():
|
163
|
+
"""Test that the incomplete formatter can handle fields that aren't replaced"""
|
164
|
+
formatted = configuration._incomplete_format(
|
165
|
+
"{number:5.1f} {non_existent} {string!r} {name}",
|
166
|
+
{"number": 3.14, "string": "platypus", "name": "Geir Arne"},
|
167
|
+
)
|
168
|
+
assert formatted == " 3.1 {non_existent} 'platypus' Geir Arne"
|
configaroo-0.1.0/PKG-INFO
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: configaroo
|
3
|
-
Version: 0.1.0
|
4
|
-
Summary: Bouncy handling of configuration files
|
5
|
-
Author-email: Geir Arne Hjelle <geirarne@gmail.com>
|
6
|
-
Requires-Python: >=3.11
|
7
|
-
Description-Content-Type: text/markdown
|
8
|
-
Requires-Dist: pydantic>=2.0
|
9
|
-
Requires-Dist: pyplugs>=0.4.0
|
10
|
-
Requires-Dist: python-dotenv>=1.1.0
|
11
|
-
|
12
|
-
# Configaroo - Bouncy Configuration Handling
|
13
|
-
|
14
|
-
Configaroo is a light configuration package for Python that offers the following features:
|
15
|
-
|
16
|
-
- Access configuration settings with dotted keys: `config.nested.key`
|
17
|
-
- Use different configuration file formats, including TOML and JSON
|
18
|
-
- Override key configuration settings with environment variables
|
19
|
-
- Validate a configuration based on a Pydantic model
|
20
|
-
- Convert the type of configuration values based on a Pydantic model
|
21
|
-
- Dynamically format certain configuration values
|
configaroo-0.1.0/pyproject.toml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
[project]
|
2
|
-
name = "configaroo"
|
3
|
-
version = "0.1.0"
|
4
|
-
description = "Bouncy handling of configuration files"
|
5
|
-
readme = "README.md"
|
6
|
-
authors = [{ name = "Geir Arne Hjelle", email = "geirarne@gmail.com" }]
|
7
|
-
requires-python = ">=3.11"
|
8
|
-
dependencies = ["pydantic>=2.0", "pyplugs>=0.4.0", "python-dotenv>=1.1.0"]
|
9
|
-
|
10
|
-
[build-system]
|
11
|
-
requires = ["setuptools>=61"]
|
12
|
-
build-backend = "setuptools.build_meta"
|
13
|
-
|
14
|
-
[dependency-groups]
|
15
|
-
dev = ["ipython>=8.36.0", "pytest>=8.3.5", "ruff>=0.11.11", "tomli-w>=1.2.0"]
|
@@ -1,21 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: configaroo
|
3
|
-
Version: 0.1.0
|
4
|
-
Summary: Bouncy handling of configuration files
|
5
|
-
Author-email: Geir Arne Hjelle <geirarne@gmail.com>
|
6
|
-
Requires-Python: >=3.11
|
7
|
-
Description-Content-Type: text/markdown
|
8
|
-
Requires-Dist: pydantic>=2.0
|
9
|
-
Requires-Dist: pyplugs>=0.4.0
|
10
|
-
Requires-Dist: python-dotenv>=1.1.0
|
11
|
-
|
12
|
-
# Configaroo - Bouncy Configuration Handling
|
13
|
-
|
14
|
-
Configaroo is a light configuration package for Python that offers the following features:
|
15
|
-
|
16
|
-
- Access configuration settings with dotted keys: `config.nested.key`
|
17
|
-
- Use different configuration file formats, including TOML and JSON
|
18
|
-
- Override key configuration settings with environment variables
|
19
|
-
- Validate a configuration based on a Pydantic model
|
20
|
-
- Convert the type of configuration values based on a Pydantic model
|
21
|
-
- Dynamically format certain configuration values
|
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
|