class_docstr: Low-level API client for interacting with dstack server. Implements all API endpoints
  
  Attributes:
      users: operations with users
      projects: operations with projects
      backends: operations with backends
      runs: operations with runs
      logs: operations with logs
      gateways: operations with gateways
class_docstr_tok: ["Low-level","API","client","for","interacting","with","dstack","server",".","Implements","all","API","endpoints","Attributes",":","users",":","operations","with","users","projects",":","operations","with","projects","backends",":","operations","with","backends","runs",":","operations","with","runs","logs",":","operations","with","logs","gateways",":","operations","with","gateways"]
docstr: Args:
      base_url: API endpoints prefix, e.g. `http://127.0.0.1:3000/`
      token: API token
docstr_tok: ["Args",":","base_url",":","API","endpoints","prefix",",","e.g",".","`","http",":","\/\/127.0.0.1:3000\/","`","token",":","API","token"]
code: def __init__(self, base_url: str, token: str):
      """
      Args:
          base_url: API endpoints prefix, e.g. `http://127.0.0.1:3000/`
          token: API token
      """
      self._base_url = base_url.rstrip("/")
      self._token = token
      self._s = requests.session()
      self._s.headers.update({"Authorization": f"Bearer {token}"})
      client_api_version = os.getenv(
          "DSTACK_CLIENT_API_VERSION", version.__version__
      )
      if client_api_version is not None:
          self._s.headers.update({"X-API-VERSION": client_api_version})
  
imports: import os
  import time
  from typing import Dict, List, Optional, Type
  import requests
  from dstack import version
  from dstack._internal.core.errors import ClientError, ServerClientError
  from dstack._internal.utils.logging import get_logger
  from dstack.api.server._backends import BackendsAPIClient
  from dstack.api.server._gateways import GatewaysAPIClient
  from dstack.api.server._logs import LogsAPIClient
  from dstack.api.server._projects import ProjectsAPIClient
  from dstack.api.server._repos import ReposAPIClient
  from dstack.api.server._runs import RunsAPIClient
  from dstack.api.server._secrets import SecretsAPIClient
  from dstack.api.server._users import UsersAPIClient
label_desc: Use image node_id 1 to create a new APIClient object  with example: obj = APIClient(base_url, token)