Subpackages
- Subpackages
- Submodules
- airbyte_cdk.sources.declarative.auth.oauth module
- airbyte_cdk.sources.declarative.auth.token module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.checks.check_stream module
- airbyte_cdk.sources.declarative.checks.connection_checker module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.datetime.datetime_parser module
- airbyte_cdk.sources.declarative.datetime.min_max_datetime module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.decoders.decoder module
- airbyte_cdk.sources.declarative.decoders.json_decoder module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.extractors.dpath_extractor module
- airbyte_cdk.sources.declarative.extractors.http_selector module
- airbyte_cdk.sources.declarative.extractors.record_extractor module
- airbyte_cdk.sources.declarative.extractors.record_filter module
- airbyte_cdk.sources.declarative.extractors.record_selector module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.interpolation.interpolated_boolean module
- airbyte_cdk.sources.declarative.interpolation.interpolated_mapping module
- airbyte_cdk.sources.declarative.interpolation.interpolated_string module
- airbyte_cdk.sources.declarative.interpolation.interpolation module
- airbyte_cdk.sources.declarative.interpolation.jinja module
- airbyte_cdk.sources.declarative.interpolation.macros module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.parsers.class_types_registry module
- airbyte_cdk.sources.declarative.parsers.config_parser module
- airbyte_cdk.sources.declarative.parsers.default_implementation_registry module
- airbyte_cdk.sources.declarative.parsers.factory module
- airbyte_cdk.sources.declarative.parsers.undefined_reference_exception module
- airbyte_cdk.sources.declarative.parsers.yaml_parser module
- Module contents
- Subpackages
- Subpackages
- Submodules
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.constant_backoff_strategy module
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.exponential_backoff_strategy module
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.header_helper module
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_time_from_header_backoff_strategy module
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategies.wait_until_time_from_header_backoff_strategy module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.requesters.error_handlers.backoff_strategy module
- airbyte_cdk.sources.declarative.requesters.error_handlers.composite_error_handler module
- airbyte_cdk.sources.declarative.requesters.error_handlers.default_error_handler module
- airbyte_cdk.sources.declarative.requesters.error_handlers.error_handler module
- airbyte_cdk.sources.declarative.requesters.error_handlers.http_response_filter module
- airbyte_cdk.sources.declarative.requesters.error_handlers.response_action module
- airbyte_cdk.sources.declarative.requesters.error_handlers.response_status module
- Module contents
- Subpackages
- Submodules
- airbyte_cdk.sources.declarative.requesters.paginators.strategies.cursor_pagination_strategy module
- airbyte_cdk.sources.declarative.requesters.paginators.strategies.offset_increment module
- airbyte_cdk.sources.declarative.requesters.paginators.strategies.page_increment module
- airbyte_cdk.sources.declarative.requesters.paginators.strategies.pagination_strategy module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.requesters.paginators.limit_paginator module
- airbyte_cdk.sources.declarative.requesters.paginators.no_pagination module
- airbyte_cdk.sources.declarative.requesters.paginators.paginator module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_input_provider module
- airbyte_cdk.sources.declarative.requesters.request_options.interpolated_request_options_provider module
- airbyte_cdk.sources.declarative.requesters.request_options.request_options_provider module
- Module contents
- Subpackages
- Submodules
- airbyte_cdk.sources.declarative.requesters.http_requester module
- airbyte_cdk.sources.declarative.requesters.request_option module
- airbyte_cdk.sources.declarative.requesters.requester module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.retrievers.retriever module
- airbyte_cdk.sources.declarative.retrievers.simple_retriever module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.schema.json_schema module
- airbyte_cdk.sources.declarative.schema.schema_loader module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.stream_slicers.cartesian_product_stream_slicer module
- airbyte_cdk.sources.declarative.stream_slicers.datetime_stream_slicer module
- airbyte_cdk.sources.declarative.stream_slicers.list_stream_slicer module
- airbyte_cdk.sources.declarative.stream_slicers.single_slice module
- airbyte_cdk.sources.declarative.stream_slicers.stream_slicer module
- airbyte_cdk.sources.declarative.stream_slicers.substream_slicer module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.transformations.add_fields module
- airbyte_cdk.sources.declarative.transformations.remove_fields module
- airbyte_cdk.sources.declarative.transformations.transformation module
- Module contents
- Submodules
- airbyte_cdk.sources.declarative.create_partial module
- airbyte_cdk.sources.declarative.declarative_source module
- airbyte_cdk.sources.declarative.declarative_stream module
- airbyte_cdk.sources.declarative.exceptions module
- airbyte_cdk.sources.declarative.types module
- airbyte_cdk.sources.declarative.yaml_declarative_source module
- Module contents
- Submodules
- airbyte_cdk.sources.deprecated.base_source module
- airbyte_cdk.sources.deprecated.client module
- Module contents
- Submodules
- airbyte_cdk.sources.singer.singer_helpers module
- airbyte_cdk.sources.singer.source module
- Module contents
- Subpackages
- Subpackages
- Submodules
- airbyte_cdk.sources.streams.http.auth.core module
- airbyte_cdk.sources.streams.http.auth.oauth module
- airbyte_cdk.sources.streams.http.auth.token module
- Module contents
- Submodules
- airbyte_cdk.sources.streams.http.requests_native_auth.abstract_oauth module
- airbyte_cdk.sources.streams.http.requests_native_auth.abstract_token module
- airbyte_cdk.sources.streams.http.requests_native_auth.oauth module
- airbyte_cdk.sources.streams.http.requests_native_auth.token module
- Module contents
- Submodules
- airbyte_cdk.sources.streams.http.exceptions module
- airbyte_cdk.sources.streams.http.http module
- airbyte_cdk.sources.streams.http.rate_limiting module
- Module contents
- Subpackages
- Submodules
- airbyte_cdk.sources.streams.core module
- Module contents
- Submodules
- airbyte_cdk.sources.utils.casing module
- airbyte_cdk.sources.utils.catalog_helpers module
- airbyte_cdk.sources.utils.schema_helpers module
- airbyte_cdk.sources.utils.schema_models module
- airbyte_cdk.sources.utils.transform module
- Module contents
Submodules
airbyte_cdk.sources.abstract_source module
- class airbyte_cdk.sources.abstract_source.AbstractSource
Bases:
airbyte_cdk.sources.source.Source
,abc.ABC
Abstract base class for an Airbyte Source. Consumers should implement any abstract methods in this class to create an Airbyte Specification compliant Source.
- check(logger: logging.Logger, config: Mapping[str, Any]) airbyte_protocol.models.airbyte_protocol.AirbyteConnectionStatus
Implements the Check Connection operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#check.
- abstract check_connection(logger: logging.Logger, config: Mapping[str, Any]) Tuple[bool, Optional[Any]]
- Parameters
logger – source logger
config – The user-provided configuration as specified by the source’s spec. This usually contains information required to check connection e.g. tokens, secrets and keys etc.
- Returns
A tuple of (boolean, error). If boolean is true, then the connection check is successful and we can connect to the underlying data source using the provided configuration. Otherwise, the input config cannot be used to connect to the underlying data source, and the “error” object should describe what went wrong. The error object will be cast to string to display the problem to the user.
- discover(logger: logging.Logger, config: Mapping[str, Any]) airbyte_protocol.models.airbyte_protocol.AirbyteCatalog
Implements the Discover operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#discover.
- property message_repository: Union[None, airbyte_cdk.sources.message.repository.MessageRepository]
- property name: str
Source name
- property per_stream_state_enabled: bool
- property raise_exception_on_missing_stream: bool
- read(logger: logging.Logger, config: Mapping[str, Any], catalog: airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog, state: Optional[Union[List[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage], MutableMapping[str, Any]]] = None) Iterator[airbyte_protocol.models.airbyte_protocol.AirbyteMessage]
Implements the Read operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/.
- abstract streams(config: Mapping[str, Any]) List[airbyte_cdk.sources.streams.core.Stream]
- Parameters
config – The user-provided configuration as specified by the source’s spec.
Any stream construction related operation should happen here. :return: A list of the streams in this source connector.
airbyte_cdk.sources.config module
- class airbyte_cdk.sources.config.BaseConfig
Bases:
pydantic.main.BaseModel
Base class for connector spec, adds the following behaviour:
resolve $ref and replace it with definition
replace all occurrences of anyOf with oneOf
drop description
- classmethod schema(*args, **kwargs) Dict[str, Any]
We’re overriding the schema classmethod to enable some post-processing
airbyte_cdk.sources.source module
- class airbyte_cdk.sources.source.BaseSource
Bases:
airbyte_cdk.connector.BaseConnector
[airbyte_cdk.connector.TConfig
],abc.ABC
,Generic
[airbyte_cdk.connector.TConfig
,airbyte_cdk.sources.source.TState
,airbyte_cdk.sources.source.TCatalog
]- abstract discover(logger: logging.Logger, config: airbyte_cdk.connector.TConfig) airbyte_protocol.models.airbyte_protocol.AirbyteCatalog
Returns an AirbyteCatalog representing the available streams and fields in this integration. For example, given valid credentials to a Postgres database, returns an Airbyte catalog where each postgres table is a stream, and each table column is a field.
- abstract read(logger: logging.Logger, config: airbyte_cdk.connector.TConfig, catalog: airbyte_cdk.sources.source.TCatalog, state: Optional[airbyte_cdk.sources.source.TState] = None) Iterable[airbyte_protocol.models.airbyte_protocol.AirbyteMessage]
Returns a generator of the AirbyteMessages generated by reading the source with the given configuration, catalog, and state.
- abstract read_catalog(catalog_path: str) airbyte_cdk.sources.source.TCatalog
- abstract read_state(state_path: str) airbyte_cdk.sources.source.TState
- class airbyte_cdk.sources.source.Source
Bases:
airbyte_cdk.connector.DefaultConnectorMixin
,airbyte_cdk.sources.source.BaseSource
[Mapping
[str
,Any
],Union
[List
[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage
],MutableMapping
[str
,Any
]],airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog
],abc.ABC
- classmethod read_catalog(catalog_path: str) airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog
- read_state(state_path: str) Union[List[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage], MutableMapping[str, Any]]
Retrieves the input state of a sync by reading from the specified JSON file. Incoming state can be deserialized into either a JSON object for legacy state input or as a list of AirbyteStateMessages for the per-stream state format. Regardless of the incoming input type, it will always be transformed and output as a list of AirbyteStateMessage(s). :param state_path: The filepath to where the stream states are located :return: The complete stream state based on the connector’s previous sync
Module contents
- class airbyte_cdk.sources.AbstractSource
Bases:
airbyte_cdk.sources.source.Source
,abc.ABC
Abstract base class for an Airbyte Source. Consumers should implement any abstract methods in this class to create an Airbyte Specification compliant Source.
- check(logger: logging.Logger, config: Mapping[str, Any]) airbyte_protocol.models.airbyte_protocol.AirbyteConnectionStatus
Implements the Check Connection operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#check.
- abstract check_connection(logger: logging.Logger, config: Mapping[str, Any]) Tuple[bool, Optional[Any]]
- Parameters
logger – source logger
config – The user-provided configuration as specified by the source’s spec. This usually contains information required to check connection e.g. tokens, secrets and keys etc.
- Returns
A tuple of (boolean, error). If boolean is true, then the connection check is successful and we can connect to the underlying data source using the provided configuration. Otherwise, the input config cannot be used to connect to the underlying data source, and the “error” object should describe what went wrong. The error object will be cast to string to display the problem to the user.
- discover(logger: logging.Logger, config: Mapping[str, Any]) airbyte_protocol.models.airbyte_protocol.AirbyteCatalog
Implements the Discover operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/#discover.
- property message_repository: Union[None, airbyte_cdk.sources.message.repository.MessageRepository]
- property name: str
Source name
- property per_stream_state_enabled: bool
- property raise_exception_on_missing_stream: bool
- read(logger: logging.Logger, config: Mapping[str, Any], catalog: airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog, state: Optional[Union[List[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage], MutableMapping[str, Any]]] = None) Iterator[airbyte_protocol.models.airbyte_protocol.AirbyteMessage]
Implements the Read operation from the Airbyte Specification. See https://docs.airbyte.com/understanding-airbyte/airbyte-protocol/.
- abstract streams(config: Mapping[str, Any]) List[airbyte_cdk.sources.streams.core.Stream]
- Parameters
config – The user-provided configuration as specified by the source’s spec.
Any stream construction related operation should happen here. :return: A list of the streams in this source connector.
- class airbyte_cdk.sources.BaseConfig
Bases:
pydantic.main.BaseModel
Base class for connector spec, adds the following behaviour:
resolve $ref and replace it with definition
replace all occurrences of anyOf with oneOf
drop description
- classmethod schema(*args, **kwargs) Dict[str, Any]
We’re overriding the schema classmethod to enable some post-processing
- class airbyte_cdk.sources.Source
Bases:
airbyte_cdk.connector.DefaultConnectorMixin
,airbyte_cdk.sources.source.BaseSource
[Mapping
[str
,Any
],Union
[List
[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage
],MutableMapping
[str
,Any
]],airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog
],abc.ABC
- classmethod read_catalog(catalog_path: str) airbyte_protocol.models.airbyte_protocol.ConfiguredAirbyteCatalog
- read_state(state_path: str) Union[List[airbyte_protocol.models.airbyte_protocol.AirbyteStateMessage], MutableMapping[str, Any]]
Retrieves the input state of a sync by reading from the specified JSON file. Incoming state can be deserialized into either a JSON object for legacy state input or as a list of AirbyteStateMessages for the per-stream state format. Regardless of the incoming input type, it will always be transformed and output as a list of AirbyteStateMessage(s). :param state_path: The filepath to where the stream states are located :return: The complete stream state based on the connector’s previous sync