aito.client.requests.job_api_request.CreateJobRequest

class aito.client.requests.job_api_request.CreateJobRequest(endpoint: str, query: Dict)

Bases: _PostRequest, _PatternEndpoint, _JobAPIRequest

Request to create a job for an Aito API endpoint

Parameters:
  • endpoint (str) – the job endpoint

  • query (Dict) – the query

Methods

from_data_api_request(request_obj)

Create a job from a DataAPI request

from_query_api_request(request_obj)

Create a job from a QueryAPI request

make_request(method, endpoint, query)

factory method to return the appropriate request class instance after checking the input endpoint and method :param method: the method of the request :type method: str :param endpoint: the endpoint of the request :type endpoint: str :param query: an Aito query if applicable, optional :type query: Optional[Union[Dict, List]] :return: the appropriate request class intsnace :rtype: AitoRequest

Attributes

endpoint_prefix

method

path

result_response_cls

returns the response class of the job request result

classmethod from_data_api_request(request_obj: DataAPIRequest) CreateJobRequest

Create a job from a DataAPI request

Parameters:

request_obj (DataAPIRequest) – a DataAPIRequest instance

Returns:

the corresponding create job request

Return type:

CreateJobRequest

classmethod from_query_api_request(request_obj: QueryAPIRequest) CreateJobRequest

Create a job from a QueryAPI request

Parameters:

request_obj (QueryAPIRequest) – a QueryAPIRequest instance

Returns:

the corresponding create job request

Return type:

CreateJobRequest

classmethod make_request(method: str, endpoint: str, query: Dict | List | None) AitoRequest

factory method to return the appropriate request class instance after checking the input endpoint and method :param method: the method of the request :type method: str :param endpoint: the endpoint of the request :type endpoint: str :param query: an Aito query if applicable, optional :type query: Optional[Union[Dict, List]] :return: the appropriate request class intsnace :rtype: AitoRequest

response_cls

alias of CreateJobResponse

property result_response_cls: Type[BaseResponse]

returns the response class of the job request result