ai_api_client_sdk.ai_api_v2_client
index
/home/jenkins/agent/workspace/ndation_ai-api-client-sdk_master/ai_api_client_sdk/ai_api_v2_client.py

 
Classes
       
builtins.object
AIAPIV2Client

 
class AIAPIV2Client(builtins.object)
    AIAPIV2Client(base_url: str, auth_url: str = None, client_id: str = None, client_secret: str = None, cert_str: str = None, key_str: str = None, cert_file_path: str = None, key_file_path: str = None, token_creator: Callable[[], str] = None, resource_group: str = None, connect_timeout=60, num_request_retries=3, **kwargs)
 
The AIAPIV2Client is the class implemented to interact with the AI API server. The user can use its attributes
corresponding to the resources, for interacting with endpoints related to that resource. (i.e.,
aiapiv2client.scenario)
 
:param base_url: Base URL of the AI API server. Should include the base path as well. (i.e., "<base_url>/scenarios"
    should work)
:type base_url: str
:param auth_url: URL of the authorization endpoint. Should be the full URL (including /oauth/token), defaults to
    None
:type auth_url: str, optional
:param client_id: client id to be used for authorization, defaults to None
:type client_id: str, optional
:param client_secret: client secret to be used for authorization, defaults to None
:type client_secret: str, optional
:param cert_str: certificate file content, needs to be provided alongside the key_str parameter, defaults to None
:type cert_str: str, optional
:param key_str: key file content, needs to be provided alongside the cert_str parameter, defaults to None
:type key_str: str, optional
:param cert_file_path: path to the certificate file, needs to be provided alongside the key_file_path parameter,
    defaults to None
:type cert_file_path: str, optional
:param key_file_path: path to the key file, needs to be provided alongside the cert_file_path parameter,
    defaults to None
:type key_file_path: str, optional
:param token_creator: the function which returns the Bearer token, when called. Either this, or
    auth_url & client_id & client_secret should be specified, defaults to None
:type token_creator: Callable[[], str], optional
:param resource_group: The default resource group which will be used while sending the requests to the server. If
    not set, the resource_group should be specified with every request to the server, defaults to None
:type resource_group: str, optional
:param read_timeout: Read timeout for requests in seconds, defaults to 60s
:type read_timeout: int
:param connect_timeout: Connect timeout for requests in seconds, defaults to 60s
:type connect_timeout: int
:param num_request_retries: Number of retries for failing requests with http status code 429, 500, 502, 503 or 504,
    defaults to 60s
:type num_request_retries: int
:param client_type: Client type header to be sent in the request, defaults to 'AI API Python SDK'
:type client_type: str
 
  Methods defined here:
__init__(self, base_url: str, auth_url: str = None, client_id: str = None, client_secret: str = None, cert_str: str = None, key_str: str = None, cert_file_path: str = None, key_file_path: str = None, token_creator: Callable[[], str] = None, resource_group: str = None, connect_timeout=60, num_request_retries=3, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        AUTH_PARAM_ERROR_MESSAGE = '\nFor authorization please provide either one of ... & key_str\n c. cert_file_path & key_file_path\n'
Callable = typing.Callable