class_docstr: Simple KV API built on the underlying filesystem.
  
  This is a convenience wrapper around get_filesystem() and working with files.
  Slashes in the path are interpreted as directory delimiters.
class_docstr_tok: ["Simple","KV","API","built","on","the","underlying","filesystem",".","This","is","a","convenience","wrapper","around","get_filesystem","(",")","and","working","with","files",".","Slashes","in","the","path","are","interpreted","as","directory","delimiters","."]
docstr: Save a blob in persistent storage at the given path, if possible.
  
  Examples:
      .. testcode::
  
          import ray
          from ray._private import storage
  
          ray.shutdown()
  
          ray.init(storage="/tmp/storage/cluster_1/storage")
          client = storage.get_client("my_app")
          client.put("path/foo.txt", b"bar")
  
  Args:
      path: Relative directory of the blobs.
      value: String value to save.
docstr_tok: ["Save","a","blob","in","persistent","storage","at","the","given","path",",","if","possible",".","Examples",":","..","testcode",":",":","import","ray","from","ray._private","import","storage","ray.shutdown","(",")","ray.init","(","storage=","''","\/tmp\/storage\/cluster_1\/storage","''",")","client","=","storage.get_client","(","``","my_app","''",")","client.put","(","``","path\/foo.txt","''",",","b","''","bar","''",")","Args",":","path",":","Relative","directory","of","the","blobs",".","value",":","String","value","to","save","."]
code: def put(self, path: str, value: bytes) -> None:
      """Save a blob in persistent storage at the given path, if possible.
  
      Examples:
          .. testcode::
  
              import ray
              from ray._private import storage
  
              ray.shutdown()
  
              ray.init(storage="/tmp/storage/cluster_1/storage")
              client = storage.get_client("my_app")
              client.put("path/foo.txt", b"bar")
  
      Args:
          path: Relative directory of the blobs.
          value: String value to save.
      """
      full_path = self._resolve_path(path)
      parent_dir = os.path.dirname(full_path)
      try:
          with self.fs.open_output_stream(full_path) as f:
              f.write(value)
      except FileNotFoundError:
          # Directory likely doesn't exist; retry after creating it.
          self.fs.create_dir(parent_dir)
          with self.fs.open_output_stream(full_path) as f:
              f.write(value)
  
imports: import os
  import re
  import urllib
  from pathlib import Path
  from typing import TYPE_CHECKING, List, Optional
  from ray._private.client_mode_hook import client_mode_hook
  from ray._private.utils import _add_creatable_buckets_param_if_s3_uri, load_class
  from ray._private.auto_init_hook import wrap_auto_init
label_desc: Use image node_id 2 for calling the KVClient obj's underlying member method code with example usage: obj.put(path, value) without return types