Closes #187 and improves documentation
Some checks failed
Analysis / SonarCloud (pull_request) Failing after 5s
Tests / Build and Test (3.11) (pull_request) Successful in 1m16s
Tests / Build and Test (3.12) (pull_request) Successful in 1m9s
Tests / Build and Test (3.13) (pull_request) Successful in 1m7s

This commit is contained in:
2025-02-09 18:40:30 +01:00
parent ad70648ea2
commit 6b2be48052
2 changed files with 25 additions and 23 deletions

View File

@@ -20,7 +20,7 @@ def config_get(key: str, *path: str, config_file: str | Path = DEFAULT_CONFIG_LO
### Args:
* key (`str`): Key that contains the value
* *path (`str`): Path to the key that contains the value
* *path (`str`): Path to the key that contains the value (pass *[] or don't pass anything at all to get on the top/root level)
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`
### Returns:
@@ -59,7 +59,7 @@ async def config_get(key: str, *path: str, config_file: str | Path = DEFAULT_CON
### Args:
* key (`str`): Key that contains the value
* *path (`str`): Path to the key that contains the value
* *path (`str`): Path to the key that contains the value (pass *[] or don't pass anything at all to get on the top/root level)
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`
### Returns:
@@ -98,7 +98,7 @@ def config_set(key: str, value: Any, *path: str, config_file: str | Path = DEFAU
### Args:
* key (`str`): Key that leads to the value
* value (`Any`): Any JSON serializable data
* *path (`str`): Path to the key of the target
* *path (`str`): Path to the key of the target (pass *[] or don't pass anything at all to set on the top/root level)
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`
### Raises:
@@ -116,7 +116,7 @@ async def config_set(
### Args:
* key (`str`): Key that leads to the value
* value (`Any`): Any JSON serializable data
* *path (`str`): Path to the key of the target
* *path (`str`): Path to the key of the target (pass *[] or don't pass anything at all to set on the top/root level)
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`
### Raises:
@@ -136,7 +136,7 @@ def config_delete(
### Args:
* key (`str`): Key to delete
* *path (`str`): Path to the key of the target
* *path (`str`): Path to the key of the target (pass *[] or don't pass anything at all to delete on the top/root level)
* missing_ok (`bool`): Do not raise an exception if the key is missing. Defaults to `False`
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`
@@ -165,7 +165,7 @@ async def config_delete(
### Args:
* key (`str`): Key to delete
* *path (`str`): Path to the key of the target
* *path (`str`): Path to the key of the target (pass *[] or don't pass anything at all to delete on the top/root level)
* missing_ok (`bool`): Do not raise an exception if the key is missing. Defaults to `False`
* config_file (`str | Path`, *optional*): Path-like object or path as a string of a location of the config file. Defaults to `"config.json"`