YamlWrapper is a wrapper for yaml files, that creates an abstraction layer in order to handle yaml files in a easy way.
Project description
PythonYamlWrapper
Description
YamlWrapper is an abstraction over PyYAML library. Its purpuse is to made easier to interact with .yaml files. This is made possible by create/update/remove operations with two main abstract data types: YamlDictionary and YamlList.
Documentation
You can find the official documentation at this link
Installation
pip install PythonYamlWrapper
Importing
from yaml_wrapper import YamlWrapper
yaml_wrapper: YamlWrapper = YamlWrapper("tmp/file_path.yaml")
Abstract data types and examples
The core functionalities provided by YamlWrapper work with YamlDictionary and YamlList.
- Dictionary
key_1: "value"
key_2:
sub_key_1: "sub_value"
sub_key_2: 1
Is rappresented by:
data = [
YamlDictionary("key", "value"),
YamlDictionary("sub_key", [
YamlDictionary("sub_key_1", "sub_value"),
YamlDictionary("sub_key_2", 1)
])
]
- Lists
- "first_value"
- "second_value"
- "third_value"
Is rappresented by:
data = [
YamlList(["first_value", "second_value", "third_value"])
]
- Dictionary with list
key:
- "first_value"
- "second_value"
- "third_value"
Is rappresented by:
data = [
YamlDictionary("key", YamlList(["first_value", "second_value", "third_value"]))
]
Special thanks
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PythonYamlWrapper-1.2.2.tar.gz.
File metadata
- Download URL: PythonYamlWrapper-1.2.2.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12fc95e52d2c507dee63408fc1be649ea8952248d09245b519f00089f8f4298a
|
|
| MD5 |
dce3d476757c47ef23a7c224878ff9f6
|
|
| BLAKE2b-256 |
edbddf8d972fe328727079b52fbedc167cd4c98ede24874b1b802d33ab52070f
|
File details
Details for the file PythonYamlWrapper-1.2.2-py3-none-any.whl.
File metadata
- Download URL: PythonYamlWrapper-1.2.2-py3-none-any.whl
- Upload date:
- Size: 28.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c68835b3fcbf3eac5ed9c93288f41fae2e76823667ceafe109dba6b5699d3fbb
|
|
| MD5 |
3100fd7b9446c706ee8083c45422f1f4
|
|
| BLAKE2b-256 |
fb7a3f6efc27e6da2be0fefb931d29b780c12721beafd9a243586a873eedcf76
|