ImportYAML

Import a YAML file.

ResourceFunction["ImportYAML"][session,file]

import YAML file, using an external Python session.

Details and Options

Requires the PyYAML package (pip install PyYAML) on your machine.

Examples

Basic Examples

Install PyYAML, if not already available:

In[1]:=
RunProcess[{"pip", "install", "PyYAML"}, "StandardOutput"]
Out[1]=

Import a YAML file:

In[2]:=
session = StartExternalSession["Python"];
ResourceFunction[ "https://www.wolframcloud.com/objects/user-7053ce31-817f-4643-aec1-\
eda27051bba6/DeployedResources/Function/ImportYAML"][session, \
"document.yaml"]
Out[3]=

Display the raw content of the file:

In[4]:=
FilePrint["document.yaml"]

Publisher Information