YamlManager
Library to simplify the management and creation of JSON and YAML files.
Functions:
-
to_json_file:
- Function:
- Converts a dictionary to a JSONFile
- Arguments:
json_path- A string or a JSONFile, location of the JSONFiledictionary- The data that the JSONFile should have
- Optional Arguments:
save- Whether the JSONFile should be saved (created or modified) as soon as the data matches the dictionary
- Returns:
- A JSONFile located at
json_path
- A JSONFile located at
- Function:
-
json_file_to_dict:
- Function:
- Converts the data from a JSONFile to a dictionary
- Arguments:
json_path- A string or a JSONFile, location of the JSONFile
- Returns:
- A dictionary containing all the data from the JSONFile
- Function:
-
json_file_to_yaml_file:
- Function:
- Converts the data from a JSONFile to a YamlFile
- Arguments:
json_path- A string or a JSONFile, location of the JSONFileyaml_path- A string or a YamlFile, location of the YamlFile
- Optional Arguments:
save- Whether the YamlFile should be saved (created or modified) as soon as the data matches the JSONFile
- Returns:
- A YamlFile located at
yaml_path
- A YamlFile located at
- Function:
-
to_yaml_file:
- Function:
- Converts a dictionary to a YamlFile
- Arguments:
yaml_path- A string or a YamlFile, location of the YamlFiledictionary- The data that the YamlFile should have
- Optional Arguments:
save- Whether the YamlFile should be saved (created or modified) as soon as the data matches the dictionary
- Returns:
- A YamlFile located at
yaml_path
- A YamlFile located at
- Function:
-
yaml_file_to_dict:
- Function:
- Converts the data from a YamlFile to a dictionary
- Arguments:
yaml_path- A string or a YamlFile, location of the YamlFile
- Returns:
- A dictionary containing all the data from the YamlFile
- Function:
-
yaml_file_to_json_file:
- Function:
- Converts the data from a YamlFile to a JSONFile
- Arguments:
yaml_path- A string or a YamlFile, location of the YamlFilejson_path- A string or a JSONFile, location of the JSONFile
- Optional Arguments:
save- Whether the JSONFile should be saved (created or modified) as soon as the data matches the YamlFile
- Returns:
- A JSONFile located at
json_path
- A JSONFile located at
- Function:
Classes / Objects
YamlFile
- Description:
- Represents a YAML file and provides methods to manipulate its data.
- Methods:
load(): Loads the YAML file data.save(): Saves the current data to the YAML file.
JSONFile
- Description:
- Represents a JSON file and provides methods to manipulate its data.
- Methods:
load(): Loads the JSON file data.save(): Saves the current data to the JSON file.
FileController
- Description:
- Represents an abstract file controller and provides methods to manipulate file data.
- Methods:
__init__(file_path: str): Initializes theFileControllerinstance with the file path.reload(): Abstract method to load data from the file. Must be implemented by subclasses.save(): Abstract method to save data to the file. Must be implemented by subclasses.contains(key: str) -> bool: Checks if a key exists in the data dictionary.set(key: str, value: any) -> None: Sets, modifies, or deletes values in the configuration.string(key: str, default_value: str | None = None) -> str | None: Gets a string value from the data.float(key: str, default_value: float | int | None = None) -> float | None: Gets a float value from the data.int(key: str, default_value: int | None = None) -> int | None: Gets an integer value from the data.boolean(key: str, default_value: bool | None = None) -> bool | None: Gets a boolean value from the data.str_list(key: str, default_value: list[str] | None = None) -> list[str] | None: Gets a list of strings from the data.float_list(key: str, default_value: list[float | int] | None = None) -> list[float] | None: Gets a list of float values from the data.int_list(key: str, default_value: list[int | float] | None = None) -> list[int] | None: Gets a list of integer values from the data.bool_list(key: str, default_value: list[bool] | None = None) -> list[bool] | None: Gets a list of boolean values from the data.dictionary(key: str, default_value: dict | None = None) -> dict | None: Gets a dictionary from the data.
Metadata
Release files for YamlManager 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yamlmanager-1.2.4.tar.gz | 8.2 kB | Without provenance | Details for yamlmanager-1.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| YamlManager-1.2.4-py3-none-any.whl | Python 3 | none | any | Details for YamlManager-1.2.4-py3-none-any.whl |
Total release size: 18.7 kB
Release files / yamlmanager-1.2.4.tar.gz
| Download URL | yamlmanager-1.2.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc37c788636d16d88dc3d925590b76f782d53a2b98957e50ca03d904bb466637
|
|
BLAKE2b-256 checksum How to use checksums |
c53da7397f956a17e2a73c215841684f67eabf031b2fdb4a510a3a8c7f188659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / YamlManager-1.2.4-py3-none-any.whl
| Download URL | YamlManager-1.2.4-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87ec2c94299e35c14a0487fd151e066819f5a258e501f23abd0e398b8aa87e61
|
|
BLAKE2b-256 checksum How to use checksums |
9c774ff32a5dead020c03d079a096a9b4020759169cf184aec2cc2818a93d00c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for YamlManager 1.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.