(yaml_str=None, str_or_buffer=None, ordered=False)
return d
Load YAML from a string, file, or buffer (an object with a .read method).
    Parameters are mutually exclusive.

    Parameters
    ----------
    yaml_str : str, optional
        A string of YAML.
    str_or_buffer : str or file like, optional
        File name or buffer from which to load YAML.
    ordered: bool, optional, default False
        If True, an OrderedDict is returned.

    Returns
    -------
    dict
        Conversion from YAML.
Load YAML from a string, file, or buffer (an object with a .read method).
    Parameters are mutually exclusive.
Load YAML from a string file or buffer ( an object with a . read method ) . Parameters are mutually exclusive .
def yaml_to_dict(yaml_str=None, str_or_buffer=None, ordered=False):
    """
    Load YAML from a string, file, or buffer (an object with a .read method).
    Parameters are mutually exclusive.

    Parameters
    ----------
    yaml_str : str, optional
        A string of YAML.
    str_or_buffer : str or file like, optional
        File name or buffer from which to load YAML.
    ordered: bool, optional, default False
        If True, an OrderedDict is returned.

    Returns
    -------
    dict
        Conversion from YAML.

    """
    if not yaml_str and not str_or_buffer:
        raise ValueError('One of yaml_str or str_or_buffer is required.')

    # determine which load method to use
    if ordered:
        loader = __ordered_load
    else:
        loader = yaml.safe_load

    if yaml_str:
        d = loader(yaml_str)
    elif isinstance(str_or_buffer, str):
        with open(str_or_buffer) as f:
            d = loader(f)
    else:
        d = loader(str_or_buffer)

    return d
def yaml_to_dict ( yaml_str = None , str_or_buffer = None , ordered = False ) : if not yaml_str and not str_or_buffer : raise ValueError ( 'One of yaml_str or str_or_buffer is required.' ) # determine which load method to use if ordered : loader = __ordered_load else : loader = yaml . safe_load if yaml_str : d = loader ( yaml_str ) elif isinstance ( str_or_buffer , str ) : with open ( str_or_buffer ) as f : d = loader ( f ) else : d = loader ( str_or_buffer ) return d