pureyaml package¶
pureyaml¶
Yet another yaml parser, in pure python.
Submodules¶
pureyaml.decoder module¶
-
class
pureyaml.decoder.
YAMLDecoder
(*args, **kwargs)[source]¶ Bases:
pureyaml.nodes.NodeVisitor
Convert node tree into python object.
-
__doc__
= 'Convert node tree into python object.'¶
-
__module__
= 'pureyaml.decoder'¶
-
visit_Bool
(node)¶
-
visit_Doc
(node)¶
-
visit_Float
(node)¶
-
visit_Int
(node)¶
-
visit_Str
(node)¶
-
pureyaml.encoder module¶
pureyaml.exceptions module¶
-
exception
pureyaml.exceptions.
YAMLCastTypeError
(message=None, cast=None)[source]¶ Bases:
exceptions.TypeError
,pureyaml.exceptions.YAMLException
-
__doc__
= None¶
-
__module__
= 'pureyaml.exceptions'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
exception
pureyaml.exceptions.
YAMLException
(message)[source]¶ Bases:
exceptions.Exception
Base exception for package
-
__doc__
= 'Base exception for package'¶
-
__module__
= 'pureyaml.exceptions'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
exception
pureyaml.exceptions.
YAMLStrictTypeError
(token, types, func)[source]¶ Bases:
exceptions.TypeError
,pureyaml.exceptions.YAMLException
-
__doc__
= None¶
-
__module__
= 'pureyaml.exceptions'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
pureyaml.nodes module¶
Node definitions for intermediary node tree.
-
class
pureyaml.nodes.
Node
(value, **kwargs)[source]¶ Bases:
object
-
__dict__
= dict_proxy({'__ne__': <function __ne__ at 0x7f6244523848>, '__module__': 'pureyaml.nodes', '__ge__': <function __ge__ at 0x7f6244523c80>, '__weakref__': <attribute '__weakref__' of 'Node' objects>, 'repr_value': <function repr_value at 0x7f62445238c0>, 'init_value': <function init_value at 0x7f62445236e0>, '__le__': <function __le__ at 0x7f6244523cf8>, '__repr__': <function __repr__ at 0x7f6244523938>, '__gt__': <function __gt__ at 0x7f62445237d0>, '__dict__': <attribute '__dict__' of 'Node' objects>, '__lt__': <function __lt__ at 0x7f6244523c08>, '__eq__': <function __eq__ at 0x7f6244523758>, '__doc__': None, '__init__': <function __init__ at 0x7f6244523668>})¶
-
__doc__
= None¶
-
__ge__
(other)¶ x.__ge__(y) <==> x>=y
-
__le__
(other)¶ x.__le__(y) <==> x<=y
-
__lt__
(other)¶ x.__lt__(y) <==> x<y
-
__module__
= 'pureyaml.nodes'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
pureyaml.nodes.
Collection
(*values, **kwargs)[source]¶ Bases:
pureyaml.nodes.SequenceMixin
,pureyaml.nodes.Node
-
__abstractmethods__
= frozenset([])¶
-
__add__
(other)¶
-
__doc__
= None¶
-
__init__
(*values, **kwargs)¶
-
__module__
= 'pureyaml.nodes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 25¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
init_value
(*value, **kwargs)¶
-
-
class
pureyaml.nodes.
Docs
(*values, **kwargs)[source]¶ Bases:
pureyaml.nodes.Collection
-
__abstractmethods__
= frozenset([])¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 25¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
pureyaml.nodes.
Doc
(*values, **kwargs)[source]¶ Bases:
pureyaml.nodes.Collection
-
__abstractmethods__
= frozenset([])¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 25¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
pureyaml.nodes.
Sequence
(*values, **kwargs)[source]¶ Bases:
pureyaml.nodes.Collection
-
__abstractmethods__
= frozenset([])¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 25¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
pureyaml.nodes.
Map
(*args, **kwargs)[source]¶ Bases:
pureyaml.nodes.MappingMixin
,pureyaml.nodes.Collection
-
__abstractmethods__
= frozenset([])¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
_abc_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache
= <_weakrefset.WeakSet object>¶
-
_abc_negative_cache_version
= 25¶
-
_abc_registry
= <_weakrefset.WeakSet object>¶
-
-
class
pureyaml.nodes.
Scalar
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Node
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
= NotImplemented¶
-
-
class
pureyaml.nodes.
Null
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
= None¶
-
-
class
pureyaml.nodes.
Str
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
¶ alias of
str
-
-
class
pureyaml.nodes.
Int
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
¶ alias of
int
-
-
class
pureyaml.nodes.
Float
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
¶ alias of
float
-
-
class
pureyaml.nodes.
Bool
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
FALSE_VALUES
= ['FALSE', 'NO', '0']¶
-
TRUE_VALUES
= ['TRUE', 'YES', '1']¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
¶ alias of
bool
-
-
class
pureyaml.nodes.
Binary
(value, *args, **kwargs)[source]¶ Bases:
pureyaml.nodes.Scalar
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
type
= 'binary'¶
-
-
class
pureyaml.nodes.
ScalarDispatch
[source]¶ Bases:
object
-
__dict__
= dict_proxy({'map': {'int16': <functools.partial object at 0x7f62444d7a48>, 'infinity': <class 'pureyaml.nodes.Float'>, 'int10': <functools.partial object at 0x7f62444d7998>, 'int': <class 'pureyaml.nodes.Int'>, 'float': <class 'pureyaml.nodes.Float'>, 'null': <class 'pureyaml.nodes.Null'>, 'int8': <functools.partial object at 0x7f62444d79f0>, 'binary': <class 'pureyaml.nodes.Binary'>, 'nan': <class 'pureyaml.nodes.Float'>, 'bool': <class 'pureyaml.nodes.Bool'>, 'str': <class 'pureyaml.nodes.Str'>}, '__module__': 'pureyaml.nodes', '__new__': <staticmethod object at 0x7f62444c7948>, 're_dispatch': <_sre.SRE_Pattern object at 0x17d3530>, '__dict__': <attribute '__dict__' of 'ScalarDispatch' objects>, '__weakref__': <attribute '__weakref__' of 'ScalarDispatch' objects>, '__doc__': None})¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
map
= {'int16': <functools.partial object at 0x7f62444d7a48>, 'infinity': <class 'pureyaml.nodes.Float'>, 'int10': <functools.partial object at 0x7f62444d7998>, 'int': <class 'pureyaml.nodes.Int'>, 'float': <class 'pureyaml.nodes.Float'>, 'null': <class 'pureyaml.nodes.Null'>, 'int8': <functools.partial object at 0x7f62444d79f0>, 'binary': <class 'pureyaml.nodes.Binary'>, 'nan': <class 'pureyaml.nodes.Float'>, 'bool': <class 'pureyaml.nodes.Bool'>, 'str': <class 'pureyaml.nodes.Str'>}¶
-
re_dispatch
= <_sre.SRE_Pattern object at 0x17d3530>¶
-
-
class
pureyaml.nodes.
NodeVisitor
(*args, **kwargs)[source]¶ Bases:
object
-
__dict__
= dict_proxy({'__module__': 'pureyaml.nodes', '_visit': <function _visit at 0x7f62444db578>, 'visit': <function visit at 0x7f62444db500>, '__doc__': None, '__dict__': <attribute '__dict__' of 'NodeVisitor' objects>, '__weakref__': <attribute '__weakref__' of 'NodeVisitor' objects>, 'generic_visit': <function generic_visit at 0x7f62444db5f0>, '__init__': <function __init__ at 0x7f62444db488>})¶
-
__doc__
= None¶
-
__module__
= 'pureyaml.nodes'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-