--- title: "wallaroo.wallaroo_ml_ops_api_client" type: docs linkTitle: "wallaroo.wallaroo_ml_ops_api_client" ---

A client library for accessing Wallaroo MLOps API

@attr.s(auto_attribs=True)
class AuthenticatedClient(wallaroo.wallaroo_ml_ops_api_client.Client):

A Client which has been authenticated for use on secured endpoints

AuthenticatedClient( base_url: str, token: str, prefix: str = 'Bearer', auth_header_name: str = 'Authorization', *, cookies: Dict[str, str] = NOTHING, headers: Dict[str, str] = NOTHING, timeout: float = 5.0, verify_ssl: Union[str, bool, ssl.SSLContext] = True, raise_on_unexpected_status: bool = False, follow_redirects: bool = False)

Method generated by attrs for class AuthenticatedClient.

def get_headers(self) -> Dict[str, str]:

Get headers to be used in authenticated endpoints

##### Inherited Members

Client
  with_headers
  get_cookies
  with_cookies
  get_timeout
  with_timeout

@attr.s(auto_attribs=True)
class Client:

A class for keeping track of data related to the API

Attributes: base_url: The base URL for the API, all requests are made to a relative path to this URL cookies: A dictionary of cookies to be sent with every request headers: A dictionary of headers to be sent with every request timeout: The maximum amount of a time in seconds a request can take. API functions will raise httpx.TimeoutException if this is exceeded. verify_ssl: Whether or not to verify the SSL certificate of the API server. This should be True in production, but can be set to False for testing purposes. raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a status code that was not documented in the source OpenAPI document. follow_redirects: Whether or not to follow redirects. Default value is False.

Client( base_url: str, *, cookies: Dict[str, str] = NOTHING, headers: Dict[str, str] = NOTHING, timeout: float = 5.0, verify_ssl: Union[str, bool, ssl.SSLContext] = True, raise_on_unexpected_status: bool = False, follow_redirects: bool = False)

Method generated by attrs for class Client.

def get_headers(self) -> Dict[str, str]:

Get headers to be used in all endpoints

def with_headers( self, headers: Dict[str, str]) -> wallaroo.wallaroo_ml_ops_api_client.Client:

Get a new client matching this one with additional headers

def get_cookies(self) -> Dict[str, str]:
def with_cookies( self, cookies: Dict[str, str]) -> wallaroo.wallaroo_ml_ops_api_client.Client:

Get a new client matching this one with additional cookies

def get_timeout(self) -> float:
def with_timeout( self, timeout: float) -> wallaroo.wallaroo_ml_ops_api_client.Client:

Get a new client matching this one with a new timeout (in seconds)