weaviate.data.references package
Module for adding, deleting and updating references in-between objects.
- class weaviate.data.references.Reference(connection: Connection)[source]
Bases:
object
Reference class used to manipulate references within objects.
Initialize a Reference class instance.
Parameters
- connectionweaviate.connect.Connection
Connection object to an active and running weaviate instance.
- add(from_uuid: str, from_property_name: str, to_uuid: str, from_class_name: str | None = None, to_class_name: str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Allows to link an object to an object uni-directionally.
Parameters
- from_uuidstr
The ID of the object that should have the reference as part of its properties. Should be a plane UUID or an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_property_namestr
The name of the property within the object.
- to_uuidstr
The UUID of the object that should be referenced. Should be a plane UUID or an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_nameOptional[str], optional
The referenced object class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str]
The name of the tenant for which this operation is being performed.
Examples
Assume we have two classes, Author and Book.
>>> # Create the objects first >>> client.data_object.create( ... data_object={'name': 'Ray Bradbury'}, ... class_name='Author', ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... ) >>> client.data_object.create( ... data_object={'title': 'The Martian Chronicles'}, ... class_name='Book', ... uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d' ... ) >>> # Add the cross references >>> ## Author -> Book >>> client.data_object.reference.add( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null }
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If the parameters are of the wrong type.
- ValueError
If the parameters are of the wrong value.
- delete(from_uuid: str, from_property_name: str, to_uuid: str, from_class_name: str | None = None, to_class_name: str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Remove a reference to another object. Equal to removing one direction of an edge from the graph.
Parameters
- from_uuidstr
The ID of the object that references another object.
- from_property_namestr
The property from which the reference should be deleted.
- to_uuidstr
The UUID of the referenced object.
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_nameOptional[str], optional
The referenced object class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str], optional
The name of the tenant for which this operation is being performed.
Examples
Assume we have two classes, Author and Book.
>>> # Create the objects first >>> client.data_object.create( ... data_object={'name': 'Ray Bradbury'}, ... class_name='Author', ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... ) >>> client.data_object.create( ... data_object={'title': 'The Martian Chronicles'}, ... class_name='Book', ... uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d' ... ) >>> # Add the cross references >>> ## Author -> Book >>> client.data_object.reference.add( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null } >>> # delete the reference >>> client.data_object.reference.delete( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177864970, "properties": { "name": "Ray Bradbury", "wroteBooks": [] }, "vectorWeights": null }
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If parameter has the wrong type.
- ValueError
If uuid is not properly formed.
- update(from_uuid: str, from_property_name: str, to_uuids: List[str] | str, from_class_name: str | None = None, to_class_names: List[str] | str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Allows to update all references in that property with a new set of references. All old references will be deleted.
Parameters
- from_uuidstr
The object that should have the reference as part of its properties. Should be in the form of an UUID or in form of an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_property_namestr
The name of the property within the object.
- to_uuidslist or str
The UUIDs of the objects that should be referenced. Should be a list of str in the form of an UUID or str in form of an URL. E.g. [’http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’, …] or [‘fc7eb129-f138-457f-b727-1b29db191a67’, …] If str it is converted internally into a list of str.
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_namesUnion[list, str, None], optional
The referenced objects class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. It can be a single class name (assumes all to_uuids are of the same class) or a list of class names where for each UUID in to_uuids we have a class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str]
The name of the tenant for which this operation is being performed.
Examples
You have data object 1 with reference property wroteBooks and currently has one reference to data object 7. Now you say, I want to update the references of data object 1.wroteBooks to this list 3,4,9. After the update, the data object 1.wroteBooks is now 3,4,9, but no longer contains 7.
>>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null } Currently there is only one `Book` reference. Update all the references of the Author for property name `wroteBooks`. >>> client.data_object.reference.update( ... from_uuid = 'e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name = 'wroteBooks', ... to_uuids = [ ... '8429f68f-860a-49ea-a50b-1f8789515882', ... '3e2e6795-298b-47e9-a2cb-3d8a77a24d8a' ... ], ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617181292677, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617181409405, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/8429f68f-860a-49ea-a50b-1f8789515882", "href": "/v1/objects/Book/8429f68f-860a-49ea-a50b-1f8789515882" }, { "beacon": "weaviate://localhost/Book/3e2e6795-298b-47e9-a2cb-3d8a77a24d8a", "href": "/v1/objects/Book/3e2e6795-298b-47e9-a2cb-3d8a77a24d8a" } ] }, "vectorWeights": null } All the previous references were removed and now we have only those specified in the `update` method.
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If the parameters are of the wrong type.
- ValueError
If the parameters are of the wrong value.
Submodules
weaviate.data.references.crud_references module
Reference class definition.
- class weaviate.data.references.crud_references.Reference(connection: Connection)[source]
Bases:
object
Reference class used to manipulate references within objects.
Initialize a Reference class instance.
Parameters
- connectionweaviate.connect.Connection
Connection object to an active and running weaviate instance.
- add(from_uuid: str, from_property_name: str, to_uuid: str, from_class_name: str | None = None, to_class_name: str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Allows to link an object to an object uni-directionally.
Parameters
- from_uuidstr
The ID of the object that should have the reference as part of its properties. Should be a plane UUID or an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_property_namestr
The name of the property within the object.
- to_uuidstr
The UUID of the object that should be referenced. Should be a plane UUID or an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_nameOptional[str], optional
The referenced object class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str]
The name of the tenant for which this operation is being performed.
Examples
Assume we have two classes, Author and Book.
>>> # Create the objects first >>> client.data_object.create( ... data_object={'name': 'Ray Bradbury'}, ... class_name='Author', ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... ) >>> client.data_object.create( ... data_object={'title': 'The Martian Chronicles'}, ... class_name='Book', ... uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d' ... ) >>> # Add the cross references >>> ## Author -> Book >>> client.data_object.reference.add( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null }
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If the parameters are of the wrong type.
- ValueError
If the parameters are of the wrong value.
- delete(from_uuid: str, from_property_name: str, to_uuid: str, from_class_name: str | None = None, to_class_name: str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Remove a reference to another object. Equal to removing one direction of an edge from the graph.
Parameters
- from_uuidstr
The ID of the object that references another object.
- from_property_namestr
The property from which the reference should be deleted.
- to_uuidstr
The UUID of the referenced object.
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_nameOptional[str], optional
The referenced object class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str], optional
The name of the tenant for which this operation is being performed.
Examples
Assume we have two classes, Author and Book.
>>> # Create the objects first >>> client.data_object.create( ... data_object={'name': 'Ray Bradbury'}, ... class_name='Author', ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... ) >>> client.data_object.create( ... data_object={'title': 'The Martian Chronicles'}, ... class_name='Book', ... uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d' ... ) >>> # Add the cross references >>> ## Author -> Book >>> client.data_object.reference.add( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null } >>> # delete the reference >>> client.data_object.reference.delete( ... from_uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name='wroteBooks', ... to_uuid='a9c1b714-4f8a-4b01-a930-38b046d69d2d', ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab', ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177864970, "properties": { "name": "Ray Bradbury", "wroteBooks": [] }, "vectorWeights": null }
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If parameter has the wrong type.
- ValueError
If uuid is not properly formed.
- update(from_uuid: str, from_property_name: str, to_uuids: List[str] | str, from_class_name: str | None = None, to_class_names: List[str] | str | None = None, consistency_level: ConsistencyLevel | None = None, tenant: str | None = None) None [source]
Allows to update all references in that property with a new set of references. All old references will be deleted.
Parameters
- from_uuidstr
The object that should have the reference as part of its properties. Should be in the form of an UUID or in form of an URL. E.g. ‘http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’ or ‘fc7eb129-f138-457f-b727-1b29db191a67’
- from_property_namestr
The name of the property within the object.
- to_uuidslist or str
The UUIDs of the objects that should be referenced. Should be a list of str in the form of an UUID or str in form of an URL. E.g. [’http://localhost:8080/v1/objects/Book/fc7eb129-f138-457f-b727-1b29db191a67’, …] or [‘fc7eb129-f138-457f-b727-1b29db191a67’, …] If str it is converted internally into a list of str.
- from_class_nameOptional[str], optional
The class name of the object for which to delete the reference (with UUID from_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- to_class_namesUnion[list, str, None], optional
The referenced objects class name to which to delete the reference (with UUID to_uuid), it is included in Weaviate 1.14.0, where all objects are namespaced by class name. It can be a single class name (assumes all to_uuids are of the same class) or a list of class names where for each UUID in to_uuids we have a class name. STRONGLY recommended to set it with Weaviate >= 1.14.0. It will be required in future versions of Weaviate Server and Clients. Use None value ONLY for Weaviate < v1.14.0, by default None
- consistency_levelOptional[ConsistencyLevel], optional
Can be one of ‘ALL’, ‘ONE’, or ‘QUORUM’. Determines how many replicas must acknowledge
- tenant: Optional[str]
The name of the tenant for which this operation is being performed.
Examples
You have data object 1 with reference property wroteBooks and currently has one reference to data object 7. Now you say, I want to update the references of data object 1.wroteBooks to this list 3,4,9. After the update, the data object 1.wroteBooks is now 3,4,9, but no longer contains 7.
>>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617177700595, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617177700595, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d", "href": "/v1/objects/Book/a9c1b714-4f8a-4b01-a930-38b046d69d2d" } ] }, "vectorWeights": null } Currently there is only one `Book` reference. Update all the references of the Author for property name `wroteBooks`. >>> client.data_object.reference.update( ... from_uuid = 'e067f671-1202-42c6-848b-ff4d1eb804ab', ... from_property_name = 'wroteBooks', ... to_uuids = [ ... '8429f68f-860a-49ea-a50b-1f8789515882', ... '3e2e6795-298b-47e9-a2cb-3d8a77a24d8a' ... ], ... from_class_name='Author', # ONLY with Weaviate >= 1.14.0 ... to_class_name='Book', # ONLY with Weaviate >= 1.14.0 ... ) >>> client.data_object.get( ... uuid='e067f671-1202-42c6-848b-ff4d1eb804ab' ... class_name='Author', # ONLY with Weaviate >= 1.14.0 ... ) { "additional": {}, "class": "Author", "creationTimeUnix": 1617181292677, "id": "e067f671-1202-42c6-848b-ff4d1eb804ab", "lastUpdateTimeUnix": 1617181409405, "properties": { "name": "Ray Bradbury", "wroteBooks": [ { "beacon": "weaviate://localhost/Book/8429f68f-860a-49ea-a50b-1f8789515882", "href": "/v1/objects/Book/8429f68f-860a-49ea-a50b-1f8789515882" }, { "beacon": "weaviate://localhost/Book/3e2e6795-298b-47e9-a2cb-3d8a77a24d8a", "href": "/v1/objects/Book/3e2e6795-298b-47e9-a2cb-3d8a77a24d8a" } ] }, "vectorWeights": null } All the previous references were removed and now we have only those specified in the `update` method.
Raises
- requests.ConnectionError
If the network connection to weaviate fails.
- weaviate.UnexpectedStatusCodeException
If weaviate reports a none OK status.
- TypeError
If the parameters are of the wrong type.
- ValueError
If the parameters are of the wrong value.