pyignite.binary module¶
GenericObjectMeta
is a metaclass used to create
classes, which objects serve as a native Python values for Ignite Complex
object data type. You can use this metaclass with your existing classes
to save and restore their selected attributes and properties to/from
Ignite caches. It is also used internally by pyignite to create simple
data classes “on the fly” when retrieving arbitrary Complex objects.
You can get the examples of using Complex objects in the Complex objects section of pyignite documentation.
-
class
pyignite.binary.
GenericObjectMeta
(name: str, base_classes: tuple, namespace: dict, type_name: str = None, schema: collections.OrderedDict = None, **kwargs)¶ Bases:
pyignite.binary.GenericObjectPropsMeta
Complex (or Binary) Object metaclass. It is aimed to help user create classes, which objects could serve as a pythonic representation of the
BinaryObject
Ignite data type.-
__init__
(name: str, base_classes: tuple, namespace: dict, type_name: str = None, schema: collections.OrderedDict = None, **kwargs)¶ Initializes binary object class.
Parameters: - type_name – (optional) binary object name. Defaults to class name,
- schema – (optional) a dict of field names: field types,
Raise: ParseError if one or more binary field types did not recognized.
-
version
= None¶
-
-
class
pyignite.binary.
GenericObjectProps
¶ Bases:
pyignite.datatypes.base.IgniteDataTypeProps
This class is mixed both to metaclass and to resulting class to make class properties universally available. You should not subclass it directly.
-
schema
¶ Binary object schema.
-
schema_id
¶ Binary object schema ID.
-
-
class
pyignite.binary.
GenericObjectPropsMeta
¶ Bases:
type
,pyignite.binary.GenericObjectProps