# yaml - pydoc - phpman

Help on package yaml:

## NAME
    yaml

## PACKAGE CONTENTS
    _yaml
    composer
    constructor
    cyaml
    dumper
    emitter
    error
    events
    loader
    nodes
    parser
    reader
    representer
    resolver
    scanner
    serializer
    tokens

## CLASSES
    builtins.RuntimeWarning(builtins.Warning)
        YAMLLoadWarning
    builtins.object
        YAMLObject
    builtins.type(builtins.object)
        YAMLObjectMetaclass

### class YAMLLoadWarning
     |  # Warn when load() is called without Loader=...
     |
     |  Method resolution order:
     |      YAMLLoadWarning
     |      builtins.RuntimeWarning
     |      builtins.Warning
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object (if defined)
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.RuntimeWarning:
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.RuntimeWarning:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  __setstate__(...)
     |
     |  __str__(self, /)
     |      Return str(self).
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

### class YAMLObject
     |  An object that can dump itself to a YAML stream
     |  and load itself from a YAML stream.
     |
     |  Class methods defined here:
     |
     |  from_yaml(loader, node) from YAMLObjectMetaclass
     |      Convert a representation node to a Python object.
     |
     |  to_yaml(dumper, data) from YAMLObjectMetaclass
     |      Convert a Python object to a representation node.
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  yaml_dumper = <class 'yaml.dumper.Dumper'>
     |
     |  yaml_flow_style = None
     |
     |  yaml_loader = [<class 'yaml.loader.Loader'>, <class 'yaml.loader.FullL...
     |
     |  yaml_tag = None

### class YAMLObjectMetaclass
     |  YAMLObjectMetaclass(name, bases, kwds)
     |
     |  The metaclass for YAMLObject.
     |
     |  Method resolution order:
     |      YAMLObjectMetaclass
     |      builtins.type
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(cls, name, bases, kwds)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.type:
     |
     |  __call__(self, /, *args, **kwargs)
     |      Call self as a function.
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __dir__(self, /)
     |      Specialized __dir__ implementation for types.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __instancecheck__(self, instance, /)
     |      Check if an object is an instance.
     |
     |  __or__(self, value, /)
     |      Return self|value.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __ror__(self, value, /)
     |      Return value|self.
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  __sizeof__(self, /)
     |      Return memory consumption of the type object.
     |
     |  __subclasscheck__(self, subclass, /)
     |      Check if a class is a subclass.
     |
     |  __subclasses__(self, /)
     |      Return a list of immediate subclasses.
     |
     |  mro(self, /)
     |      Return a type's method resolution order.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.type:
     |
     |  __prepare__(...) from builtins.type
     |      __prepare__() -> dict
     |      used to create the namespace for the class statement
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.type:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.type:
     |
     |  __abstractmethods__
     |
     |  __dict__
     |
     |  __text_signature__
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from builtins.type:
     |
     |  __base__ = <class 'type'>
     |      type(object) -> the object's type
     |      type(name, bases, dict, **kwds) -> a new type
     |
     |
     |  __bases__ = (<class 'type'>,)
     |
     |  __basicsize__ = 888
     |
     |  __dictoffset__ = 264
     |
     |  __flags__ = 2148029952
     |
     |  __itemsize__ = 40
     |
     |  __mro__ = (<class 'yaml.YAMLObjectMetaclass'>, <class 'type'>, <class ...
     |
     |  __weakrefoffset__ = 368

## FUNCTIONS
### add_constructor
        Add a constructor for the given tag.
        Constructor is a function that accepts a Loader instance
        and a node object and produces the corresponding Python object.

### add_implicit_resolver
        Add an implicit scalar detector.
        If an implicit scalar value matches the given regexp,
        the corresponding tag is assigned to the scalar.
        first is a sequence of possible initial characters or None.

### add_multi_constructor
        Add a multi-constructor for the given tag prefix.
        Multi-constructor is called for a node if its tag starts with tag_prefix.
        Multi-constructor accepts a Loader instance, a tag suffix,
        and a node object and produces the corresponding Python object.

### add_multi_representer
        Add a representer for the given type.
        Multi-representer is a function accepting a Dumper instance
        and an instance of the given data type or subtype
        and producing the corresponding representation node.

### add_path_resolver
        Add a path based resolver for the given tag.
        A path is a list of keys that forms a path
        to a node in the representation tree.
        Keys can be string values, integers, or None.

### add_representer
        Add a representer for the given type.
        Representer is a function accepting a Dumper instance
        and an instance of the given data type
        and producing the corresponding representation node.

### compose
        Parse the first YAML document in a stream
        and produce the corresponding representation tree.

### compose_all
        Parse all YAML documents in a stream
        and produce corresponding representation trees.

### dump
        Serialize a Python object into a YAML stream.
        If stream is None, return the produced string instead.

### dump_all
        Serialize a sequence of Python objects into a YAML stream.
        If stream is None, return the produced string instead.

### emit
        Emit YAML parsing events into a stream.
        If stream is None, return the produced string instead.

### full_load
        Parse the first YAML document in a stream
        and produce the corresponding Python object.

        Resolve all tags except those known to be
        unsafe on untrusted input.

### full_load_all
        Parse all YAML documents in a stream
        and produce corresponding Python objects.

        Resolve all tags except those known to be
        unsafe on untrusted input.

### load
        Parse the first YAML document in a stream
        and produce the corresponding Python object.

### load_all
        Parse all YAML documents in a stream
        and produce corresponding Python objects.

### load_warning

### parse
        Parse a YAML stream and produce parsing events.

### safe_dump
        Serialize a Python object into a YAML stream.
        Produce only basic YAML tags.
        If stream is None, return the produced string instead.

### safe_dump_all
        Serialize a sequence of Python objects into a YAML stream.
        Produce only basic YAML tags.
        If stream is None, return the produced string instead.

### safe_load
        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.

### safe_load_all
        Parse all YAML documents in a stream
        and produce corresponding Python objects.

        Resolve only basic YAML tags. This is known
        to be safe for untrusted input.

### scan
        Scan a YAML stream and produce scanning tokens.

### serialize
        Serialize a representation tree into a YAML stream.
        If stream is None, return the produced string instead.

### serialize_all
        Serialize a sequence of representation trees into a YAML stream.
        If stream is None, return the produced string instead.

### unsafe_load
        Parse the first YAML document in a stream
        and produce the corresponding Python object.

        Resolve all tags, even those known to be
        unsafe on untrusted input.

### unsafe_load_all
        Parse all YAML documents in a stream
        and produce corresponding Python objects.

        Resolve all tags, even those known to be
        unsafe on untrusted input.

### warnings
        # Get or set global warnings' state

## DATA
    __with_libyaml__ = True

## VERSION
    5.4.1

## FILE
    /usr/lib/python3/dist-packages/yaml/__init__.py


