class_docstr: Interact with Weaviate database to store vectors. This hook uses the 'conn_id'.
  
  :param conn_id: The connection id to use when connecting to Weaviate. <howto/connection:weaviate>
class_docstr_tok: ["Interact","with","Weaviate","database","to","store","vectors",".","This","hook","uses","the","'conn_id","'",".",":","param","conn_id",":","The","connection","id","to","use","when","connecting","to","Weaviate",".","<","howto\/connection",":","weaviate",">"]
docstr: Create a new object.
  
  :param data_object: Object to be added. If type is str it should be either a URL or a file.
  :param class_name: Class name associated with the object given.
  :param kwargs: Additional parameters to be passed to weaviate_client.data_object.create()
code: def create_object(
      self, data_object: dict | str, class_name: str, **kwargs
  ) -> str | dict[str, Any] | None:
      """Create a new object.
  
      :param data_object: Object to be added. If type is str it should be either a URL or a file.
      :param class_name: Class name associated with the object given.
      :param kwargs: Additional parameters to be passed to weaviate_client.data_object.create()
      """
      client = self.conn
      # generate deterministic uuid if not provided
      uuid = kwargs.pop("uuid", generate_uuid5(data_object))
      try:
          return client.data_object.create(
              data_object, class_name, uuid=uuid, **kwargs
          )
      except ObjectAlreadyExistsException:
          self.log.warning(
              "Object with the UUID %s already exists", uuid
          )
          return None
  
imports: from __future__ import annotations
  import contextlib
  import json
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Dict, List, Sequence, cast
  import requests
  import weaviate.exceptions
  from tenacity import Retrying, retry, retry_if_exception, retry_if_exception_type, stop_after_attempt
  from weaviate import Client
  from weaviate.auth import AuthApiKey, AuthBearerToken, AuthClientCredentials, AuthClientPassword
  from weaviate.data.replication import ConsistencyLevel
  from weaviate.exceptions import ObjectAlreadyExistsException
  from weaviate.util import generate_uuid5
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 22 for calling the WeaviateHook obj's underlying member method code with example usage: obj.create_object(data_object, class_name) and returns: client, None