aiida_restapi.graphql package#
Submodules#
aiida_restapi.graphql.aiida_db_mappings module#
The ‘source of truth’ for mapping AiiDA’s database table models to pydantic models.
Note in the future we may want to do this programmatically, however, there are two issues: - AiiDA uses both SQLAlchemy and Django backends, so one would need to be chosen - Neither model includes descriptions of fields
- class aiida_restapi.graphql.aiida_db_mappings.AuthInfo(*, id, aiidauser_id, dbcomputer_id, metadata, auth_params, enabled=True)[source]#
Bases:
BaseModelAiiDA AuthInfo SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'aiidauser_id': <class 'int'>, 'auth_params': <class 'pydantic.types.Json'>, 'dbcomputer_id': <class 'int'>, 'enabled': <class 'bool'>, 'id': <class 'int'>, 'metadata': <class 'pydantic.types.Json'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.AuthInfo'>, 'config': {'title': 'AuthInfo'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.AuthInfo'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.AuthInfo:102854654679600', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'aiidauser_id': {'metadata': {'pydantic_js_updates': {'description': 'Relates to user'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'auth_params': {'metadata': {'pydantic_js_updates': {'description': 'Parameters of the authorisation'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'dbcomputer_id': {'metadata': {'pydantic_js_updates': {'description': 'Relates to computer'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'enabled': {'metadata': {'pydantic_js_updates': {'description': 'Whether the computer is enabled'}}, 'schema': {'default': True, 'schema': {'type': 'bool'}, 'type': 'default'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'metadata': {'metadata': {'pydantic_js_updates': {'description': 'Metadata of the authorisation'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}}, 'model_name': 'AuthInfo', '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__ = {'aiidauser_id': FieldInfo(annotation=int, required=True, description='Relates to user'), 'auth_params': FieldInfo(annotation=Json, required=True, description='Parameters of the authorisation'), 'dbcomputer_id': FieldInfo(annotation=int, required=True, description='Relates to computer'), 'enabled': FieldInfo(annotation=bool, required=False, default=True, description='Whether the computer is enabled'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'metadata': FieldInfo(annotation=Json, required=True, description='Metadata of the authorisation')}#
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( 0x00005d8bb727da30, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb727da30, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb727da30, ), serializer: Fields( GeneralFieldsSerializer { fields: { "metadata": SerField { key: "metadata", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "dbcomputer_id": SerField { key: "dbcomputer_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "auth_params": SerField { key: "auth_params", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "aiidauser_id": SerField { key: "aiidauser_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "enabled": SerField { key: "enabled", alias: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x000078193607bf40, ), ), 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: 6, }, ), has_extra: false, root_model: false, name: "AuthInfo", }, ), 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="AuthInfo", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "aiidauser_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "aiidauser_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "dbcomputer_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "dbcomputer_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "metadata", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "metadata", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, Field { name: "auth_params", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "auth_params", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, Field { name: "enabled", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "enabled", ), rest: [], }, by_alias: [], }, validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x000078193607bf40, ), ), on_error: Raise, validator: Bool( BoolValidator { strict: false, }, ), validate_default: false, copy_default: false, name: "default[bool]", undefined: Py( 0x0000781933fd64d0, ), }, ), frozen: false, }, ], model_name: "AuthInfo", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "dbcomputer_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "aiidauser_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "metadata", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "enabled", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "auth_params", ): 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( 0x00005d8bb727da30, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "AuthInfo", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, aiidauser_id: int, dbcomputer_id: int, metadata: pydantic.types.Json, auth_params: pydantic.types.Json, enabled: bool = True) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __weakref__#
list of weak references to the object
- _abc_impl = <_abc._abc_data object>#
- aiidauser_id#
- auth_params#
- dbcomputer_id#
- enabled#
- id#
- metadata#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class aiida_restapi.graphql.aiida_db_mappings.Comment(*, id, uuid, ctime, mtime, content=None, user_id, dbnode_id)[source]#
Bases:
BaseModelAiiDA Comment SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'content': typing.Optional[str], 'ctime': <class 'datetime.datetime'>, 'dbnode_id': <class 'int'>, 'id': <class 'int'>, 'mtime': <class 'datetime.datetime'>, 'user_id': <class 'int'>, 'uuid': <class 'uuid.UUID'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Comment'>, 'config': {'title': 'Comment'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Comment'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Comment:102854654642480', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'content': {'metadata': {'pydantic_js_updates': {'description': 'Content of the comment'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'Creation time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'dbnode_id': {'metadata': {'pydantic_js_updates': {'description': 'Associated node id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'Last modification time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'user_id': {'metadata': {'pydantic_js_updates': {'description': 'Created by user id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'Universally unique id'}}, 'schema': {'type': 'uuid'}, 'type': 'model-field'}}, 'model_name': 'Comment', '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__ = {'content': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Content of the comment'), 'ctime': FieldInfo(annotation=datetime, required=True, description='Creation time'), 'dbnode_id': FieldInfo(annotation=int, required=True, description='Associated node id (pk)'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'mtime': FieldInfo(annotation=datetime, required=True, description='Last modification time'), 'user_id': FieldInfo(annotation=int, required=True, description='Created by user id (pk)'), 'uuid': FieldInfo(annotation=UUID, required=True, description='Universally unique id')}#
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( 0x00005d8bb7274930, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb7274930, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb7274930, ), serializer: Fields( GeneralFieldsSerializer { fields: { "mtime": SerField { key: "mtime", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "uuid": SerField { key: "uuid", alias: None, serializer: Some( Uuid( UuidSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "user_id": SerField { key: "user_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "dbnode_id": SerField { key: "dbnode_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "content": SerField { key: "content", 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, }, "ctime": SerField { key: "ctime", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), 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: "Comment", }, ), 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="Comment", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "uuid", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "uuid", ), rest: [], }, by_alias: [], }, validator: Uuid( UuidValidator { strict: false, version: None, }, ), frozen: false, }, Field { name: "ctime", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "ctime", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), frozen: false, }, Field { name: "mtime", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "mtime", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), frozen: false, }, Field { name: "content", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "content", ), 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: "user_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "user_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "dbnode_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "dbnode_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, ], model_name: "Comment", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "mtime", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "content", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "user_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "dbnode_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 6, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "uuid", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "ctime", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, }, }, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x00005d8bb7274930, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Comment", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, uuid: uuid.UUID, ctime: datetime.datetime, mtime: datetime.datetime, content: Optional[str] = None, user_id: int, dbnode_id: 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>#
- content#
- ctime#
- dbnode_id#
- id#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- mtime#
- user_id#
- uuid#
- class aiida_restapi.graphql.aiida_db_mappings.Computer(*, id, uuid, label, hostname, description=None, scheduler_type, transport_type, metadata)[source]#
Bases:
BaseModelAiiDA Computer SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'description': typing.Optional[str], 'hostname': <class 'str'>, 'id': <class 'int'>, 'label': <class 'str'>, 'metadata': <class 'pydantic.types.Json'>, 'scheduler_type': <class 'str'>, 'transport_type': <class 'str'>, 'uuid': <class 'uuid.UUID'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Computer'>, 'config': {'title': 'Computer'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Computer'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Computer:102854654647760', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'description': {'metadata': {'pydantic_js_updates': {'description': 'Description of the computer'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'hostname': {'metadata': {'pydantic_js_updates': {'description': 'Identifier for the computer within the network'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'Computer name'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'metadata': {'metadata': {'pydantic_js_updates': {'description': 'Metadata of the computer'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'scheduler_type': {'metadata': {'pydantic_js_updates': {'description': 'Scheduler plugin type, to manage compute jobs'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'transport_type': {'metadata': {'pydantic_js_updates': {'description': 'Transport plugin type, to manage file transfers'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'Universally unique id'}}, 'schema': {'type': 'uuid'}, 'type': 'model-field'}}, 'model_name': 'Computer', '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=Union[str, NoneType], required=False, default=None, description='Description of the computer'), 'hostname': FieldInfo(annotation=str, required=True, description='Identifier for the computer within the network'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'label': FieldInfo(annotation=str, required=True, description='Computer name'), 'metadata': FieldInfo(annotation=Json, required=True, description='Metadata of the computer'), 'scheduler_type': FieldInfo(annotation=str, required=True, description='Scheduler plugin type, to manage compute jobs'), 'transport_type': FieldInfo(annotation=str, required=True, description='Transport plugin type, to manage file transfers'), 'uuid': FieldInfo(annotation=UUID, required=True, description='Universally unique id')}#
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( 0x00005d8bb7275dd0, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb7275dd0, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb7275dd0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "uuid": SerField { key: "uuid", alias: None, serializer: Some( Uuid( UuidSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "transport_type": SerField { key: "transport_type", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "scheduler_type": SerField { key: "scheduler_type", alias: None, serializer: Some( 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( 0x0000781936090c20, ), ), serializer: Nullable( NullableSerializer { serializer: Str( StrSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "metadata": SerField { key: "metadata", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "hostname": SerField { key: "hostname", 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: 8, }, ), has_extra: false, root_model: false, name: "Computer", }, ), 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="Computer", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "uuid", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "uuid", ), rest: [], }, by_alias: [], }, validator: Uuid( UuidValidator { strict: false, version: None, }, ), frozen: false, }, 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: "hostname", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "hostname", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: 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( 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: "scheduler_type", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "scheduler_type", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "transport_type", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "transport_type", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "metadata", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "metadata", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, ], model_name: "Computer", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "scheduler_type", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "uuid", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "description", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "transport_type", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 6, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "metadata", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 7, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "hostname", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "label", ): 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( 0x00005d8bb7275dd0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Computer", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, uuid: uuid.UUID, label: str, hostname: str, description: Optional[str] = None, scheduler_type: str, transport_type: str, metadata: pydantic.types.Json) -> 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#
- hostname#
- id#
- label#
- metadata#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scheduler_type#
- transport_type#
- uuid#
- class aiida_restapi.graphql.aiida_db_mappings.Group(*, id, uuid, label, type_string, time, description=None, extras, user_id)[source]#
Bases:
BaseModelAiiDA Group SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'description': typing.Optional[str], 'extras': <class 'pydantic.types.Json'>, 'id': <class 'int'>, 'label': <class 'str'>, 'time': <class 'datetime.datetime'>, 'type_string': <class 'str'>, 'user_id': <class 'int'>, 'uuid': <class 'uuid.UUID'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Group'>, 'config': {'title': 'Group'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Group'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Group:102854654659120', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'description': {'metadata': {'pydantic_js_updates': {'description': 'Description of group'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'extra data about for the group'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'Label of group'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'time': {'metadata': {'pydantic_js_updates': {'description': 'Created time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'type_string': {'metadata': {'pydantic_js_updates': {'description': 'type of the group'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'user_id': {'metadata': {'pydantic_js_updates': {'description': 'Created by user id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'Universally unique id'}}, 'schema': {'type': 'uuid'}, 'type': 'model-field'}}, 'model_name': 'Group', '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=Union[str, NoneType], required=False, default=None, description='Description of group'), 'extras': FieldInfo(annotation=Json, required=True, description='extra data about for the group'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'label': FieldInfo(annotation=str, required=True, description='Label of group'), 'time': FieldInfo(annotation=datetime, required=True, description='Created time'), 'type_string': FieldInfo(annotation=str, required=True, description='type of the group'), 'user_id': FieldInfo(annotation=int, required=True, description='Created by user id (pk)'), 'uuid': FieldInfo(annotation=UUID, required=True, description='Universally unique id')}#
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( 0x00005d8bb7278a30, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb7278a30, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb7278a30, ), serializer: Fields( GeneralFieldsSerializer { fields: { "uuid": SerField { key: "uuid", alias: None, serializer: Some( Uuid( UuidSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "description": SerField { key: "description", 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, }, "label": SerField { key: "label", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "time": SerField { key: "time", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "user_id": SerField { key: "user_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "type_string": SerField { key: "type_string", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "extras": SerField { key: "extras", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), 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: 8, }, ), has_extra: false, root_model: false, name: "Group", }, ), 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="Group", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "uuid", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "uuid", ), rest: [], }, by_alias: [], }, validator: Uuid( UuidValidator { strict: false, version: None, }, ), frozen: false, }, 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: "type_string", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "type_string", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "time", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "time", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), 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( 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: "extras", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "extras", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, Field { name: "user_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "user_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, ], model_name: "Group", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "type_string", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "label", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "description", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "uuid", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "user_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 7, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "time", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "extras", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 6, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, }, }, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x00005d8bb7278a30, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Group", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, uuid: uuid.UUID, label: str, type_string: str, time: datetime.datetime, description: Optional[str] = None, extras: pydantic.types.Json, user_id: 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>#
- description#
- extras#
- id#
- label#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- time#
- type_string#
- user_id#
- uuid#
- class aiida_restapi.graphql.aiida_db_mappings.Link(*, id, input_id, output_id, label=None, type)[source]#
Bases:
BaseModelAiiDA Link SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'id': <class 'int'>, 'input_id': <class 'int'>, 'label': typing.Optional[str], 'output_id': <class 'int'>, 'type': <class 'str'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Link'>, 'config': {'title': 'Link'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Link'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Link:102854654731456', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'input_id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk) of the input node'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'The label of the link'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'output_id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk) of the output node'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'type': {'metadata': {'pydantic_js_updates': {'description': 'The type of link'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}}, 'model_name': 'Link', '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__ = {'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'input_id': FieldInfo(annotation=int, required=True, description='Unique id (pk) of the input node'), 'label': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The label of the link'), 'output_id': FieldInfo(annotation=int, required=True, description='Unique id (pk) of the output node'), 'type': FieldInfo(annotation=str, required=True, description='The type of link')}#
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( 0x00005d8bb728a4c0, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb728a4c0, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb728a4c0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "label": SerField { key: "label", 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, }, "type": SerField { key: "type", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "input_id": SerField { key: "input_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "output_id": SerField { key: "output_id", alias: None, serializer: Some( 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: 5, }, ), has_extra: false, root_model: false, name: "Link", }, ), 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="Link", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "input_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "input_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "output_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "output_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "label", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "label", ), 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: "type", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "type", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, ], model_name: "Link", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "input_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "label", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "type", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "output_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, }, }, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x00005d8bb728a4c0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Link", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, input_id: int, output_id: int, label: Optional[str] = None, 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>#
- id#
- input_id#
- label#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- output_id#
- type#
- class aiida_restapi.graphql.aiida_db_mappings.Log(*, id, uuid, time, loggername, levelname, message=None, metadata, dbnode_id)[source]#
Bases:
BaseModelAiiDA Log SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'dbnode_id': <class 'int'>, 'id': <class 'int'>, 'levelname': <class 'str'>, 'loggername': <class 'str'>, 'message': typing.Optional[str], 'metadata': <class 'pydantic.types.Json'>, 'time': <class 'datetime.datetime'>, 'uuid': <class 'uuid.UUID'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Log'>, 'config': {'title': 'Log'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Log'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Log:102854654700144', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'dbnode_id': {'metadata': {'pydantic_js_updates': {'description': 'Associated node id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'levelname': {'metadata': {'pydantic_js_updates': {'description': 'The log level'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'loggername': {'metadata': {'pydantic_js_updates': {'description': 'The loggers name'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'message': {'metadata': {'pydantic_js_updates': {'description': 'The log message'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'metadata': {'metadata': {'pydantic_js_updates': {'description': 'Metadata associated with the log'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'time': {'metadata': {'pydantic_js_updates': {'description': 'Creation time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'Universally unique id'}}, 'schema': {'type': 'uuid'}, 'type': 'model-field'}}, 'model_name': 'Log', '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__ = {'dbnode_id': FieldInfo(annotation=int, required=True, description='Associated node id (pk)'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'levelname': FieldInfo(annotation=str, required=True, description='The log level'), 'loggername': FieldInfo(annotation=str, required=True, description='The loggers name'), 'message': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='The log message'), 'metadata': FieldInfo(annotation=Json, required=True, description='Metadata associated with the log'), 'time': FieldInfo(annotation=datetime, required=True, description='Creation time'), 'uuid': FieldInfo(annotation=UUID, required=True, description='Universally unique id')}#
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( 0x00005d8bb7282a70, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb7282a70, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb7282a70, ), serializer: Fields( GeneralFieldsSerializer { fields: { "uuid": SerField { key: "uuid", alias: None, serializer: Some( Uuid( UuidSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "metadata": SerField { key: "metadata", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "levelname": SerField { key: "levelname", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "time": SerField { key: "time", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "message": SerField { key: "message", 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, }, "loggername": SerField { key: "loggername", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "dbnode_id": SerField { key: "dbnode_id", alias: None, serializer: Some( 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: 8, }, ), has_extra: false, root_model: false, name: "Log", }, ), 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="Log", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "uuid", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "uuid", ), rest: [], }, by_alias: [], }, validator: Uuid( UuidValidator { strict: false, version: None, }, ), frozen: false, }, Field { name: "time", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "time", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), frozen: false, }, Field { name: "loggername", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "loggername", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "levelname", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "levelname", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "message", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "message", ), 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: "metadata", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "metadata", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, Field { name: "dbnode_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "dbnode_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, ], model_name: "Log", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "loggername", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "levelname", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "message", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "time", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "dbnode_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 7, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "uuid", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "metadata", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 6, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, }, }, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x00005d8bb7282a70, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Log", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, uuid: uuid.UUID, time: datetime.datetime, loggername: str, levelname: str, message: Optional[str] = None, metadata: pydantic.types.Json, dbnode_id: 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>#
- dbnode_id#
- id#
- levelname#
- loggername#
- message#
- metadata#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- time#
- uuid#
- class aiida_restapi.graphql.aiida_db_mappings.Node(*, id, uuid, node_type, process_type, label, description, ctime, mtime, user_id, dbcomputer_id=None, attributes, extras)[source]#
Bases:
BaseModelAiiDA Node SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'attributes': <class 'pydantic.types.Json'>, 'ctime': <class 'datetime.datetime'>, 'dbcomputer_id': typing.Optional[int], 'description': <class 'str'>, 'extras': <class 'pydantic.types.Json'>, 'id': <class 'int'>, 'label': <class 'str'>, 'mtime': <class 'datetime.datetime'>, 'node_type': <class 'str'>, 'process_type': <class 'str'>, 'user_id': <class 'int'>, 'uuid': <class 'uuid.UUID'>}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.Node'>, 'config': {'title': 'Node'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.Node'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.Node:102854654711248', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'attributes': {'metadata': {'pydantic_js_updates': {'description': 'Attributes of the node (immutable after storing the node)'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'ctime': {'metadata': {'pydantic_js_updates': {'description': 'Creation time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'dbcomputer_id': {'metadata': {'pydantic_js_updates': {'description': 'Associated computer id (pk)'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'int'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'description': {'metadata': {'pydantic_js_updates': {'description': 'Description of node'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'extras': {'metadata': {'pydantic_js_updates': {'description': 'Extra attributes of the node (mutable)'}}, 'schema': {'type': 'json'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'label': {'metadata': {'pydantic_js_updates': {'description': 'Label of node'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'mtime': {'metadata': {'pydantic_js_updates': {'description': 'Last modification time'}}, 'schema': {'microseconds_precision': 'truncate', 'type': 'datetime'}, 'type': 'model-field'}, 'node_type': {'metadata': {'pydantic_js_updates': {'description': 'Node type'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'process_type': {'metadata': {'pydantic_js_updates': {'description': 'Process type'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'user_id': {'metadata': {'pydantic_js_updates': {'description': 'Created by user id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'uuid': {'metadata': {'pydantic_js_updates': {'description': 'Universally unique id'}}, 'schema': {'type': 'uuid'}, 'type': 'model-field'}}, 'model_name': 'Node', '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__ = {'attributes': FieldInfo(annotation=Json, required=True, description='Attributes of the node (immutable after storing the node)'), 'ctime': FieldInfo(annotation=datetime, required=True, description='Creation time'), 'dbcomputer_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Associated computer id (pk)'), 'description': FieldInfo(annotation=str, required=True, description='Description of node'), 'extras': FieldInfo(annotation=Json, required=True, description='Extra attributes of the node (mutable)'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'label': FieldInfo(annotation=str, required=True, description='Label of node'), 'mtime': FieldInfo(annotation=datetime, required=True, description='Last modification time'), 'node_type': FieldInfo(annotation=str, required=True, description='Node type'), 'process_type': FieldInfo(annotation=str, required=True, description='Process type'), 'user_id': FieldInfo(annotation=int, required=True, description='Created by user id (pk)'), 'uuid': FieldInfo(annotation=UUID, required=True, description='Universally unique id')}#
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( 0x00005d8bb72855d0, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb72855d0, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb72855d0, ), serializer: Fields( GeneralFieldsSerializer { fields: { "uuid": SerField { key: "uuid", alias: None, serializer: Some( Uuid( UuidSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "attributes": SerField { key: "attributes", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "description": SerField { key: "description", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "process_type": SerField { key: "process_type", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "ctime": SerField { key: "ctime", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "mtime": SerField { key: "mtime", alias: None, serializer: Some( Datetime( DatetimeSerializer { temporal_mode: Iso8601, }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "node_type": SerField { key: "node_type", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "dbcomputer_id": SerField { key: "dbcomputer_id", alias: None, serializer: Some( WithDefault( WithDefaultSerializer { default: Default( Py( 0x0000781936090c20, ), ), serializer: Nullable( NullableSerializer { serializer: Int( IntSerializer, ), }, ), }, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "id": SerField { key: "id", alias: None, serializer: Some( Int( IntSerializer, ), ), 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, }, "user_id": SerField { key: "user_id", alias: None, serializer: Some( Int( IntSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "extras": SerField { key: "extras", alias: None, serializer: Some( Json( JsonSerializer { serializer: Any( AnySerializer, ), }, ), ), 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: 12, }, ), has_extra: false, root_model: false, name: "Node", }, ), 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="Node", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "uuid", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "uuid", ), rest: [], }, by_alias: [], }, validator: Uuid( UuidValidator { strict: false, version: None, }, ), 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: "process_type", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "process_type", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, 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: "description", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "description", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "ctime", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "ctime", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), frozen: false, }, Field { name: "mtime", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "mtime", ), rest: [], }, by_alias: [], }, validator: Datetime( DateTimeValidator { strict: false, constraints: None, microseconds_precision: Truncate, val_temporal_unit: Infer, }, ), frozen: false, }, Field { name: "user_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "user_id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "dbcomputer_id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "dbcomputer_id", ), rest: [], }, by_alias: [], }, validator: WithDefault( WithDefaultValidator { default: Default( Py( 0x0000781936090c20, ), ), on_error: Raise, validator: Nullable( NullableValidator { validator: Int( IntValidator { strict: false, }, ), name: "nullable[int]", }, ), validate_default: false, copy_default: false, name: "default[nullable[int]]", undefined: Py( 0x0000781933fd64d0, ), }, ), frozen: false, }, Field { name: "attributes", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "attributes", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, Field { name: "extras", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "extras", ), rest: [], }, by_alias: [], }, validator: Json( JsonValidator { validator: None, name: "json[any]", }, ), frozen: false, }, ], model_name: "Node", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "description", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 5, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "dbcomputer_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 9, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "node_type", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "uuid", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "label", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "process_type", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 3, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "ctime", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 6, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "attributes", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 10, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "extras", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 11, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "user_id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 8, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "mtime", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 7, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, }, }, validate_by_alias: None, validate_by_name: None, }, ), class: Py( 0x00005d8bb72855d0, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "Node", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, uuid: uuid.UUID, node_type: str, process_type: str, label: str, description: str, ctime: datetime.datetime, mtime: datetime.datetime, user_id: int, dbcomputer_id: Optional[int] = None, attributes: pydantic.types.Json, extras: pydantic.types.Json) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __weakref__#
list of weak references to the object
- _abc_impl = <_abc._abc_data object>#
- attributes#
- ctime#
- dbcomputer_id#
- description#
- extras#
- id#
- label#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- mtime#
- node_type#
- process_type#
- user_id#
- uuid#
- class aiida_restapi.graphql.aiida_db_mappings.User(*, id, email, first_name=None, last_name=None, institution=None)[source]#
Bases:
BaseModelAiiDA User SQL table fields.
- __abstractmethods__ = frozenset({})#
- __annotations__ = {'email': <class 'str'>, 'first_name': typing.Optional[str], 'id': <class 'int'>, 'institution': typing.Optional[str], 'last_name': typing.Optional[str]}#
- __class_vars__ = {}#
The names of the class variables defined on the model.
- __dict__#
- __module__ = 'aiida_restapi.graphql.aiida_db_mappings'#
- __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.graphql.aiida_db_mappings.User'>, 'config': {'title': 'User'}, 'custom_init': False, 'metadata': {'pydantic_js_functions': [<bound method BaseModel.__get_pydantic_json_schema__ of <class 'aiida_restapi.graphql.aiida_db_mappings.User'>>]}, 'ref': 'aiida_restapi.graphql.aiida_db_mappings.User:102854654723952', 'root_model': False, 'schema': {'computed_fields': [], 'fields': {'email': {'metadata': {'pydantic_js_updates': {'description': 'Email address of the user'}}, 'schema': {'type': 'str'}, 'type': 'model-field'}, 'first_name': {'metadata': {'pydantic_js_updates': {'description': 'First name of the user'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'id': {'metadata': {'pydantic_js_updates': {'description': 'Unique id (pk)'}}, 'schema': {'type': 'int'}, 'type': 'model-field'}, 'institution': {'metadata': {'pydantic_js_updates': {'description': 'Host institution or workplace of the user'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}, 'last_name': {'metadata': {'pydantic_js_updates': {'description': 'Last name of the user'}}, 'schema': {'default': None, 'schema': {'schema': {'type': 'str'}, 'type': 'nullable'}, 'type': 'default'}, 'type': 'model-field'}}, 'model_name': 'User', '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__ = {'email': FieldInfo(annotation=str, required=True, description='Email address of the user'), 'first_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='First name of the user'), 'id': FieldInfo(annotation=int, required=True, description='Unique id (pk)'), 'institution': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Host institution or workplace of the user'), 'last_name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Last name of the user')}#
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( 0x00005d8bb7288770, ), serializer: PolymorphismTrampoline( PolymorphismTrampoline { class: Py( 0x00005d8bb7288770, ), serializer: Model( ModelSerializer { class: Py( 0x00005d8bb7288770, ), serializer: Fields( GeneralFieldsSerializer { fields: { "last_name": SerField { key: "last_name", 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, }, "email": SerField { key: "email", alias: None, serializer: Some( Str( StrSerializer, ), ), required: true, serialize_by_alias: None, serialization_exclude_if: None, }, "first_name": SerField { key: "first_name", 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, }, "institution": SerField { key: "institution", 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, }, "id": SerField { key: "id", alias: None, serializer: Some( 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: 5, }, ), has_extra: false, root_model: false, name: "User", }, ), 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="User", validator=Model( ModelValidator { revalidate: Never, validator: ModelFields( ModelFieldsValidator { fields: [ Field { name: "id", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "id", ), rest: [], }, by_alias: [], }, validator: Int( IntValidator { strict: false, }, ), frozen: false, }, Field { name: "email", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "email", ), rest: [], }, by_alias: [], }, validator: Str( StrValidator { strict: false, coerce_numbers_to_str: false, }, ), frozen: false, }, Field { name: "first_name", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "first_name", ), 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: "last_name", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "last_name", ), 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: "institution", lookup_path_collection: LookupPathCollection { by_name: LookupPath { first_item: PathItemString( "institution", ), 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, }, ], model_name: "User", extra_behavior: Ignore, extras_validator: None, extras_keys_validator: None, strict: false, from_attributes: false, loc_by_alias: true, lookup: LookupTree { inner: { PathItemString( "id", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 0, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "institution", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 4, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "first_name", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 2, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "email", ): LookupTreeNode { fields: [ LookupFieldInfo { field_index: 1, lookup_priority: LookupFieldPriority { lookup_type: Both, alias_index: 0, }, }, ], map: {}, list: {}, }, PathItemString( "last_name", ): 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( 0x00005d8bb7288770, ), generic_origin: None, post_init: None, frozen: false, custom_init: false, root_model: false, undefined: Py( 0x0000781933fd64d0, ), name: "User", }, ), definitions=[], cache_strings=True)#
The pydantic-core SchemaValidator used to validate instances of the model.
- __signature__ = <Signature (*, id: int, email: str, first_name: Optional[str] = None, last_name: Optional[str] = None, institution: Optional[str] = None) -> None>#
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __weakref__#
list of weak references to the object
- _abc_impl = <_abc._abc_data object>#
- email#
- first_name#
- id#
- institution#
- last_name#
- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
aiida_restapi.graphql.basic module#
Defines plugins for basic information about aiida etc.
aiida_restapi.graphql.comments module#
Defines plugins for AiiDA comments.
- class aiida_restapi.graphql.comments.CommentQuery(id=None, uuid=None, ctime=None, mtime=None, content=None, user_id=None, dbnode_id=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA Comment
- __module__ = 'aiida_restapi.graphql.comments'#
- _meta = <ObjectTypeOptions name='CommentQuery'>#
- class aiida_restapi.graphql.comments.CommentsQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Comments.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.comments'#
- _meta = <ObjectTypeOptions name='CommentsQuery'>#
aiida_restapi.graphql.computers module#
Defines plugins for AiiDA computers.
- class aiida_restapi.graphql.computers.ComputerQuery(id=None, uuid=None, label=None, hostname=None, description=None, scheduler_type=None, transport_type=None, metadata=None, nodes=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA Computer
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.computers'#
- _meta = <ObjectTypeOptions name='ComputerQuery'>#
- nodes = <graphene.types.field.Field object>#
- class aiida_restapi.graphql.computers.ComputersQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Computers
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.computers'#
- _meta = <ObjectTypeOptions name='ComputersQuery'>#
aiida_restapi.graphql.config module#
Configuration for Graphql.
- aiida_restapi.graphql.config.ENTITY_LIMIT = 100#
The maximum query limit allowed for a list of entity rows.
aiida_restapi.graphql.entry_points module#
Defines plugins for retrieving entry-point group and name lists.
- class aiida_restapi.graphql.entry_points.EntryPoints(group=None, names=None)[source]#
Bases:
InterObjectType,ObjectTypeReturn type from an entry point group and its list of registered names.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.entry_points'#
- _meta = <ObjectTypeOptions name='EntryPoints'>#
- group = <graphene.types.scalars.String object>#
- names = <graphene.types.structures.List object>#
aiida_restapi.graphql.filter_syntax module#
The AiiDA QueryBuilder filter grammar resolver.
Converts the string into a dict that can be passed to
QueryBuilder().append(..., filters=filters).
This grammar was originally adapted from: Materials-Consortia/OPTIMADE
aiida_restapi.graphql.groups module#
Defines plugins for AiiDA groups.
- class aiida_restapi.graphql.groups.GroupQuery(id=None, uuid=None, label=None, type_string=None, time=None, description=None, extras=None, user_id=None, nodes=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA Group
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.groups'#
- _meta = <ObjectTypeOptions name='GroupQuery'>#
- nodes = <graphene.types.field.Field object>#
- class aiida_restapi.graphql.groups.GroupsQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Groups
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.groups'#
- _meta = <ObjectTypeOptions name='GroupsQuery'>#
aiida_restapi.graphql.logs module#
Defines plugins for AiiDA process node logs.
- class aiida_restapi.graphql.logs.LogQuery(id=None, uuid=None, time=None, loggername=None, levelname=None, message=None, metadata=None, dbnode_id=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA Log
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.logs'#
- _meta = <ObjectTypeOptions name='LogQuery'>#
- class aiida_restapi.graphql.logs.LogsQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Logs.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.logs'#
- _meta = <ObjectTypeOptions name='LogsQuery'>#
aiida_restapi.graphql.main module#
Main module that generates the full Graphql App.
aiida_restapi.graphql.nodes module#
Defines plugins for AiiDA nodes.
- class aiida_restapi.graphql.nodes.LinkQuery(link=None, node=None)[source]#
Bases:
InterObjectType,ObjectTypeA link and its end node.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.nodes'#
- _meta = <ObjectTypeOptions name='LinkQuery'>#
- link = <graphene.types.field.Field object>#
- node = <graphene.types.field.Field object>#
- class aiida_restapi.graphql.nodes.LinksQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Links.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.nodes'#
- _meta = <ObjectTypeOptions name='LinksQuery'>#
- class aiida_restapi.graphql.nodes.NodeQuery(id=None, uuid=None, node_type=None, process_type=None, label=None, description=None, ctime=None, mtime=None, user_id=None, dbcomputer_id=None, attributes=None, extras=None, comments=None, logs=None, incoming=None, outgoing=None, ancestors=None, descendants=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA Node
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.nodes'#
- _meta = <ObjectTypeOptions name='NodeQuery'>#
- ancestors = <graphene.types.field.Field object>#
- attributes = <aiida_restapi.graphql.utils.JSON object>#
- comments = <graphene.types.field.Field object>#
- descendants = <graphene.types.field.Field object>#
- extras = <aiida_restapi.graphql.utils.JSON object>#
- incoming = <graphene.types.field.Field object>#
- logs = <graphene.types.field.Field object>#
- outgoing = <graphene.types.field.Field object>#
- class aiida_restapi.graphql.nodes.NodesQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Nodes
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.nodes'#
- _meta = <ObjectTypeOptions name='NodesQuery'>#
aiida_restapi.graphql.orm_factories module#
Classes and functions to auto-generate base ObjectTypes for aiida orm entities.
- aiida_restapi.graphql.orm_factories.create_query_path(query, parent)[source]#
Append parent entities to the
QueryBuilderpath.- Parameters:
parent – data from the parent resolver
- Returns:
key-word arguments for the “leaf” path
- aiida_restapi.graphql.orm_factories.field_names_from_orm(cls)[source]#
Extract the field names from an AIIDA ORM class.
- aiida_restapi.graphql.orm_factories.fields_from_name(cls, exclude_fields=())[source]#
Extract the fields from an AIIDA ORM class name and convert them to graphene objects.
- aiida_restapi.graphql.orm_factories.fields_from_orm(cls, exclude_fields=())[source]#
Extract the fields from an AIIDA ORM class and convert them to graphene objects.
- aiida_restapi.graphql.orm_factories.get_projection(db_fields, info, is_link=False)[source]#
Traverse the child AST to work out what fields we should project.
Any fields found that are not database fields, are assumed to be joins. If any joins are present, we always include “id”, so they can be linked.
We fallback to “**” (all fields) if the selection set cannot be identified.
- aiida_restapi.graphql.orm_factories.get_pydantic_type_name(annotation)[source]#
In pydantic v1, one could do field.type_, but in v2, one has to go though field.annotation
- aiida_restapi.graphql.orm_factories.multirow_cls_factory(entity_cls, orm_cls, name)[source]#
Create a graphene class with standard fields/resolvers for querying multiple rows of the same AiiDA ORM entity.
aiida_restapi.graphql.plugins module#
Module defining the graphql plugin mechanism.
- class aiida_restapi.graphql.plugins.QueryPlugin(name, field, resolver)[source]#
Bases:
NamedTupleDefine a top-level query, to plugin to the schema.
- __annotations__ = {'field': <ObjectType meta=None>, 'name': <class 'str'>, 'resolver': typing.Callable[..., typing.Any]}#
- __getnewargs__()#
Return self as a plain tuple. Used by copy and pickle.
- __match_args__ = ('name', 'field', 'resolver')#
- __module__ = 'aiida_restapi.graphql.plugins'#
- static __new__(_cls, name, field, resolver)#
Create new instance of QueryPlugin(name, field, resolver)
- __orig_bases__ = (<function NamedTuple>,)#
- __repr__()#
Return a nicely formatted representation string
- __slots__ = ()#
- _asdict()#
Return a new dict which maps field names to their values.
- _field_defaults = {}#
- _fields = ('name', 'field', 'resolver')#
- classmethod _make(iterable)#
Make a new QueryPlugin object from a sequence or iterable
- _replace(**kwds)#
Return a new QueryPlugin object replacing specified fields with new values
- field#
Alias for field number 1
- name#
Alias for field number 0
- resolver#
Alias for field number 2
aiida_restapi.graphql.sphinx_ext module#
Sphinx extension for documenting the GraphQL schema.
aiida_restapi.graphql.users module#
Defines plugins for AiiDA users.
- class aiida_restapi.graphql.users.UserQuery(id=None, email=None, first_name=None, last_name=None, institution=None, nodes=None)[source]#
Bases:
InterObjectType,AiidaOrmObjectTypeQuery an AiiDA User
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.users'#
- _meta = <ObjectTypeOptions name='UserQuery'>#
- nodes = <graphene.types.field.Field object>#
- class aiida_restapi.graphql.users.UsersQuery(count=None, rows=None)[source]#
Bases:
InterObjectType,AiidaOrmRowsTypeQuery all AiiDA Users
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.users'#
- _meta = <ObjectTypeOptions name='UsersQuery'>#
aiida_restapi.graphql.utils module#
Utility functions for graphql.
- class aiida_restapi.graphql.utils.FilterString(*args, **kwargs)[source]#
Bases:
StringA string adhering to the AiiDA filter syntax.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.utils'#
- _meta = <ScalarOptions name='FilterString'>#
- class aiida_restapi.graphql.utils.JSON(*args, **kwargs)[source]#
Bases:
ScalarCustom scalar type for JSON values that could be: String, Boolean, Int, Float, List or Object.
- __annotations__ = {}#
- __module__ = 'aiida_restapi.graphql.utils'#
- _meta = <ScalarOptions name='JSON'>#
- aiida_restapi.graphql.utils.selected_field_names_naive(selection_set)[source]#
Get the list of field names that are selected at the current level. Does not include nested names.
Taken from: graphql-python/graphene#57