Submodules

airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_input_provider module

class airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_input_provider.InterpolatedRequestInputProvider(parameters: dataclasses.InitVar[typing.Mapping[str, typing.Any]], request_inputs: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, config: typing.Mapping[str, typing.Any] = <factory>)

Bases: object

Helper class that generically performs string interpolation on the provided dictionary or string input

config: Mapping[str, Any]
eval_request_inputs(stream_state: Mapping[str, Any], stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None, valid_key_types: Optional[Tuple[Type[Any]]] = None, valid_value_types: Optional[Tuple[Type[Any]]] = None) Mapping[str, Any]

Returns the request inputs to set on an outgoing HTTP request

Parameters
  • stream_state – The stream state

  • stream_slice – The stream slice

  • next_page_token – The pagination token

  • valid_key_types – A tuple of types that the interpolator should allow

  • valid_value_types – A tuple of types that the interpolator should allow

Returns

The request inputs to set on an outgoing HTTP request

parameters: dataclasses.InitVar[Mapping[str, Any]]
request_inputs: Optional[Union[str, Mapping[str, str]]] = None

airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_options_provider module

class airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_options_provider.InterpolatedRequestOptionsProvider(parameters: dataclasses.InitVar[typing.Mapping[str, typing.Any]], config: typing.Mapping[str, typing.Any] = <factory>, request_parameters: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_headers: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_body_data: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_body_json: typing.Optional[typing.Union[dict[str, typing.Union[dict[str, 'NestedMapping'], list['NestedMapping'], str, int, float, bool, NoneType]], str]] = None)

Bases: airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider.RequestOptionsProvider

Defines the request options to set on an outgoing HTTP request by evaluating `InterpolatedMapping`s

config

The user-provided configuration as specified by the source’s spec

Type

Config

request_parameters

The request parameters to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_headers

The request headers to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_body_data

The body data to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_body_json

The json content to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

config: Mapping[str, Any]
get_request_body_data(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Union[Mapping, str]]

Specifies how to populate the body of the request with a non-JSON payload.

If returns a ready text that it will be sent as is. If returns a dict that it will be converted to a urlencoded form. E.g. {“key1”: “value1”, “key2”: “value2”} => “key1=value1&key2=value2”

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

get_request_body_json(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Mapping]

Specifies how to populate the body of the request with a JSON payload.

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

get_request_headers(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Mapping[str, Any]

Return any non-auth headers. Authentication headers will overwrite any overlapping headers returned from this method.

get_request_params(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) MutableMapping[str, Any]

Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.

E.g: you might want to define query parameters for paging if next_page_token is not None.

parameters: dataclasses.InitVar[Mapping[str, Any]]
request_body_data: Optional[Union[str, Mapping[str, str]]] = None
request_body_json: Optional[Union[dict[str, Union[dict[str, 'NestedMapping'], list['NestedMapping'], str, int, float, bool, NoneType]], str]] = None
request_headers: Optional[Union[str, Mapping[str, str]]] = None
request_parameters: Optional[Union[str, Mapping[str, str]]] = None

airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider module

class airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider.RequestOptionsProvider

Bases: object

Defines the request options to set on an outgoing HTTP request

Options can be passed by - request parameter - request headers - body data - json content

abstract get_request_body_data(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Union[Mapping[str, Any], str]]

Specifies how to populate the body of the request with a non-JSON payload.

If returns a ready text that it will be sent as is. If returns a dict that it will be converted to a urlencoded form. E.g. {“key1”: “value1”, “key2”: “value2”} => “key1=value1&key2=value2”

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

abstract get_request_body_json(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Mapping[str, Any]]

Specifies how to populate the body of the request with a JSON payload.

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

abstract get_request_headers(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Mapping[str, Any]

Return any non-auth headers. Authentication headers will overwrite any overlapping headers returned from this method.

abstract get_request_params(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) MutableMapping[str, Any]

Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.

E.g: you might want to define query parameters for paging if next_page_token is not None.

Module contents

class airbyte_cdk.sources.declarative.requesters.request_options.InterpolatedRequestOptionsProvider(parameters: dataclasses.InitVar[typing.Mapping[str, typing.Any]], config: typing.Mapping[str, typing.Any] = <factory>, request_parameters: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_headers: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_body_data: typing.Optional[typing.Union[str, typing.Mapping[str, str]]] = None, request_body_json: typing.Optional[typing.Union[dict[str, typing.Union[dict[str, 'NestedMapping'], list['NestedMapping'], str, int, float, bool, NoneType]], str]] = None)

Bases: airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider.RequestOptionsProvider

Defines the request options to set on an outgoing HTTP request by evaluating `InterpolatedMapping`s

config

The user-provided configuration as specified by the source’s spec

Type

Config

request_parameters

The request parameters to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_headers

The request headers to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_body_data

The body data to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

request_body_json

The json content to set on an outgoing HTTP request

Type

Union[str, Mapping[str, str]]

config: Mapping[str, Any]
get_request_body_data(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Union[Mapping, str]]

Specifies how to populate the body of the request with a non-JSON payload.

If returns a ready text that it will be sent as is. If returns a dict that it will be converted to a urlencoded form. E.g. {“key1”: “value1”, “key2”: “value2”} => “key1=value1&key2=value2”

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

get_request_body_json(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Mapping]

Specifies how to populate the body of the request with a JSON payload.

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

get_request_headers(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Mapping[str, Any]

Return any non-auth headers. Authentication headers will overwrite any overlapping headers returned from this method.

get_request_params(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) MutableMapping[str, Any]

Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.

E.g: you might want to define query parameters for paging if next_page_token is not None.

parameters: dataclasses.InitVar[Mapping[str, Any]]
request_body_data: Optional[Union[str, Mapping[str, str]]] = None
request_body_json: Optional[Union[dict[str, Union[dict[str, 'NestedMapping'], list['NestedMapping'], str, int, float, bool, NoneType]], str]] = None
request_headers: Optional[Union[str, Mapping[str, str]]] = None
request_parameters: Optional[Union[str, Mapping[str, str]]] = None
class airbyte_cdk.sources.declarative.requesters.request_options.RequestOptionsProvider

Bases: object

Defines the request options to set on an outgoing HTTP request

Options can be passed by - request parameter - request headers - body data - json content

abstract get_request_body_data(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Union[Mapping[str, Any], str]]

Specifies how to populate the body of the request with a non-JSON payload.

If returns a ready text that it will be sent as is. If returns a dict that it will be converted to a urlencoded form. E.g. {“key1”: “value1”, “key2”: “value2”} => “key1=value1&key2=value2”

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

abstract get_request_body_json(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Optional[Mapping[str, Any]]

Specifies how to populate the body of the request with a JSON payload.

At the same time only one of the ‘request_body_data’ and ‘request_body_json’ functions can be overridden.

abstract get_request_headers(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) Mapping[str, Any]

Return any non-auth headers. Authentication headers will overwrite any overlapping headers returned from this method.

abstract get_request_params(*, stream_state: Optional[Mapping[str, Any]] = None, stream_slice: Optional[Mapping[str, Any]] = None, next_page_token: Optional[Mapping[str, Any]] = None) MutableMapping[str, Any]

Specifies the query parameters that should be set on an outgoing HTTP request given the inputs.

E.g: you might want to define query parameters for paging if next_page_token is not None.