class_docstr: Interact with Alibaba Cloud OSS, using the oss2 library.
class_docstr_tok: ["Interact","with","Alibaba","Cloud","OSS",",","using","the","oss2","library","."]
docstr: Load a string to OSS.
  
  :param key: the path of the object
  :param content: str to set as content for the key.
  :param bucket_name: the name of the bucket
docstr_tok: ["Load","a","string","to","OSS",".",":","param","key",":","the","path","of","the","object",":","param","content",":","str","to","set","as","content","for","the","key",".",":","param","bucket_name",":","the","name","of","the","bucket"]
code: def load_string(
      self, key: str, content: str, bucket_name: str | None = None
  ) -> None:
      """
      Load a string to OSS.
  
      :param key: the path of the object
      :param content: str to set as content for the key.
      :param bucket_name: the name of the bucket
      """
      try:
          self.get_bucket(bucket_name).put_object(key, content)
      except Exception as e:
          raise AirflowException(f"Errors: {e}")
  
imports: from __future__ import annotations
  from functools import wraps
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, TypeVar, cast
  from urllib.parse import urlsplit
  import oss2
  from oss2.exceptions import ClientError
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 6 for calling the OSSHook obj's underlying member method code with example usage: obj.load_string(key, content, bucket_name) without return types