pyignite.datatypes.internal module¶
-
class
pyignite.datatypes.internal.
AnyDataArray
(counter_type=<class 'ctypes.c_int'>)¶ Bases:
pyignite.datatypes.internal.AnyDataObject
Sequence of AnyDataObjects, payload-only.
-
__init__
(counter_type=<class 'ctypes.c_int'>) → None¶ Method generated by attrs for class AnyDataArray.
-
build_c_type
(fields)¶
-
from_python
(stream, value)¶
-
from_python_async
(stream, value)¶
-
parse
(stream)¶
-
parse_async
(stream)¶
-
classmethod
to_python
(ctypes_object, **kwargs)¶
-
classmethod
to_python_async
(ctypes_object, **kwargs)¶
-
-
class
pyignite.datatypes.internal.
AnyDataObject
¶ Bases:
object
Not an actual Ignite type, but contains a guesswork on serializing Python data or parsing an unknown Ignite data object.
-
classmethod
from_python
(stream, value)¶
-
classmethod
from_python_async
(stream, value)¶
-
static
get_subtype
(iterable, allow_none=False)¶
-
classmethod
map_python_type
(value)¶
-
classmethod
parse
(stream)¶
-
classmethod
parse_async
(stream)¶
-
classmethod
to_python
(ctypes_object, **kwargs)¶
-
classmethod
to_python_async
(ctypes_object, **kwargs)¶
-
classmethod
-
class
pyignite.datatypes.internal.
Struct
(fields: list, dict_type=<class 'collections.OrderedDict'>, defaults: dict = {})¶ Bases:
object
Sequence of fields, including variable-sized and nested.
-
__init__
(fields: list, dict_type=<class 'collections.OrderedDict'>, defaults: dict = {}) → None¶ Method generated by attrs for class Struct.
-
static
build_c_type
(fields)¶
-
from_python
(stream, value)¶
-
from_python_async
(stream, value)¶
-
parse
(stream)¶
-
parse_async
(stream)¶
-
to_python
(ctypes_object, **kwargs) → Union[dict, collections.OrderedDict]¶
-
to_python_async
(ctypes_object, **kwargs) → Union[dict, collections.OrderedDict]¶
-
-
class
pyignite.datatypes.internal.
StructArray
(following: list = NOTHING, counter_type=<class 'ctypes.c_int'>, defaults: dict = {})¶ Bases:
object
counter_type counter, followed by count*following structure.
-
__init__
(following: list = NOTHING, counter_type=<class 'ctypes.c_int'>, defaults: dict = {}) → None¶ Method generated by attrs for class StructArray.
-
static
build_c_type
(fields)¶
-
from_python
(stream, value)¶
-
from_python_async
(stream, value)¶
-
parse
(stream)¶
-
parse_async
(stream)¶
-
to_python
(ctypes_object, **kwargs)¶
-
to_python_async
(ctypes_object, **kwargs)¶
-
-
pyignite.datatypes.internal.
tc_map
(key: bytes)¶ Returns a default parser/generator class for the given type code.
This mapping is used internally inside listed complex parser/generator classes, so it has to be a function. Local imports are used for the same reason.
Parameters: - key – Ignite type code,
- _memo_map – do not use this parameter, it is for memoization of the “type code-type class” mapping,
Returns: parser/generator class for the type code.
-
pyignite.datatypes.internal.
infer_from_python
(stream, value: Any)¶ Convert pythonic value to ctypes buffer, type hint-aware.
Parameters: value – pythonic value or (value, type_hint) tuple, Returns: bytes.
-
pyignite.datatypes.internal.
infer_from_python_async
(stream, value: Any)¶ Async version of infer_from_python