Back to bricks list
Introduction Version

SerializableRField

BaseRField, these fields must be used in resource attribute. When a class attribute is instantiated with an RField, the field will be automatically saved after the task run when the resource is on task outputs, and the field will automatically be initialized with the saved value for input resources of a task

Attributes

include_in_dict_view: boolobject_type: Typesearchable: bool

Functions

__INIT__

RField to serialize and deserialize python object to and from json Do not mark huge fields as include in dict view, defaults to False

Parameters:
NameTypeDefault valueDescription
object_typeType Type of the jsonable object. this type is instantiated when the resource is created. it must have a constructor with no parameter. [serializableobject], optional
include_in_dict_viewbool False If true, this field we be included in the default dict view , optional
DESERIALIZE
Parameters:
NameTypeDefault valueDescription
r_field_valueAny
Return type:
SerializableObjectJson
GET_DEFAULT_VALUE
Return type:
Any
SERIALIZE
Parameters:
NameTypeDefault valueDescription
r_field_valueSerializableObjectJson
Return type:
Any