relevanceai.transport

The Transport Class defines a transport as used by the Channel class to communicate with the network.

Module Contents

Classes

Transport

Base class for all relevanceai objects

Attributes

DO_NOT_REPEAT_STATUS_CODES

relevanceai.transport.DO_NOT_REPEAT_STATUS_CODES
class relevanceai.transport.Transport

Base class for all relevanceai objects

project :str
api_key :str
config :relevanceai.config.Config
logger :relevanceai.logger.AbstractLogger
property _dashboard_request_url(self)
property auth_header(self)
property _search_dashboard_url(self)
static _is_search_in_path(url: str)
property DASHBOARD_TYPES(self)
_log_to_dashboard(self, method: str, parameters: dict, endpoint: str, dashboard_type: str, verbose: bool = True)

Log search to dashboard

Link to a monitoring dashboard Suburl must be one of - “monitor” - “lookups” - “monitor/schema”

_log_search_to_dashboard(self, method: str, parameters: dict, endpoint: str)

Log search to dashboard

print_dashboard_url(self, dashboard_url)
make_http_request(self, endpoint: str, method: str = 'GET', parameters: dict = {}, base_url: str = None, output_format=None)

Make the HTTP request :param endpoint: The endpoint from the documentation to use :type endpoint: string :param method_type: POST or GET request :type method_type: string

_log_response_success(self, base_url, endpoint)
_log_response_time(self, base_url, endpoint, time)
_log_response_fail(self, base_url, endpoint, status_code, content)
_log_connection_error(self, base_url, endpoint)
_log_no_json(self, base_url, endpoint, status_code, content)