pg.symbolic.ObjectMeta

Accessible via pg.symbolic.ObjectMeta.

class ObjectMeta(name, bases, namespace, **kwargs)[source]

Bases: ABCMeta

Meta class for pg.Object.

Methods:

apply_schema([schema])

Applies a schema to a symbolic class.

register_for_deserialization([...])

Register current symbolic class for deserialization.

update_schema(fields[, extend, ...])

Updates the schema of the class.

Attributes:

init_arg_list

Gets __init__ positional argument list.

sym_fields

Gets symbolic field.

apply_schema(schema=None)[source]

Applies a schema to a symbolic class.

Return type:

None

Parameters:

schema – The schema that will be applied to class. If cls was attached with an existing schema. The old schema will be dropped. If None, the cls will update its signature and getters according to the (maybe updated) old schema.

property init_arg_list: List[str][source]

Gets __init__ positional argument list.

register_for_deserialization(serialization_key=None, additional_keys=None)[source]

Register current symbolic class for deserialization.

Return type:

None

property sym_fields: Dict[source]

Gets symbolic field.

update_schema(fields, extend=True, *, init_arg_list=None, metadata=None)[source]

Updates the schema of the class.

Return type:

None