aiida_restapi.models package

Contents

aiida_restapi.models package#

Submodules#

aiida_restapi.models.node module#

Pydantic models for AiiDA REST API nodes.

Bases: BaseModel

__abstractmethods__ = frozenset({})#
__annotations__ = {'link_id': 'str', 'link_label': 'str', 'link_type': 'str', 'source': 'str', 'target': 'str'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.node'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.node.NodeLink'>, 'config': {'title': 'NodeLink'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.NodeLink'>>]}, 'ref': 'aiida_restapi.models.node.NodeLink:102854672606512', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'link_id': {'metadata': {'pydantic_js_updates': {'description': 'The unique identifier of the link.', 'examples': ['<source_uuid>:<target_uuid>']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'link_label': {'metadata': {'pydantic_js_updates': {'description': 'The label of the link to the node.', 'examples': ['structure']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'link_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the link to the node.', 'examples': ['input_calc']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'source': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the source node.', 'examples': ['<source_uuid>']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'target': {'metadata': {'pydantic_js_updates': {'description': 'The UUID of the target node.', 'examples': ['<target_uuid>']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'NodeLink', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'link_id': FieldInfo(annotation=str, required=True, description='The unique identifier of the link.', examples=['<source_uuid>:<target_uuid>']), 'link_label': FieldInfo(annotation=str, required=True, description='The label of the link to the node.', examples=['structure']), 'link_type': FieldInfo(annotation=str, required=True, description='The type of the link to the node.', examples=['input_calc']), 'source': FieldInfo(annotation=str, required=True, description='The UUID of the source node.', examples=['<source_uuid>']), 'target': FieldInfo(annotation=str, required=True, description='The UUID of the target node.', examples=['<target_uuid>'])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb8396530,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb8396530,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb8396530,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "link_id": SerField {                                         key: "link_id",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "source": SerField {                                         key: "source",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "target": SerField {                                         key: "target",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "link_label": SerField {                                         key: "link_label",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "link_type": SerField {                                         key: "link_type",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 5,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "NodeLink",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="NodeLink", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "link_id",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "link_id",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "source",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "source",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "target",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "target",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "link_label",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "link_label",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "link_type",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "link_type",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "NodeLink",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "source",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "link_id",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "link_label",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "link_type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "target",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb8396530,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "NodeLink",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, link_id: str, source: str, target: str, link_label: str, link_type: str) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

source#
target#
class aiida_restapi.models.node.NodeModelRegistry[source]#

Bases: object

Registry for AiiDA REST API node models.

This class maintains mappings of node types and their corresponding Pydantic models.

Variables:
  • WriteModelUnion – An AiiDA ORM model union for attributes-based node creation.

  • ConstructorModelUnion – An AiiDA ORM model union for constructor-based node creation.

__dict__ = mappingproxy({'__module__': 'aiida_restapi.models.node', '__doc__': 'Registry for AiiDA REST API node models.\n\n    This class maintains mappings of node types and their corresponding Pydantic models.\n\n    :ivar WriteModelUnion: An AiiDA ORM model union for attributes-based node creation.\n    :ivar ConstructorModelUnion: An AiiDA ORM model union for constructor-based node creation.\n    ', '__init__': <function NodeModelRegistry.__init__>, 'get_node_types': <function NodeModelRegistry.get_node_types>, 'get_node_class_name': <function NodeModelRegistry.get_node_class_name>, 'get_model': <function NodeModelRegistry.get_model>, 'get_post_model_from_payload': <function NodeModelRegistry.get_post_model_from_payload>, '_build_node_mappings': <function NodeModelRegistry._build_node_mappings>, '_build_model_union': <function NodeModelRegistry._build_model_union>, '__dict__': <attribute '__dict__' of 'NodeModelRegistry' objects>, '__weakref__': <attribute '__weakref__' of 'NodeModelRegistry' objects>, '__annotations__': {}})#
__init__()[source]#
__module__ = 'aiida_restapi.models.node'#
__weakref__#

list of weak references to the object

_build_model_union(which)[source]#

Build a union type of node models for the given payload kind.

Parameters:

which (str) – The kind of model to build the union for (‘write’ or ‘constructor’).

Returns:

A Pydantic model union type for the specified kind of node creation.

Return type:

Any

_build_node_mappings()[source]#

Build mapping of node type to node creation model.

get_model(node_type, which='read')[source]#

Get the Pydantic model class for a given node type.

Parameters:

node_type (str) – The AiiDA node type string.

Returns:

The corresponding Pydantic model class.

Return type:

type[OrmModel] | None

get_node_class_name(node_type)[source]#

Get the AiiDA node class name for a given node type.

Parameters:

node_type (str) – The AiiDA node type string.

Returns:

The corresponding node class name.

Return type:

str

get_node_types()[source]#

Get the list of registered node types.

Returns:

List of node type strings.

get_post_model_from_payload(payload, which=None)[source]#

Get the node creation model (write or constructor) from payload shape.

Parameters:
  • payload (dict[str, Any]) – The JSON payload from which to infer the node type and model.

  • which (str) – Optionally specify which model type to return. If not provided, it will be inferred from the presence of attributes (for write) or args (for constructor) in the payload.

Returns:

The corresponding Pydantic model class for node creation.

Return type:

type[OrmModel]

class aiida_restapi.models.node.NodeStatistics(*, total, types, ctime_by_day)[source]#

Bases: BaseModel

Pydantic model representing node statistics.

__abstractmethods__ = frozenset({})#
__annotations__ = {'ctime_by_day': 'dict[str, int]', 'total': 'int', 'types': 'dict[str, int]'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.node'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.node.NodeStatistics'>, 'config': {'title': 'NodeStatistics'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.NodeStatistics'>>]}, 'ref': 'aiida_restapi.models.node.NodeStatistics:102854672560288', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'ctime_by_day': {'metadata': {'pydantic_js_updates': {'description': 'Number of nodes created per day (YYYY-MM-DD).', 'examples': [{'2012-01-01': 10, '2012-01-02': 15}]}}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'int'}}, 'type': 'model-field'}, 'total': {'metadata': {'pydantic_js_updates': {'description': 'Total number of nodes.', 'examples': [47]}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'types': {'metadata': {'pydantic_js_updates': {'description': 'Number of nodes by type.', 'examples': [{'data.core.int.Int.': 42, 'data.core.singlefile.SinglefileData.': 5}]}}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'int'}}, 'type': 'model-field'}}, 'model_name': 'NodeStatistics', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'ctime_by_day': FieldInfo(annotation=dict[str, int], required=True, description='Number of nodes created per day (YYYY-MM-DD).', examples=[{'2012-01-01': 10, '2012-01-02': 15}]), 'total': FieldInfo(annotation=int, required=True, description='Total number of nodes.', examples=[47]), 'types': FieldInfo(annotation=dict[str, int], required=True, description='Number of nodes by type.', examples=[{'data.core.int.Int.': 42, 'data.core.singlefile.SinglefileData.': 5}])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb838b0a0,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb838b0a0,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb838b0a0,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "total": SerField {                                         key: "total",                                         alias: None,                                         serializer: Some(                                             Int(                                                 IntSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "ctime_by_day": SerField {                                         key: "ctime_by_day",                                         alias: None,                                         serializer: Some(                                             Dict(                                                 DictSerializer {                                                     key_serializer: Str(                                                         StrSerializer,                                                     ),                                                     value_serializer: Int(                                                         IntSerializer,                                                     ),                                                     filter: SchemaFilter {                                                         include: None,                                                         exclude: None,                                                     },                                                     name: "dict[str, int]",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "types": SerField {                                         key: "types",                                         alias: None,                                         serializer: Some(                                             Dict(                                                 DictSerializer {                                                     key_serializer: Str(                                                         StrSerializer,                                                     ),                                                     value_serializer: Int(                                                         IntSerializer,                                                     ),                                                     filter: SchemaFilter {                                                         include: None,                                                         exclude: None,                                                     },                                                     name: "dict[str, int]",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 3,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "NodeStatistics",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="NodeStatistics", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "total",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "total",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "types",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "types",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Dict(                             DictValidator {                                 strict: false,                                 key_validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 value_validator: Int(                                     IntValidator {                                         strict: false,                                     },                                 ),                                 min_length: None,                                 max_length: None,                                 fail_fast: false,                                 name: "dict[str,int]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "ctime_by_day",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "ctime_by_day",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Dict(                             DictValidator {                                 strict: false,                                 key_validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 value_validator: Int(                                     IntValidator {                                         strict: false,                                     },                                 ),                                 min_length: None,                                 max_length: None,                                 fail_fast: false,                                 name: "dict[str,int]",                             },                         ),                         frozen: false,                     },                 ],                 model_name: "NodeStatistics",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "total",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "ctime_by_day",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "types",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb838b0a0,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "NodeStatistics",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, total: int, types: dict[str, int], ctime_by_day: dict[str, int]) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
ctime_by_day#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

total#
types#
class aiida_restapi.models.node.NodeType(*, label, node_type, nodes, projections, node_schema)[source]#

Bases: BaseModel

Pydantic model representing a node type.

__abstractmethods__ = frozenset({})#
__annotations__ = {'label': 'str', 'node_schema': 'str', 'node_type': 'str', 'nodes': 'str', 'projections': 'str'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.node'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.node.NodeType'>, 'config': {'title': 'NodeType'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.NodeType'>>]}, 'ref': 'aiida_restapi.models.node.NodeType:102854672571648', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'label': {'metadata': {'pydantic_js_updates': {'description': 'The class name of the node type.', 'examples': ['Int']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'node_schema': {'metadata': {'pydantic_js_updates': {'description': 'The URL to access the schema of this node type.', 'examples': ['../nodes/schema?type=data.core.int.Int.']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'The AiiDA node type string.', 'examples': ['data.core.int.Int.']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'nodes': {'metadata': {'pydantic_js_updates': {'description': 'The URL to access nodes of this type.', 'examples': ['../nodes?filters={"node_type":{"data.core.int.Int."}}']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'projections': {'metadata': {'pydantic_js_updates': {'description': 'The URL to access projectable properties of this node type.', 'examples': ['../nodes/projections?type=data.core.int.Int.']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'NodeType', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'label': FieldInfo(annotation=str, required=True, description='The class name of the node type.', examples=['Int']), 'node_schema': FieldInfo(annotation=str, required=True, description='The URL to access the schema of this node type.', examples=['../nodes/schema?type=data.core.int.Int.']), 'node_type': FieldInfo(annotation=str, required=True, description='The AiiDA node type string.', examples=['data.core.int.Int.']), 'nodes': FieldInfo(annotation=str, required=True, description='The URL to access nodes of this type.', examples=['../nodes?filters={"node_type":{"data.core.int.Int."}}']), 'projections': FieldInfo(annotation=str, required=True, description='The URL to access projectable properties of this node type.', examples=['../nodes/projections?type=data.core.int.Int.'])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb838dd00,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb838dd00,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb838dd00,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "node_type": SerField {                                         key: "node_type",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "nodes": SerField {                                         key: "nodes",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "projections": SerField {                                         key: "projections",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "node_schema": SerField {                                         key: "node_schema",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "label": SerField {                                         key: "label",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 5,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "NodeType",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="NodeType", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "label",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "label",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "node_type",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "node_type",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "nodes",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "nodes",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "projections",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "projections",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "node_schema",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "node_schema",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "NodeType",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "nodes",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "projections",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "label",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "node_type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "node_schema",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb838dd00,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "NodeType",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, label: str, node_type: str, nodes: str, projections: str, node_schema: str) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
label#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_schema#
node_type#
nodes#
projections#
class aiida_restapi.models.node.RepoDirMetadata(*, type, objects)[source]#

Bases: BaseModel

Pydantic model representing the metadata of a directory in the AiiDA repository.

__abstractmethods__ = frozenset({})#
__annotations__ = {'file_type': "t.Literal['DIRECTORY']", 'objects': "dict[str, t.Union[RepoFileMetadata, 'RepoDirMetadata']]"}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.node'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'definitions': [{'cls': <class 'aiida_restapi.models.node.RepoDirMetadata'>, 'config': {'title': 'RepoDirMetadata'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.RepoDirMetadata'>>]}, 'ref': 'aiida_restapi.models.node.RepoDirMetadata:102854672588208', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'file_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the repository object.', 'examples': ['DIRECTORY']}}, 'schema': {'expected': ['DIRECTORY'], 'type': 'literal'}, 'serialization_alias': 'type', 'type': 'model-field', 'validation_alias': 'type'}, 'objects': {'metadata': {'pydantic_js_updates': {'description': 'A dictionary with the metadata of the objects in the directory.', 'examples': [{'file.txt': {'binary': False, 'download': '../nodes/{uuid}/repo/contents?filename=path/to/file.txt', 'size': 2048, 'type': 'FILE'}, 'subdir': {'objects': {}, 'type': 'DIRECTORY'}}]}}, 'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'choices': [{'cls': <class 'aiida_restapi.models.node.RepoFileMetadata'>, 'config': {'title': 'RepoFileMetadata'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.RepoFileMetadata'>>]}, 'ref': 'aiida_restapi.models.node.RepoFileMetadata:102854672577680', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'binary': {'metadata': {'pydantic_js_updates': {'description': 'Whether the file is binary.', 'examples': [True]}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'download': {'metadata': {'pydantic_js_updates': {'description': 'The URL to download the file.', 'examples': ['../nodes/{uuid}/repo/contents?filename=path/to/file.txt']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'file_hash': {'metadata': {'pydantic_js_updates': {'description': 'The hash of the file in the repository.'}}, 'schema': {'type': 'str'}, 'serialization_alias': 'hash', 'type': 'model-field', 'validation_alias': 'hash'}, 'file_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the repository object.', 'examples': ['FILE']}}, 'schema': {'expected': ['FILE'], 'type': 'literal'}, 'serialization_alias': 'type', 'type': 'model-field', 'validation_alias': 'type'}, 'size': {'metadata': {'pydantic_js_updates': {'description': 'The size of the file in bytes.', 'examples': [1024]}}, 'schema': {'type': 'int'}, 'type': 'model-field'}}, 'model_name': 'RepoFileMetadata', 'type': 'model-fields'}, 'type': 'model'}, {'schema_ref': 'aiida_restapi.models.node.RepoDirMetadata:102854672588208', 'type': 'definition-ref'}], 'type': 'union'}}, 'type': 'model-field'}}, 'model_name': 'RepoDirMetadata', 'type': 'model-fields'}, 'type': 'model'}], 'schema': {'schema_ref': 'aiida_restapi.models.node.RepoDirMetadata:102854672588208', 'type': 'definition-ref'}, 'type': 'definitions'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'file_type': FieldInfo(annotation=Literal['DIRECTORY'], required=True, alias='type', alias_priority=2, description='The type of the repository object.', examples=['DIRECTORY']), 'objects': FieldInfo(annotation=dict[str, Union[RepoFileMetadata, RepoDirMetadata]], required=True, description='A dictionary with the metadata of the objects in the directory.', examples=[{'file.txt': {'type': 'FILE', 'binary': False, 'size': 2048, 'download': '../nodes/{uuid}/repo/contents?filename=path/to/file.txt'}, 'subdir': {'type': 'DIRECTORY', 'objects': {}}}])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=Recursive(     DefinitionRefSerializer {         definition: "...",         retry_with_lax_check: true,     }, ), definitions=[PolymorphismTrampoline(PolymorphismTrampoline { class: Py(0x5d8bb8391db0), serializer: PolymorphismTrampoline(PolymorphismTrampoline { class: Py(0x5d8bb8391db0), serializer: Model(ModelSerializer { class: Py(0x5d8bb8391db0), serializer: Fields(GeneralFieldsSerializer { fields: {"objects": SerField { key: "objects", alias: None, serializer: Some(Dict(DictSerializer { key_serializer: Str(StrSerializer), value_serializer: Union(UnionSerializer { choices: UnionChoices { choices: [PolymorphismTrampoline(PolymorphismTrampoline { class: Py(0x5d8bb838f490), serializer: Prebuilt(PrebuiltSerializer { schema_serializer: Py(0x7819204adea0) }), enabled_from_config: false }), Recursive(DefinitionRefSerializer { definition: "...", retry_with_lax_check: true })] }, name: "Union[RepoFileMetadata, definition-ref]" }), filter: SchemaFilter { include: None, exclude: None }, name: "dict[str, Union[RepoFileMetadata, definition-ref]]" })), required: true, serialize_by_alias: None, serialization_exclude_if: None }, "file_type": SerField { key: "file_type", alias: Some("type"), serializer: Some(Literal(LiteralSerializer { expected_int: {}, expected_str: {"DIRECTORY"}, expected_py: None, name: "literal['DIRECTORY']" })), required: true, serialize_by_alias: None, serialization_exclude_if: None }}, computed_fields: Some(ComputedFields([])), mode: SimpleDict, extra_serializer: None, filter: SchemaFilter { include: None, exclude: None }, required_fields: 2 }), has_extra: false, root_model: false, name: "RepoDirMetadata" }), enabled_from_config: false }), enabled_from_config: false })])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="RepoDirMetadata", validator=DefinitionRef(     DefinitionRefValidator {         definition: "...",     }, ), definitions=[Model(ModelValidator { revalidate: Never, validator: ModelFields(ModelFieldsValidator { fields: [Field { name: "file_type", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString("file_type"), rest: [] }, by_alias: [LookupPath { first_item: PathItemString("type"), rest: [] }] }, validator: Literal(LiteralValidator { lookup: LiteralLookup { expected_bool: None, expected_int: None, expected_str: Some({"DIRECTORY": 0}), expected_py_dict: None, expected_py_values: None, expected_py_primitives: Some(Py(0x7819204d8bc0)), values: [Py(0x7819226ebaf0)] }, expected_repr: "'DIRECTORY'", name: "literal['DIRECTORY']" }), frozen: false }, Field { name: "objects", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString("objects"), rest: [] }, by_alias: [] }, validator: Dict(DictValidator { strict: false, key_validator: Str(StrValidator { strict: false, coerce_numbers_to_str: false }), value_validator: Union(UnionValidator { mode: Smart, choices: [(Prebuilt(PrebuiltValidator { schema_validator: Py(0x7819204ade10) }), None), (DefinitionRef(DefinitionRefValidator { definition: "..." }), None)], custom_error: None, name: "union[RepoFileMetadata,...]" }), min_length: None, max_length: None, fail_fast: false, name: "dict[str,union[RepoFileMetadata,...]]" }), frozen: false }], model_name: "RepoDirMetadata", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: {PathItemString("file_type"): LookupTreeNode { fields: [LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Name, alias_index: 0 } }], map: {}, list: {} }, PathItemString("type"): LookupTreeNode { fields: [LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Alias, alias_index: 0 } }], map: {}, list: {} }, PathItemString("objects"): LookupTreeNode { fields: [LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0 } }], map: {}, list: {} }} }, validate_by_alias: None, validate_by_name: None }), class: Py(0x5d8bb8391db0), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py(0x781933fd64d0), name: "RepoDirMetadata" })], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, type: Literal['DIRECTORY'], objects: dict[str, typing.Union[aiida_restapi.models.node.RepoFileMetadata, aiida_restapi.models.node.RepoDirMetadata]]) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
file_type#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

objects#
class aiida_restapi.models.node.RepoFileMetadata(*, type, binary=False, size, hash, download)[source]#

Bases: BaseModel

Pydantic model representing the metadata of a file in the AiiDA repository.

__abstractmethods__ = frozenset({})#
__annotations__ = {'binary': 'bool', 'download': 'str', 'file_hash': 'str', 'file_type': "t.Literal['FILE']", 'size': 'int'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.node'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.node.RepoFileMetadata'>, 'config': {'title': 'RepoFileMetadata'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.node.RepoFileMetadata'>>]}, 'ref': 'aiida_restapi.models.node.RepoFileMetadata:102854672577680', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'binary': {'metadata': {'pydantic_js_updates': {'description': 'Whether the file is binary.', 'examples': [True]}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'download': {'metadata': {'pydantic_js_updates': {'description': 'The URL to download the file.', 'examples': ['../nodes/{uuid}/repo/contents?filename=path/to/file.txt']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'file_hash': {'metadata': {'pydantic_js_updates': {'description': 'The hash of the file in the repository.'}}, 'schema': {'type': 'str'}, 'serialization_alias': 'hash', 'type': 'model-field', 'validation_alias': 'hash'}, 'file_type': {'metadata': {'pydantic_js_updates': {'description': 'The type of the repository object.', 'examples': ['FILE']}}, 'schema': {'expected': ['FILE'], 'type': 'literal'}, 'serialization_alias': 'type', 'type': 'model-field', 'validation_alias': 'type'}, 'size': {'metadata': {'pydantic_js_updates': {'description': 'The size of the file in bytes.', 'examples': [1024]}}, 'schema': {'type': 'int'}, 'type': 'model-field'}}, 'model_name': 'RepoFileMetadata', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'binary': FieldInfo(annotation=bool, required=False, default=False, description='Whether the file is binary.', examples=[True]), 'download': FieldInfo(annotation=str, required=True, description='The URL to download the file.', examples=['../nodes/{uuid}/repo/contents?filename=path/to/file.txt']), 'file_hash': FieldInfo(annotation=str, required=True, alias='hash', alias_priority=2, description='The hash of the file in the repository.'), 'file_type': FieldInfo(annotation=Literal['FILE'], required=True, alias='type', alias_priority=2, description='The type of the repository object.', examples=['FILE']), 'size': FieldInfo(annotation=int, required=True, description='The size of the file in bytes.', examples=[1024])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb838f490,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb838f490,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb838f490,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "size": SerField {                                         key: "size",                                         alias: None,                                         serializer: Some(                                             Int(                                                 IntSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "binary": SerField {                                         key: "binary",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x000078193607bf60,                                                         ),                                                     ),                                                     serializer: Bool(                                                         BoolSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "file_hash": SerField {                                         key: "file_hash",                                         alias: Some(                                             "hash",                                         ),                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "file_type": SerField {                                         key: "file_type",                                         alias: Some(                                             "type",                                         ),                                         serializer: Some(                                             Literal(                                                 LiteralSerializer {                                                     expected_int: {},                                                     expected_str: {                                                         "FILE",                                                     },                                                     expected_py: None,                                                     name: "literal['FILE']",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "download": SerField {                                         key: "download",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 5,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "RepoFileMetadata",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="RepoFileMetadata", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "file_type",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "file_type",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "type",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: Literal(                             LiteralValidator {                                 lookup: LiteralLookup {                                     expected_bool: None,                                     expected_int: None,                                     expected_str: Some(                                         {                                             "FILE": 0,                                         },                                     ),                                     expected_py_dict: None,                                     expected_py_values: None,                                     expected_py_primitives: Some(                                         Py(                                             0x00007819204bf780,                                         ),                                     ),                                     values: [                                         Py(                                             0x000078193563e4f0,                                         ),                                     ],                                 },                                 expected_repr: "'FILE'",                                 name: "literal['FILE']",                             },                         ),                         frozen: false,                     },                     Field {                         name: "binary",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "binary",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x000078193607bf60,                                     ),                                 ),                                 on_error: Raise,                                 validator: Bool(                                     BoolValidator {                                         strict: false,                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[bool]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "size",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "size",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Int(                             IntValidator {                                 strict: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "file_hash",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "file_hash",                                 ),                                 rest: [],                             },                             by_alias: [                                 LookupPath {                                     first_item: PathItemString(                                         "hash",                                     ),                                     rest: [],                                 },                             ],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "download",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "download",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "RepoFileMetadata",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "binary",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "size",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "download",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "file_type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "file_hash",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Name,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "hash",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Alias,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb838f490,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "RepoFileMetadata",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, type: Literal['FILE'], binary: bool = False, size: int, hash: str, download: str) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
binary#
download#
file_hash#
file_type#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

size#

aiida_restapi.models.querybuilder module#

Pydantic models for QueryBuilder requests and path items.

class aiida_restapi.models.querybuilder.QueryBuilderDict(*, path, filters=None, project=None, limit=10, offset=0, order_by=None, distinct=False)[source]#

Bases: BaseModel

Pydantic model for QueryBuilder POST requests.

__abstractmethods__ = frozenset({})#
__annotations__ = {'distinct': 'bool', 'filters': 'dict[str, dict[str, t.Any]] | None', 'limit': 'pdt.NonNegativeInt | None', 'offset': 'pdt.NonNegativeInt | None', 'order_by': 'str | list[str] | dict[str, t.Any] | None', 'path': 'list[str | QueryBuilderPathItem]', 'project': 'dict[str, str | list[str]] | None'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.querybuilder'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.querybuilder.QueryBuilderDict'>, 'config': {'title': 'QueryBuilderDict'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.querybuilder.QueryBuilderDict'>>]}, 'ref': 'aiida_restapi.models.querybuilder.QueryBuilderDict:102854672603376', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'distinct': {'metadata': {'pydantic_js_updates': {'description': 'Whether to return only distinct results.', 'examples': [False]}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'filters': {'metadata': {'pydantic_js_updates': {'description': 'The QueryBuilder filters as a dictionary mapping tags to filter conditions.', 'examples': [{'integers': {'attributes.value': {'<': 42}}}]}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'limit': {'metadata': {'pydantic_js_updates': {'description': 'The maximum number of results to return.', 'examples': [5]}}, 'schema': {'default': 10, 'schema': {'schema': {'ge': 0, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'offset': {'metadata': {'pydantic_js_updates': {'description': 'The number of results to skip before starting to collect the result set.', 'examples': [0]}}, 'schema': {'default': 0, 'schema': {'schema': {'ge': 0, 'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'order_by': {'metadata': {'pydantic_js_updates': {'description': 'The QueryBuilder order_by as a string, list of strings, or dictionary mapping tags to order conditions.', 'examples': [{'integers': {'pk': 'desc'}}]}}, 'schema': {'default': None, 'schema': {'schema': {'choices': [{'type': 'str'}, {'items_schema': {'type': 'str'}, 'type': 'list'}, {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'type': 'any'}}], 'type': 'union'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'path': {'metadata': {'pydantic_js_updates': {'description': 'The QueryBuilder path as a list of entity types or path items.', 'examples': [[['data.core.int.Int.', 'data.core.float.Float.'], {'entity_type': 'data.core.int.Int.', 'orm_base': 'node', 'tag': 'integers'}, {'entity_type': ['data.core.int.Int.', 'data.core.float.Float.'], 'orm_base': 'node', 'tag': 'numbers'}]]}}, 'schema': {'items_schema': {'choices': [{'type': 'str'}, {'cls': <class 'aiida_restapi.models.querybuilder.QueryBuilderPathItem'>, 'config': {'title': 'QueryBuilderPathItem'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.querybuilder.QueryBuilderPathItem'>>]}, 'ref': 'aiida_restapi.models.querybuilder.QueryBuilderPathItem:102854675110080', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_tag': {'metadata': {'pydantic_js_updates': {'description': 'An optional tag for the edge.', 'examples': ['edge_to_group']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'entity_type': {'metadata': {'pydantic_js_updates': {'description': 'The AiiDA entity type.', 'examples': ['group.core', ['data.core.int.Int.', 'data.core.float.Float.']]}}, 'schema': {'choices': [{'type': 'str'}, {'items_schema': {'type': 'str'}, 'type': 'list'}], 'type': 'union'}, 'type': 'model-field'}, 'joining_keyword': {'metadata': {'pydantic_js_updates': {'description': 'The joining keyword for relationships (e.g., "input", "output").', 'examples': ['with_group', 'with_user']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'joining_value': {'metadata': {'pydantic_js_updates': {'description': 'The joining value for relationships (e.g., "input", "output").', 'examples': ['my_group', 'admin']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'orm_base': {'metadata': {'pydantic_js_updates': {'description': 'The ORM base class of the entity.', 'examples': ['node', 'computer', 'user']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'outerjoin': {'metadata': {'pydantic_js_updates': {'description': 'Whether to perform an outer join.', 'examples': [True]}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'tag': {'metadata': {'pydantic_js_updates': {'description': 'An optional tag for the path item.', 'examples': ['my_nodes']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'QueryBuilderPathItem', 'type': 'model-fields'}, 'type': 'model'}], 'type': 'union'}, 'type': 'list'}, 'type': 'model-field'}, 'project': {'metadata': {'pydantic_js_updates': {'description': 'The QueryBuilder projection as a dictionary mapping tags to attributes to project.', 'examples': [{'integers': ['uuid', 'attributes.value']}]}}, 'schema': {'default': None, 'schema': {'schema': {'keys_schema': {'type': 'str'}, 'type': 'dict', 'values_schema': {'choices': [{'type': 'str'}, {'items_schema': {'type': 'str'}, 'type': 'list'}], 'type': 'union'}}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'QueryBuilderDict', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'distinct': FieldInfo(annotation=bool, required=False, default=False, description='Whether to return only distinct results.', examples=[False]), 'filters': FieldInfo(annotation=Union[dict[str, dict[str, Any]], NoneType], required=False, default=None, description='The QueryBuilder filters as a dictionary mapping tags to filter conditions.', examples=[{'integers': {'attributes.value': {'<': 42}}}]), 'limit': FieldInfo(annotation=Union[Annotated[int, Ge], NoneType], required=False, default=10, description='The maximum number of results to return.', examples=[5]), 'offset': FieldInfo(annotation=Union[Annotated[int, Ge], NoneType], required=False, default=0, description='The number of results to skip before starting to collect the result set.', examples=[0]), 'order_by': FieldInfo(annotation=Union[str, list[str], dict[str, Any], NoneType], required=False, default=None, description='The QueryBuilder order_by as a string, list of strings, or dictionary mapping tags to order conditions.', examples=[{'integers': {'pk': 'desc'}}]), 'path': FieldInfo(annotation=list[Union[str, QueryBuilderPathItem]], required=True, description='The QueryBuilder path as a list of entity types or path items.', examples=[[['data.core.int.Int.', 'data.core.float.Float.'], {'entity_type': 'data.core.int.Int.', 'orm_base': 'node', 'tag': 'integers'}, {'entity_type': ['data.core.int.Int.', 'data.core.float.Float.'], 'orm_base': 'node', 'tag': 'numbers'}]]), 'project': FieldInfo(annotation=Union[dict[str, Union[str, list[str]]], NoneType], required=False, default=None, description='The QueryBuilder projection as a dictionary mapping tags to attributes to project.', examples=[{'integers': ['uuid', 'attributes.value']}])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb83958f0,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb83958f0,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb83958f0,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "distinct": SerField {                                         key: "distinct",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x000078193607bf60,                                                         ),                                                     ),                                                     serializer: Bool(                                                         BoolSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "order_by": SerField {                                         key: "order_by",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Union(                                                                 UnionSerializer {                                                                     choices: UnionChoices {                                                                         choices: [                                                                             Str(                                                                                 StrSerializer,                                                                             ),                                                                             List(                                                                                 ListSerializer {                                                                                     item_serializer: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     filter: SchemaFilter {                                                                                         include: None,                                                                                         exclude: None,                                                                                     },                                                                                     name: "list[str]",                                                                                 },                                                                             ),                                                                             Dict(                                                                                 DictSerializer {                                                                                     key_serializer: Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     value_serializer: Any(                                                                                         AnySerializer,                                                                                     ),                                                                                     filter: SchemaFilter {                                                                                         include: None,                                                                                         exclude: None,                                                                                     },                                                                                     name: "dict[str, any]",                                                                                 },                                                                             ),                                                                         ],                                                                     },                                                                     name: "Union[str, list[str], dict[str, any]]",                                                                 },                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "path": SerField {                                         key: "path",                                         alias: None,                                         serializer: Some(                                             List(                                                 ListSerializer {                                                     item_serializer: Union(                                                         UnionSerializer {                                                             choices: UnionChoices {                                                                 choices: [                                                                     Str(                                                                         StrSerializer,                                                                     ),                                                                     PolymorphismTrampoline(                                                                         PolymorphismTrampoline {                                                                             class: Py(                                                                                 0x00005d8bb85f98c0,                                                                             ),                                                                             serializer: Prebuilt(                                                                                 PrebuiltSerializer {                                                                                     schema_serializer: Py(                                                                                         0x000078192033e680,                                                                                     ),                                                                                 },                                                                             ),                                                                             enabled_from_config: false,                                                                         },                                                                     ),                                                                 ],                                                             },                                                             name: "Union[str, QueryBuilderPathItem]",                                                         },                                                     ),                                                     filter: SchemaFilter {                                                         include: None,                                                         exclude: None,                                                     },                                                     name: "list[Union[str, QueryBuilderPathItem]]",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "project": SerField {                                         key: "project",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Dict(                                                                 DictSerializer {                                                                     key_serializer: Str(                                                                         StrSerializer,                                                                     ),                                                                     value_serializer: Union(                                                                         UnionSerializer {                                                                             choices: UnionChoices {                                                                                 choices: [                                                                                     Str(                                                                                         StrSerializer,                                                                                     ),                                                                                     List(                                                                                         ListSerializer {                                                                                             item_serializer: Str(                                                                                                 StrSerializer,                                                                                             ),                                                                                             filter: SchemaFilter {                                                                                                 include: None,                                                                                                 exclude: None,                                                                                             },                                                                                             name: "list[str]",                                                                                         },                                                                                     ),                                                                                 ],                                                                             },                                                                             name: "Union[str, list[str]]",                                                                         },                                                                     ),                                                                     filter: SchemaFilter {                                                                         include: None,                                                                         exclude: None,                                                                     },                                                                     name: "dict[str, Union[str, list[str]]]",                                                                 },                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "offset": SerField {                                         key: "offset",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936184b28,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Int(                                                                 IntSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "filters": SerField {                                         key: "filters",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Dict(                                                                 DictSerializer {                                                                     key_serializer: Str(                                                                         StrSerializer,                                                                     ),                                                                     value_serializer: Dict(                                                                         DictSerializer {                                                                             key_serializer: Str(                                                                                 StrSerializer,                                                                             ),                                                                             value_serializer: Any(                                                                                 AnySerializer,                                                                             ),                                                                             filter: SchemaFilter {                                                                                 include: None,                                                                                 exclude: None,                                                                             },                                                                             name: "dict[str, any]",                                                                         },                                                                     ),                                                                     filter: SchemaFilter {                                                                         include: None,                                                                         exclude: None,                                                                     },                                                                     name: "dict[str, dict[str, any]]",                                                                 },                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "limit": SerField {                                         key: "limit",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936184c68,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Int(                                                                 IntSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 7,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "QueryBuilderDict",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="QueryBuilderDict", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "path",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: List(                             ListValidator {                                 strict: false,                                 item_validator: Some(                                     Union(                                         UnionValidator {                                             mode: Smart,                                             choices: [                                                 (                                                     Str(                                                         StrValidator {                                                             strict: false,                                                             coerce_numbers_to_str: false,                                                         },                                                     ),                                                     None,                                                 ),                                                 (                                                     Prebuilt(                                                         PrebuiltValidator {                                                             schema_validator: Py(                                                                 0x000078192033e5f0,                                                             ),                                                         },                                                     ),                                                     None,                                                 ),                                             ],                                             custom_error: None,                                             name: "union[str,QueryBuilderPathItem]",                                         },                                     ),                                 ),                                 min_length: None,                                 max_length: None,                                 name: OnceLock(                                     <uninit>,                                 ),                                 fail_fast: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "filters",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "filters",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Dict(                                             DictValidator {                                                 strict: false,                                                 key_validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 value_validator: Dict(                                                     DictValidator {                                                         strict: false,                                                         key_validator: Str(                                                             StrValidator {                                                                 strict: false,                                                                 coerce_numbers_to_str: false,                                                             },                                                         ),                                                         value_validator: Any(                                                             AnyValidator,                                                         ),                                                         min_length: None,                                                         max_length: None,                                                         fail_fast: false,                                                         name: "dict[str,any]",                                                     },                                                 ),                                                 min_length: None,                                                 max_length: None,                                                 fail_fast: false,                                                 name: "dict[str,dict[str,any]]",                                             },                                         ),                                         name: "nullable[dict[str,dict[str,any]]]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[dict[str,dict[str,any]]]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "project",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "project",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Dict(                                             DictValidator {                                                 strict: false,                                                 key_validator: Str(                                                     StrValidator {                                                         strict: false,                                                         coerce_numbers_to_str: false,                                                     },                                                 ),                                                 value_validator: Union(                                                     UnionValidator {                                                         mode: Smart,                                                         choices: [                                                             (                                                                 Str(                                                                     StrValidator {                                                                         strict: false,                                                                         coerce_numbers_to_str: false,                                                                     },                                                                 ),                                                                 None,                                                             ),                                                             (                                                                 List(                                                                     ListValidator {                                                                         strict: false,                                                                         item_validator: Some(                                                                             Str(                                                                                 StrValidator {                                                                                     strict: false,                                                                                     coerce_numbers_to_str: false,                                                                                 },                                                                             ),                                                                         ),                                                                         min_length: None,                                                                         max_length: None,                                                                         name: OnceLock(                                                                             "list[str]",                                                                         ),                                                                         fail_fast: false,                                                                     },                                                                 ),                                                                 None,                                                             ),                                                         ],                                                         custom_error: None,                                                         name: "union[str,list[str]]",                                                     },                                                 ),                                                 min_length: None,                                                 max_length: None,                                                 fail_fast: false,                                                 name: "dict[str,union[str,list[str]]]",                                             },                                         ),                                         name: "nullable[dict[str,union[str,list[str]]]]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[dict[str,union[str,list[str]]]]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "limit",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "limit",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936184c68,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: ConstrainedInt(                                             ConstrainedIntValidator {                                                 strict: false,                                                 multiple_of: None,                                                 le: None,                                                 lt: None,                                                 ge: Some(                                                     I64(                                                         0,                                                     ),                                                 ),                                                 gt: None,                                             },                                         ),                                         name: "nullable[constrained-int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[constrained-int]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "offset",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "offset",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936184b28,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: ConstrainedInt(                                             ConstrainedIntValidator {                                                 strict: false,                                                 multiple_of: None,                                                 le: None,                                                 lt: None,                                                 ge: Some(                                                     I64(                                                         0,                                                     ),                                                 ),                                                 gt: None,                                             },                                         ),                                         name: "nullable[constrained-int]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[constrained-int]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "order_by",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "order_by",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Union(                                             UnionValidator {                                                 mode: Smart,                                                 choices: [                                                     (                                                         Str(                                                             StrValidator {                                                                 strict: false,                                                                 coerce_numbers_to_str: false,                                                             },                                                         ),                                                         None,                                                     ),                                                     (                                                         List(                                                             ListValidator {                                                                 strict: false,                                                                 item_validator: Some(                                                                     Str(                                                                         StrValidator {                                                                             strict: false,                                                                             coerce_numbers_to_str: false,                                                                         },                                                                     ),                                                                 ),                                                                 min_length: None,                                                                 max_length: None,                                                                 name: OnceLock(                                                                     "list[str]",                                                                 ),                                                                 fail_fast: false,                                                             },                                                         ),                                                         None,                                                     ),                                                     (                                                         Dict(                                                             DictValidator {                                                                 strict: false,                                                                 key_validator: Str(                                                                     StrValidator {                                                                         strict: false,                                                                         coerce_numbers_to_str: false,                                                                     },                                                                 ),                                                                 value_validator: Any(                                                                     AnyValidator,                                                                 ),                                                                 min_length: None,                                                                 max_length: None,                                                                 fail_fast: false,                                                                 name: "dict[str,any]",                                                             },                                                         ),                                                         None,                                                     ),                                                 ],                                                 custom_error: None,                                                 name: "union[str,list[str],dict[str,any]]",                                             },                                         ),                                         name: "nullable[union[str,list[str],dict[str,any]]]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[union[str,list[str],dict[str,any]]]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "distinct",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "distinct",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x000078193607bf60,                                     ),                                 ),                                 on_error: Raise,                                 validator: Bool(                                     BoolValidator {                                         strict: false,                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[bool]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                 ],                 model_name: "QueryBuilderDict",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "filters",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "limit",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "distinct",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 6,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "path",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "project",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "order_by",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 5,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "offset",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb83958f0,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "QueryBuilderDict",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, path: list[str | aiida_restapi.models.querybuilder.QueryBuilderPathItem], filters: dict[str, dict[str, typing.Any]] | None = None, project: dict[str, str | list[str]] | None = None, limit: Optional[Annotated[int, Ge(ge=0)]] = 10, offset: Optional[Annotated[int, Ge(ge=0)]] = 0, order_by: str | list[str] | dict[str, typing.Any] | None = None, distinct: bool = False) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
distinct#
filters#
limit#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

offset#
order_by#
path#
project#
class aiida_restapi.models.querybuilder.QueryBuilderPathItem(*, entity_type, orm_base, tag=None, joining_keyword=None, joining_value=None, edge_tag=None, outerjoin=False)[source]#

Bases: BaseModel

Pydantic model for QueryBuilder path items.

__abstractmethods__ = frozenset({})#
__annotations__ = {'edge_tag': 'str | None', 'entity_type': 'str | list[str]', 'joining_keyword': 'str | None', 'joining_value': 'str | None', 'orm_base': 'str', 'outerjoin': 'bool', 'tag': 'str | None'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.querybuilder'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.querybuilder.QueryBuilderPathItem'>, 'config': {'title': 'QueryBuilderPathItem'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.querybuilder.QueryBuilderPathItem'>>]}, 'ref': 'aiida_restapi.models.querybuilder.QueryBuilderPathItem:102854675110080', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'edge_tag': {'metadata': {'pydantic_js_updates': {'description': 'An optional tag for the edge.', 'examples': ['edge_to_group']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'entity_type': {'metadata': {'pydantic_js_updates': {'description': 'The AiiDA entity type.', 'examples': ['group.core', ['data.core.int.Int.', 'data.core.float.Float.']]}}, 'schema': {'choices': [{'type': 'str'}, {'items_schema': {'type': 'str'}, 'type': 'list'}], 'type': 'union'}, 'type': 'model-field'}, 'joining_keyword': {'metadata': {'pydantic_js_updates': {'description': 'The joining keyword for relationships (e.g., "input", "output").', 'examples': ['with_group', 'with_user']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'joining_value': {'metadata': {'pydantic_js_updates': {'description': 'The joining value for relationships (e.g., "input", "output").', 'examples': ['my_group', 'admin']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'orm_base': {'metadata': {'pydantic_js_updates': {'description': 'The ORM base class of the entity.', 'examples': ['node', 'computer', 'user']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'outerjoin': {'metadata': {'pydantic_js_updates': {'description': 'Whether to perform an outer join.', 'examples': [True]}}, 'schema': {'default': False, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'tag': {'metadata': {'pydantic_js_updates': {'description': 'An optional tag for the path item.', 'examples': ['my_nodes']}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'QueryBuilderPathItem', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'edge_tag': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='An optional tag for the edge.', examples=['edge_to_group']), 'entity_type': FieldInfo(annotation=Union[str, list[str]], required=True, description='The AiiDA entity type.', examples=['group.core', ['data.core.int.Int.', 'data.core.float.Float.']]), 'joining_keyword': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The joining keyword for relationships (e.g., "input", "output").', examples=['with_group', 'with_user']), 'joining_value': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The joining value for relationships (e.g., "input", "output").', examples=['my_group', 'admin']), 'orm_base': FieldInfo(annotation=str, required=True, description='The ORM base class of the entity.', examples=['node', 'computer', 'user']), 'outerjoin': FieldInfo(annotation=bool, required=False, default=False, description='Whether to perform an outer join.', examples=[True]), 'tag': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='An optional tag for the path item.', examples=['my_nodes'])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb85f98c0,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb85f98c0,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb85f98c0,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "entity_type": SerField {                                         key: "entity_type",                                         alias: None,                                         serializer: Some(                                             Union(                                                 UnionSerializer {                                                     choices: UnionChoices {                                                         choices: [                                                             Str(                                                                 StrSerializer,                                                             ),                                                             List(                                                                 ListSerializer {                                                                     item_serializer: Str(                                                                         StrSerializer,                                                                     ),                                                                     filter: SchemaFilter {                                                                         include: None,                                                                         exclude: None,                                                                     },                                                                     name: "list[str]",                                                                 },                                                             ),                                                         ],                                                     },                                                     name: "Union[str, list[str]]",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "edge_tag": SerField {                                         key: "edge_tag",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Str(                                                                 StrSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "joining_keyword": SerField {                                         key: "joining_keyword",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Str(                                                                 StrSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "orm_base": SerField {                                         key: "orm_base",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "tag": SerField {                                         key: "tag",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Str(                                                                 StrSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "joining_value": SerField {                                         key: "joining_value",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x0000781936090c20,                                                         ),                                                     ),                                                     serializer: Nullable(                                                         NullableSerializer {                                                             serializer: Str(                                                                 StrSerializer,                                                             ),                                                         },                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "outerjoin": SerField {                                         key: "outerjoin",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x000078193607bf60,                                                         ),                                                     ),                                                     serializer: Bool(                                                         BoolSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 7,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "QueryBuilderPathItem",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="QueryBuilderPathItem", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "entity_type",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "entity_type",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Union(                             UnionValidator {                                 mode: Smart,                                 choices: [                                     (                                         Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         None,                                     ),                                     (                                         List(                                             ListValidator {                                                 strict: false,                                                 item_validator: Some(                                                     Str(                                                         StrValidator {                                                             strict: false,                                                             coerce_numbers_to_str: false,                                                         },                                                     ),                                                 ),                                                 min_length: None,                                                 max_length: None,                                                 name: OnceLock(                                                     "list[str]",                                                 ),                                                 fail_fast: false,                                             },                                         ),                                         None,                                     ),                                 ],                                 custom_error: None,                                 name: "union[str,list[str]]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "orm_base",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "orm_base",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "tag",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "tag",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         name: "nullable[str]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[str]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "joining_keyword",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "joining_keyword",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         name: "nullable[str]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[str]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "joining_value",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "joining_value",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         name: "nullable[str]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[str]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "edge_tag",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "edge_tag",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x0000781936090c20,                                     ),                                 ),                                 on_error: Raise,                                 validator: Nullable(                                     NullableValidator {                                         validator: Str(                                             StrValidator {                                                 strict: false,                                                 coerce_numbers_to_str: false,                                             },                                         ),                                         name: "nullable[str]",                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[nullable[str]]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                     Field {                         name: "outerjoin",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "outerjoin",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x000078193607bf60,                                     ),                                 ),                                 on_error: Raise,                                 validator: Bool(                                     BoolValidator {                                         strict: false,                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[bool]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                 ],                 model_name: "QueryBuilderPathItem",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "outerjoin",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 6,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "tag",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "edge_tag",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 5,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "orm_base",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "entity_type",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "joining_keyword",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "joining_value",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb85f98c0,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "QueryBuilderPathItem",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, entity_type: str | list[str], orm_base: str, tag: str | None = None, joining_keyword: str | None = None, joining_value: str | None = None, edge_tag: str | None = None, outerjoin: bool = False) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
edge_tag#
entity_type#
joining_keyword#
joining_value#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

orm_base#
outerjoin#
tag#

aiida_restapi.models.server module#

Pydantic models for server information and endpoints.

class aiida_restapi.models.server.ServerEndpoint(*, path, group, methods, description='-')[source]#

Bases: BaseModel

API endpoint.

__abstractmethods__ = frozenset({})#
__annotations__ = {'description': 'str', 'group': 'str | None', 'methods': 'set[str]', 'path': 'str'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.server'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.server.ServerEndpoint'>, 'config': {'title': 'ServerEndpoint'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.server.ServerEndpoint'>>]}, 'ref': 'aiida_restapi.models.server.ServerEndpoint:102854675241728', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'description': {'metadata': {'pydantic_js_updates': {'description': 'Description of the endpoint', 'examples': ['Get a JSON-serializable dictionary of all registered API routes.']}}, 'schema': {'default': '-', 'schema': {'type': 'str'}, 'type': 'default'}, 'type': 'model-field'}, 'group': {'metadata': {'pydantic_js_updates': {'description': 'Group of the endpoint', 'examples': ['server']}}, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'model-field'}, 'methods': {'metadata': {'pydantic_js_updates': {'description': 'HTTP methods supported by the endpoint', 'examples': ['GET']}}, 'schema': {'items_schema': {'type': 'str'}, 'type': 'set'}, 'type': 'model-field'}, 'path': {'metadata': {'pydantic_js_updates': {'description': 'Path of the endpoint', 'examples': ['../server/endpoints']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'ServerEndpoint', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'description': FieldInfo(annotation=str, required=False, default='-', description='Description of the endpoint', examples=['Get a JSON-serializable dictionary of all registered API routes.']), 'group': FieldInfo(annotation=Union[str, NoneType], required=True, description='Group of the endpoint', examples=['server']), 'methods': FieldInfo(annotation=set[str], required=True, description='HTTP methods supported by the endpoint', examples=['GET']), 'path': FieldInfo(annotation=str, required=True, description='Path of the endpoint', examples=['../server/endpoints'])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb8619b00,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb8619b00,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb8619b00,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "methods": SerField {                                         key: "methods",                                         alias: None,                                         serializer: Some(                                             Set(                                                 SetSerializer {                                                     item_serializer: Str(                                                         StrSerializer,                                                     ),                                                     name: "set[str]",                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "path": SerField {                                         key: "path",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "group": SerField {                                         key: "group",                                         alias: None,                                         serializer: Some(                                             Nullable(                                                 NullableSerializer {                                                     serializer: Str(                                                         StrSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "description": SerField {                                         key: "description",                                         alias: None,                                         serializer: Some(                                             WithDefault(                                                 WithDefaultSerializer {                                                     default: Default(                                                         Py(                                                             0x000078193618f3c0,                                                         ),                                                     ),                                                     serializer: Str(                                                         StrSerializer,                                                     ),                                                 },                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 4,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "ServerEndpoint",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="ServerEndpoint", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "path",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "path",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "group",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "group",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Nullable(                             NullableValidator {                                 validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 name: "nullable[str]",                             },                         ),                         frozen: false,                     },                     Field {                         name: "methods",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "methods",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Set(                             SetValidator {                                 strict: false,                                 item_validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 min_length: None,                                 max_length: None,                                 name: "set[str]",                                 fail_fast: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "description",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "description",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: WithDefault(                             WithDefaultValidator {                                 default: Default(                                     Py(                                         0x000078193618f3c0,                                     ),                                 ),                                 on_error: Raise,                                 validator: Str(                                     StrValidator {                                         strict: false,                                         coerce_numbers_to_str: false,                                     },                                 ),                                 validate_default: false,                                 copy_default: false,                                 name: "default[str]",                                 undefined: Py(                                     0x0000781933fd64d0,                                 ),                             },                         ),                         frozen: false,                     },                 ],                 model_name: "ServerEndpoint",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "path",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "methods",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "group",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "description",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb8619b00,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "ServerEndpoint",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, path: str, group: str | None, methods: set[str], description: str = '-') -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
description#
group#
methods#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

path#
class aiida_restapi.models.server.ServerInfo(*, api_major_version, api_minor_version, api_revision_version, api_prefix, aiida_version)[source]#

Bases: BaseModel

API version information.

__abstractmethods__ = frozenset({})#
__annotations__ = {'aiida_version': 'str', 'api_major_version': 'str', 'api_minor_version': 'str', 'api_prefix': 'str', 'api_revision_version': 'str'}#
__class_vars__ = {}#

The names of the class variables defined on the model.

__dict__#
__module__ = 'aiida_restapi.models.server'#
__private_attributes__ = {}#

Metadata about the private attributes of the model.

__pydantic_complete__ = True#

Whether model building is completed, or if there are still undefined fields.

__pydantic_computed_fields__ = {}#

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_core_schema__ = {'cls': <class 'aiida_restapi.models.server.ServerInfo'>, 'config': {'title': 'ServerInfo'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.models.server.ServerInfo'>>]}, 'ref': 'aiida_restapi.models.server.ServerInfo:102854675232368', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'aiida_version': {'metadata': {'pydantic_js_updates': {'description': 'Version of the AiiDA installation', 'examples': ['2.8.0']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'api_major_version': {'metadata': {'pydantic_js_updates': {'description': 'Major version of the API', 'examples': ['0']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'api_minor_version': {'metadata': {'pydantic_js_updates': {'description': 'Minor version of the API', 'examples': ['1']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'api_prefix': {'metadata': {'pydantic_js_updates': {'description': 'Prefix for all API endpoints', 'examples': ['/api/v0']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'api_revision_version': {'metadata': {'pydantic_js_updates': {'description': 'Revision version of the API', 'examples': ['0a1']}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'ServerInfo', 'type': 'model-fields'}, 'type': 'model'}#

The core schema of the model.

__pydantic_custom_init__ = False#

Whether the model has a custom __init__ method.

__pydantic_decorators__ = DecoratorInfos(validators={}, field_validators={}, root_validators={}, field_serializers={}, model_serializers={}, model_validators={}, computed_fields={})#

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_extra__#

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.

__pydantic_extra_info__ = None#

A wrapper around the __pydantic_extra__ annotation, if explicitly annotated on a model.

This is a private attribute, not meant to be used outside Pydantic.

__pydantic_fields__ = {'aiida_version': FieldInfo(annotation=str, required=True, description='Version of the AiiDA installation', examples=['2.8.0']), 'api_major_version': FieldInfo(annotation=str, required=True, description='Major version of the API', examples=['0']), 'api_minor_version': FieldInfo(annotation=str, required=True, description='Minor version of the API', examples=['1']), 'api_prefix': FieldInfo(annotation=str, required=True, description='Prefix for all API endpoints', examples=['/api/v0']), 'api_revision_version': FieldInfo(annotation=str, required=True, description='Revision version of the API', examples=['0a1'])}#

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects. This replaces Model.__fields__ from Pydantic V1.

__pydantic_fields_set__#

The names of fields explicitly set during instantiation.

__pydantic_generic_metadata__ = {'args': (), 'origin': None, 'parameters': ()}#

A dictionary containing metadata about generic Pydantic models.

The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.

__pydantic_parent_namespace__ = None#

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__ = None#

The name of the post-init method for the model, if defined.

__pydantic_private__#

Values of private attributes set on the model instance.

__pydantic_serializer__ = SchemaSerializer(serializer=PolymorphismTrampoline(     PolymorphismTrampoline {         class: Py(             0x00005d8bb8617670,         ),         serializer: PolymorphismTrampoline(             PolymorphismTrampoline {                 class: Py(                     0x00005d8bb8617670,                 ),                 serializer: Model(                     ModelSerializer {                         class: Py(                             0x00005d8bb8617670,                         ),                         serializer: Fields(                             GeneralFieldsSerializer {                                 fields: {                                     "api_prefix": SerField {                                         key: "api_prefix",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "api_major_version": SerField {                                         key: "api_major_version",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "api_minor_version": SerField {                                         key: "api_minor_version",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "api_revision_version": SerField {                                         key: "api_revision_version",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                     "aiida_version": SerField {                                         key: "aiida_version",                                         alias: None,                                         serializer: Some(                                             Str(                                                 StrSerializer,                                             ),                                         ),                                         required: true,                                         serialize_by_alias: None,                                         serialization_exclude_if: None,                                     },                                 },                                 computed_fields: Some(                                     ComputedFields(                                         [],                                     ),                                 ),                                 mode: SimpleDict,                                 extra_serializer: None,                                 filter: SchemaFilter {                                     include: None,                                     exclude: None,                                 },                                 required_fields: 5,                             },                         ),                         has_extra: false,                         root_model: false,                         name: "ServerInfo",                     },                 ),                 enabled_from_config: false,             },         ),         enabled_from_config: false,     }, ), definitions=[])#

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_setattr_handlers__ = {}#

__setattr__ handlers. Memoizing the handlers leads to a dramatic performance improvement in __setattr__

__pydantic_validator__ = SchemaValidator(title="ServerInfo", validator=Model(     ModelValidator {         revalidate: Never,         validator: ModelFields(             ModelFieldsValidator {                 fields: [                     Field {                         name: "api_major_version",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "api_major_version",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "api_minor_version",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "api_minor_version",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "api_revision_version",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "api_revision_version",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "api_prefix",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "api_prefix",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                     Field {                         name: "aiida_version",                         lookup_path_collection: LookupPathCollection {                             by_name: LookupPath {                                 first_item: PathItemString(                                     "aiida_version",                                 ),                                 rest: [],                             },                             by_alias: [],                         },                         validator: Str(                             StrValidator {                                 strict: false,                                 coerce_numbers_to_str: false,                             },                         ),                         frozen: false,                     },                 ],                 model_name: "ServerInfo",                 extra_behavior: Ignore,                 extras_validator: None,                 extras_keys_validator: None,                 strict: false,                 from_attributes: false,                 loc_by_alias: true,                 lookup: LookupTree {                     inner: {                         PathItemString(                             "api_revision_version",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 2,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "aiida_version",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 4,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "api_major_version",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 0,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "api_minor_version",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 1,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                         PathItemString(                             "api_prefix",                         ): LookupTreeNode {                             fields: [                                 LookupFieldInfo {                                     field_index: 3,                                     lookup_priority: LookupFieldPriority {                                         lookup_type: Both,                                         alias_index: 0,                                     },                                 },                             ],                             map: {},                             list: {},                         },                     },                 },                 validate_by_alias: None,                 validate_by_name: None,             },         ),         class: Py(             0x00005d8bb8617670,         ),         generic_origin: None,         post_init: None,         frozen: false,         custom_init: false,         root_model: false,         undefined: Py(             0x0000781933fd64d0,         ),         name: "ServerInfo",     }, ), definitions=[], cache_strings=True)#

The pydantic-core SchemaValidator used to validate instances of the model.

__signature__ = <Signature (*, api_major_version: str, api_minor_version: str, api_revision_version: str, api_prefix: str, aiida_version: str) -> None>#

The synthesized __init__ [Signature][inspect.Signature] of the model.

__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
aiida_version#
api_major_version#
api_minor_version#
api_prefix#
api_revision_version#
model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Module contents#