class_docstr: High-level API client for interacting with dstack server
  
  Attributes:
      runs: Operations with runs.
      repos: Operations with repositories.
      backends: Operations with backends.
class_docstr_tok: ["High-level","API","client","for","interacting","with","dstack","server","Attributes",":","runs",":","Operations","with","runs",".","repos",":","Operations","with","repositories",".","backends",":","Operations","with","backends","."]
code: def __init__(
      self,
      api_client: APIClient,
      project_name: str,
      ssh_identity_file: Optional[PathLike] = None,
  ):
      # """
      # Args:
      #     api_client: low-level server API client
      #     project_name: project name used for runs
      #     ssh_identity_file: SSH keypair to access instances
      # """
      self._client = api_client
      self._project = project_name
      self._repos = RepoCollection(api_client, project_name)
      self._backends = BackendCollection(api_client, project_name)
      self._runs = RunCollection(api_client, project_name, self)
      if ssh_identity_file:
          self.ssh_identity_file = str(ssh_identity_file)
      else:
          self.ssh_identity_file = get_ssh_keypair(
              None, ConfigManager().dstack_key_path
          )
  
file_path: dstack/src/dstack/api/_public/__init__.py
imports: from typing import Optional
  import dstack._internal.core.services.api_client
  from dstack._internal.core.errors import ConfigurationError
  from dstack._internal.core.services.configs import ConfigManager
  from dstack._internal.utils.logging import get_logger
  from dstack._internal.utils.path import PathLike
  from dstack.api._public.backends import BackendCollection
  from dstack.api._public.repos import RepoCollection, get_ssh_keypair
  from dstack.api._public.runs import RunCollection
  from dstack.api.server import APIClient
label_desc: Use image node_id 1 to create a new Client object  with example: obj = Client(api_client, project_name, ssh_identity_file)