Submodules
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy module
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy.ConstantBackoffStrategy(backoff_time_in_seconds: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any])
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Backoff strategy with a constant backoff interval
- backoff_time_in_seconds
time to backoff before retrying a retryable request.
- Type
float
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- backoff_time_in_seconds: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- config: Mapping[str, Any]
- parameters: dataclasses.InitVar[Mapping[str, Any]]
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy module
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy.ExponentialBackoffStrategy(parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], factor: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str] = 5)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Backoff strategy with an exponential backoff interval
- factor
multiplicative factor
- Type
float
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- factor: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str] = 5
- parameters: dataclasses.InitVar[Mapping[str, Any]]
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.header_helper module
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.header_helper.get_numeric_value_from_header(response: requests.models.Response, header: str, regex: Optional[re.Pattern]) Optional[float]
Extract a header value from the response as a float :param response: response the extract header value from :param header: Header to extract :param regex: optional regex to apply on the header to obtain the value :return: header value as float if it’s a number. None otherwise
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_time_from_header_backoff_strategy module
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_time_from_header_backoff_strategy.WaitTimeFromHeaderBackoffStrategy(header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], regex: Optional[str] = None)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Extract wait time from http header
- header
header to read wait time from
- Type
str
- regex
optional regex to apply on the header to extract its value
- Type
Optional[str]
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- regex: Optional[str] = None
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_until_time_from_header_backoff_strategy module
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_until_time_from_header_backoff_strategy.WaitUntilTimeFromHeaderBackoffStrategy(header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], min_wait: Optional[Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None, regex: Optional[Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Extract time at which we can retry the request from response header and wait for the difference between now and that time
- header
header to read wait time from
- Type
str
- min_wait
minimum time to wait for safety
- Type
Optional[float]
- regex
optional regex to apply on the header to extract its value
- Type
Optional[str]
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- min_wait: Optional[Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- regex: Optional[Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None
Module contents
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.ConstantBackoffStrategy(backoff_time_in_seconds: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any])
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Backoff strategy with a constant backoff interval
- backoff_time_in_seconds
time to backoff before retrying a retryable request.
- Type
float
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- backoff_time_in_seconds: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- config: Mapping[str, Any]
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.ExponentialBackoffStrategy(parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], factor: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str] = 5)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Backoff strategy with an exponential backoff interval
- factor
multiplicative factor
- Type
float
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- factor: Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str] = 5
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.WaitTimeFromHeaderBackoffStrategy(header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], regex: Optional[str] = None)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Extract wait time from http header
- header
header to read wait time from
- Type
str
- regex
optional regex to apply on the header to extract its value
- Type
Optional[str]
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- regex: Optional[str] = None
- class airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.WaitUntilTimeFromHeaderBackoffStrategy(header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str], parameters: dataclasses.InitVar[Mapping[str, Any]], config: Mapping[str, Any], min_wait: Optional[Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None, regex: Optional[Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None)
Bases:
airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy.BackoffStrategy
Extract time at which we can retry the request from response header and wait for the difference between now and that time
- header
header to read wait time from
- Type
str
- min_wait
minimum time to wait for safety
- Type
Optional[float]
- regex
optional regex to apply on the header to extract its value
- Type
Optional[str]
- backoff(response: requests.models.Response, attempt_count: int) Optional[float]
Return time to wait before retrying the request. :param response: response received for the request to retry :param attempt_count: number of attempts to submit the request :return: time to wait in seconds
- config: Mapping[str, Any]
- header: Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]
- min_wait: Optional[Union[float, airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None
- parameters: dataclasses.InitVar[Mapping[str, Any]]
- regex: Optional[Union[airbyte_cdk.sources.declarative.interpolation.interpolated_string.InterpolatedString, str]] = None