PyYAML loaders with enhanced functionalities.
Project description
pyyaml-loaders
PyYAML loaders with enhanced functionalities.
Description
IgnoreLoader
Ignore all constructors with tag !. Load YAML file as is.
IncludeLoader
Tag: !include
Include values from other fields in the same YAML file, or from other file, while potentially replacing a subfield in the included field with a given value.
Syntax:
!include [OTHER_FILE#]FIELD_TO_INCLUDE [SUBFIELD_TO_REPLACE:VALUE_TO_REPLACE_WITH]
Installation
pip install pyyaml-loaders
Usage
In preamble:
from pyyaml_loaders import IncludeLoader, IgnoreLoader
When loading YAML file:
with open(yaml_file, "r") as f:
data = yaml.load(f, IncludeLoader)
(or IgnoreLoader instead of IncludeLoader)
Project details
Release history Release notifications | RSS feed
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 pyyaml_loaders-0.2.0.tar.gz.
File metadata
- Download URL: pyyaml_loaders-0.2.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea6cde69357b8d774803ec41afaf038990f33589c623d48ae02fbd620051760
|
|
| MD5 |
33925f9b11b05a7037d93c4b0c236b01
|
|
| BLAKE2b-256 |
53d6f3ee427745499d57168121388fd1325b060213b1d832578c90d188637022
|
File details
Details for the file pyyaml_loaders-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pyyaml_loaders-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f273496dcf19ec8f757b7b680daf37a9b56d0589a6061f0d1dca7fe3a56e85
|
|
| MD5 |
e1d916007cbb58587ffcc23410dd15d3
|
|
| BLAKE2b-256 |
5cc0dbfde5027319b745125e7101e9565b9520db0fdc9cce7ba86180649ddba1
|