Warning!
The version you're viewing is not the latest.
Go to the latest version
Function safe_load
Synopsis
def safe_load(stream)
Description
Parse the first YAML document in a stream and produce the corresponding Python object.
Resolve only basic YAML tags. This is known to be safe for untrusted input.
Mentioned in
- Documentation / Loading YAML
- Documentation / The yaml package
- Documentation / Loader
Source
Lines 154-163 in lib3/yaml/__init__.py.
def safe_load(stream):
"""
Parse the first YAML document in a stream
and produce the corresponding Python object.
Resolve only basic YAML tags. This is known
to be safe for untrusted input.
"""
return load(stream, SafeLoader)