Skip to main content

module client

Python API REST wrapper and helpers

class RetryException

API Client retry exception

class APIError

Represent API related error. error.status_code will have http status code.

method __init__


property code

Return error code

property request

Handle requests error

property response

Handle response error :return:

property status_code

Return response status code Returns: int

class ClientConfig

Args: raw_data: should we return api response raw or wrap it with Entity objects.

class REST

REST client wrapper to manage requests with retries, auth and error handling.

method __init__


method close

Close requests session

method delete

DELETE method Parameters: path (str): data (): Returns: Response

method get

GET method Parameters: path (str): data (): Returns: Response

method patch

PATCH method Parameters: path (str): data (): Returns: Response

method post

POST method Parameters: path (str): data (): Returns: Response

method put

PUT method Parameters: path (str): data (): Returns: Response