{
    "mode": "pydoc",
    "parameter": "yaml",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/yaml/json",
    "generated": "2026-06-02T14:26:42Z",
    "sections": {
        "NAME": {
            "content": "yaml\n",
            "subsections": []
        },
        "PACKAGE CONTENTS": {
            "content": "yaml\ncomposer\nconstructor\ncyaml\ndumper\nemitter\nerror\nevents\nloader\nnodes\nparser\nreader\nrepresenter\nresolver\nscanner\nserializer\ntokens\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.RuntimeWarning(builtins.Warning)\nYAMLLoadWarning\nbuiltins.object\nYAMLObject\nbuiltins.type(builtins.object)\nYAMLObjectMetaclass\n",
            "subsections": [
                {
                    "name": "class YAMLLoadWarning",
                    "content": "|  # Warn when load() is called without Loader=...\n|\n|  Method resolution order:\n|      YAMLLoadWarning\n|      builtins.RuntimeWarning\n|      builtins.Warning\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.RuntimeWarning:\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.RuntimeWarning:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n"
                },
                {
                    "name": "class YAMLObject",
                    "content": "|  An object that can dump itself to a YAML stream\n|  and load itself from a YAML stream.\n|\n|  Class methods defined here:\n|\n|  fromyaml(loader, node) from YAMLObjectMetaclass\n|      Convert a representation node to a Python object.\n|\n|  toyaml(dumper, data) from YAMLObjectMetaclass\n|      Convert a Python object to a representation node.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  yamldumper = <class 'yaml.dumper.Dumper'>\n|\n|  yamlflowstyle = None\n|\n|  yamlloader = [<class 'yaml.loader.Loader'>, <class 'yaml.loader.FullL...\n|\n|  yamltag = None\n"
                },
                {
                    "name": "class YAMLObjectMetaclass",
                    "content": "|  YAMLObjectMetaclass(name, bases, kwds)\n|\n|  The metaclass for YAMLObject.\n|\n|  Method resolution order:\n|      YAMLObjectMetaclass\n|      builtins.type\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(cls, name, bases, kwds)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.type:\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  dir(self, /)\n|      Specialized dir implementation for types.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  instancecheck(self, instance, /)\n|      Check if an object is an instance.\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  sizeof(self, /)\n|      Return memory consumption of the type object.\n|\n|  subclasscheck(self, subclass, /)\n|      Check if a class is a subclass.\n|\n|  subclasses(self, /)\n|      Return a list of immediate subclasses.\n|\n|  mro(self, /)\n|      Return a type's method resolution order.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.type:\n|\n|  prepare(...) from builtins.type\n|      prepare() -> dict\n|      used to create the namespace for the class statement\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.type:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.type:\n|\n|  abstractmethods\n|\n|  dict\n|\n|  textsignature\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from builtins.type:\n|\n|  base = <class 'type'>\n|      type(object) -> the object's type\n|      type(name, bases, dict, kwds) -> a new type\n|\n|\n|  bases = (<class 'type'>,)\n|\n|  basicsize = 888\n|\n|  dictoffset = 264\n|\n|  flags = 2148029952\n|\n|  itemsize = 40\n|\n|  mro = (<class 'yaml.YAMLObjectMetaclass'>, <class 'type'>, <class ...\n|\n|  weakrefoffset = 368\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "add_constructor",
                    "content": "Add a constructor for the given tag.\nConstructor is a function that accepts a Loader instance\nand a node object and produces the corresponding Python object.\n"
                },
                {
                    "name": "add_implicit_resolver",
                    "content": "Add an implicit scalar detector.\nIf an implicit scalar value matches the given regexp,\nthe corresponding tag is assigned to the scalar.\nfirst is a sequence of possible initial characters or None.\n"
                },
                {
                    "name": "add_multi_constructor",
                    "content": "Add a multi-constructor for the given tag prefix.\nMulti-constructor is called for a node if its tag starts with tagprefix.\nMulti-constructor accepts a Loader instance, a tag suffix,\nand a node object and produces the corresponding Python object.\n"
                },
                {
                    "name": "add_multi_representer",
                    "content": "Add a representer for the given type.\nMulti-representer is a function accepting a Dumper instance\nand an instance of the given data type or subtype\nand producing the corresponding representation node.\n"
                },
                {
                    "name": "add_path_resolver",
                    "content": "Add a path based resolver for the given tag.\nA path is a list of keys that forms a path\nto a node in the representation tree.\nKeys can be string values, integers, or None.\n"
                },
                {
                    "name": "add_representer",
                    "content": "Add a representer for the given type.\nRepresenter is a function accepting a Dumper instance\nand an instance of the given data type\nand producing the corresponding representation node.\n"
                },
                {
                    "name": "compose",
                    "content": "Parse the first YAML document in a stream\nand produce the corresponding representation tree.\n"
                },
                {
                    "name": "compose_all",
                    "content": "Parse all YAML documents in a stream\nand produce corresponding representation trees.\n"
                },
                {
                    "name": "dump",
                    "content": "Serialize a Python object into a YAML stream.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "dump_all",
                    "content": "Serialize a sequence of Python objects into a YAML stream.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "emit",
                    "content": "Emit YAML parsing events into a stream.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "full_load",
                    "content": "Parse the first YAML document in a stream\nand produce the corresponding Python object.\n\nResolve all tags except those known to be\nunsafe on untrusted input.\n"
                },
                {
                    "name": "full_load_all",
                    "content": "Parse all YAML documents in a stream\nand produce corresponding Python objects.\n\nResolve all tags except those known to be\nunsafe on untrusted input.\n"
                },
                {
                    "name": "load",
                    "content": "Parse the first YAML document in a stream\nand produce the corresponding Python object.\n"
                },
                {
                    "name": "load_all",
                    "content": "Parse all YAML documents in a stream\nand produce corresponding Python objects.\n"
                },
                {
                    "name": "load_warning",
                    "content": ""
                },
                {
                    "name": "parse",
                    "content": "Parse a YAML stream and produce parsing events.\n"
                },
                {
                    "name": "safe_dump",
                    "content": "Serialize a Python object into a YAML stream.\nProduce only basic YAML tags.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "safe_dump_all",
                    "content": "Serialize a sequence of Python objects into a YAML stream.\nProduce only basic YAML tags.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "safe_load",
                    "content": "Parse the first YAML document in a stream\nand produce the corresponding Python object.\n\nResolve only basic YAML tags. This is known\nto be safe for untrusted input.\n"
                },
                {
                    "name": "safe_load_all",
                    "content": "Parse all YAML documents in a stream\nand produce corresponding Python objects.\n\nResolve only basic YAML tags. This is known\nto be safe for untrusted input.\n"
                },
                {
                    "name": "scan",
                    "content": "Scan a YAML stream and produce scanning tokens.\n"
                },
                {
                    "name": "serialize",
                    "content": "Serialize a representation tree into a YAML stream.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "serialize_all",
                    "content": "Serialize a sequence of representation trees into a YAML stream.\nIf stream is None, return the produced string instead.\n"
                },
                {
                    "name": "unsafe_load",
                    "content": "Parse the first YAML document in a stream\nand produce the corresponding Python object.\n\nResolve all tags, even those known to be\nunsafe on untrusted input.\n"
                },
                {
                    "name": "unsafe_load_all",
                    "content": "Parse all YAML documents in a stream\nand produce corresponding Python objects.\n\nResolve all tags, even those known to be\nunsafe on untrusted input.\n"
                },
                {
                    "name": "warnings",
                    "content": "# Get or set global warnings' state\n"
                }
            ]
        },
        "DATA": {
            "content": "withlibyaml = True\n",
            "subsections": []
        },
        "VERSION": {
            "content": "5.4.1\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3/dist-packages/yaml/init.py\n\n",
            "subsections": []
        }
    },
    "summary": "yaml",
    "flags": [],
    "examples": [],
    "see_also": []
}