Skip to main content

PyYAML loaders with enhanced functionalities.

Project description

pyyaml-loaders

PyPI package page.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyyaml_loaders-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyyaml_loaders-0.2.0-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

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

Hashes for pyyaml_loaders-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cea6cde69357b8d774803ec41afaf038990f33589c623d48ae02fbd620051760
MD5 33925f9b11b05a7037d93c4b0c236b01
BLAKE2b-256 53d6f3ee427745499d57168121388fd1325b060213b1d832578c90d188637022

See more details on using hashes here.

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

Hashes for pyyaml_loaders-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54f273496dcf19ec8f757b7b680daf37a9b56d0589a6061f0d1dca7fe3a56e85
MD5 e1d916007cbb58587ffcc23410dd15d3
BLAKE2b-256 5cc0dbfde5027319b745125e7101e9565b9520db0fdc9cce7ba86180649ddba1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page