leaf_engine.io.api.base_caller ============================== .. py:module:: leaf_engine.io.api.base_caller Attributes ---------- .. autoapisummary:: leaf_engine.io.api.base_caller.BACKOFF leaf_engine.io.api.base_caller.DEFAULT_PAGE_SIZE leaf_engine.io.api.base_caller.RETRIES leaf_engine.io.api.base_caller.TIMEOUT Classes ------- .. autoapisummary:: leaf_engine.io.api.base_caller.LeafBaseAPICaller leaf_engine.io.api.base_caller.TimeoutHTTPAdapter Module Contents --------------- .. py:class:: LeafBaseAPICaller(endpoint: Optional[str], key: Optional[str], backoff: int = BACKOFF, page_size: int = DEFAULT_PAGE_SIZE, retries: int = RETRIES, timeout: int = TIMEOUT) Abstract API caller class. .. py:attribute:: endpoint .. py:attribute:: key .. py:attribute:: page_size .. py:attribute:: retry_config .. py:attribute:: session .. py:attribute:: timeout .. py:class:: TimeoutHTTPAdapter(*args, **kwargs) Bases: :py:obj:`requests.adapters.HTTPAdapter` HTTPAdapter with configurable timeout on all request types. .. py:method:: send(*args, **kwargs) Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest ` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) ` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response .. py:attribute:: timeout :type: int .. py:data:: BACKOFF :value: 1 .. py:data:: DEFAULT_PAGE_SIZE :value: 100 .. py:data:: RETRIES :value: 3 .. py:data:: TIMEOUT :value: 500