arthurai.client.http.arthur.ArthurHTTPClient#

class arthurai.client.http.arthur.ArthurHTTPClient(access_key=None, url=None, base_path=None, thread_workers=10, verify_ssl=True, offline=False)#

Bases: arthurai.client.http.base.AbstractHTTPClient

An HTTPClient that uses Arthur-specific parameters

Deprecated since version 3.13.1.

Methods

async_call

Starts a new process asynchronously

delete

Sends a DELETE request to the given url with the given headers

get

Sends a GET request to the given url with the given headers :param retries: Number of times to retry the request if it results in a 400 or higher response code :param return_raw_response: If true do not filter response, return raw object :param url: url to send request to :param headers: headers to use in the request :return: response of the rest call

patch

Sends a PATCH request to the given url with the given headers

post

Sends a POST request to the given url with the given headers

put

Sends a PUT request to the given url with the given headers :param return_raw_response: If true do not filter response, return raw object :param url: url to send request to :param headers: headers to use in the request :param retries: Number of times to retry the request if it results in a 400 or higher response code :return: response of the rest call

send

Sends the specified data with headers to the given url with the given request type

static async_call(rest_call, pool, *args, callback=None)#

Starts a new process asynchronously

Parameters
  • rest_call – a pointer to the rest call which should be executed async

  • pool – python process pool to take processes from

  • callback – function which will get called given the response of the child thread

Returns

returns a python AsyncResult object

delete(url, headers=None, return_raw_response=False, retries=0)#

Sends a DELETE request to the given url with the given headers

Parameters
  • return_raw_response – If true do not filter response, return raw object

  • url – url to send request to

  • headers – headers to use in the request

  • retries – Number of times to retry the request if it results in a 400 or higher response code

Returns

response of the rest call

get(url, headers=None, params=None, return_raw_response=False, retries=0)#

Sends a GET request to the given url with the given headers :param retries: Number of times to retry the request if it results in a 400 or higher response code :param return_raw_response: If true do not filter response, return raw object :param url: url to send request to :param headers: headers to use in the request :return: response of the rest call

patch(url, json=None, files=None, headers=None, return_raw_response=False, retries=0)#

Sends a PATCH request to the given url with the given headers

Parameters
  • return_raw_response – If true do not filter response, return raw object

  • url – url to send request to

  • headers – headers to use in the request

  • retries – Number of times to retry the request if it results in a 400 or higher response code

Returns

response of the rest call

post(url, json=None, files=None, headers=None, return_raw_response=False, retries=0)#

Sends a POST request to the given url with the given headers

Parameters
  • return_raw_response – If true do not filter response, return raw object

  • url – url to send request to

  • headers – headers to use in the request

  • retries – Number of times to retry the request if it results in a 400 or higher response code

Returns

response of the rest call

put(url, json=None, files=None, headers=None, return_raw_response=False, retries=0)#

Sends a PUT request to the given url with the given headers :param return_raw_response: If true do not filter response, return raw object :param url: url to send request to :param headers: headers to use in the request :param retries: Number of times to retry the request if it results in a 400 or higher response code :return: response of the rest call

send(url, method='GET', json=None, files=None, params=None, headers=None, return_raw_response=False, retries=0)#

Sends the specified data with headers to the given url with the given request type

Parameters
  • retries – Number of times to retry the request if it results in a 400 or higher response code

  • return_raw_response – If true do not filter request response, return raw object

  • url – url to send data to

  • method – REST call type, POST, GET, PUT, DELETE

  • json – the data to send

  • headers – headers to use in the REST call

Returns

response of the REST call