|
2 | 2 | # Copyright (c) 2021 Airbyte, Inc., all rights reserved.
|
3 | 3 | #
|
4 | 4 |
|
5 |
| -from .connector import AirbyteSpec, Connector |
6 |
| -from .entrypoint import AirbyteEntrypoint |
7 |
| -from .logger import AirbyteLogger |
8 | 5 | from importlib import metadata
|
9 | 6 |
|
10 |
| -__all__ = ["AirbyteEntrypoint", "AirbyteLogger", "AirbyteSpec", "Connector"] |
| 7 | +from .destinations import Destination |
| 8 | +from .models import AirbyteConnectionStatus, AirbyteMessage, ConfiguredAirbyteCatalog, Status, Type, FailureType, AirbyteStream, AdvancedAuth, DestinationSyncMode, ConnectorSpecification, OAuthConfigSpecification, OrchestratorType, ConfiguredAirbyteStream, SyncMode, AirbyteLogMessage, Level, AirbyteRecordMessage |
| 9 | + |
| 10 | +from .sources import Source |
| 11 | +from .config_observation import create_connector_config_control_message, emit_configuration_as_airbyte_control_message |
| 12 | +from .connector import BaseConnector, Connector |
| 13 | + |
| 14 | +from .entrypoint import launch, AirbyteEntrypoint |
| 15 | + |
| 16 | +from .logger import AirbyteLogFormatter, init_logger |
| 17 | +from .sources import AbstractSource |
| 18 | +from .sources.concurrent_source.concurrent_source import ConcurrentSource |
| 19 | +from .sources.concurrent_source.concurrent_source_adapter import ConcurrentSourceAdapter |
| 20 | +from .sources.config import BaseConfig |
| 21 | +from .sources.types import Config, Record, StreamSlice |
| 22 | +from .sources.connector_state_manager import ConnectorStateManager |
| 23 | +from .sources.declarative.auth import DeclarativeOauth2Authenticator |
| 24 | +from .sources.declarative.auth.declarative_authenticator import DeclarativeAuthenticator |
| 25 | +from .sources.declarative.auth.declarative_authenticator import NoAuth |
| 26 | +from .sources.declarative.auth.oauth import DeclarativeSingleUseRefreshTokenOauth2Authenticator |
| 27 | +from .sources.declarative.auth.token import BasicHttpAuthenticator, BearerAuthenticator, ApiKeyAuthenticator |
| 28 | +from .sources.declarative.datetime.min_max_datetime import MinMaxDatetime |
| 29 | +from .sources.declarative.declarative_stream import DeclarativeStream |
| 30 | +from .sources.declarative.decoders import Decoder, JsonDecoder |
| 31 | +from .sources.declarative.exceptions import ReadException |
| 32 | +from .sources.declarative.extractors import DpathExtractor, RecordSelector |
| 33 | +from .sources.declarative.extractors.record_extractor import RecordExtractor |
| 34 | +from .sources.declarative.extractors.record_filter import RecordFilter |
| 35 | +from .sources.declarative.incremental import DatetimeBasedCursor |
| 36 | +from .sources.declarative.interpolation import InterpolatedString, InterpolatedBoolean |
| 37 | +from .sources.declarative.manifest_declarative_source import ManifestDeclarativeSource |
| 38 | +from .sources.declarative.migrations.legacy_to_per_partition_state_migration import LegacyToPerPartitionStateMigration |
| 39 | + |
| 40 | +from .sources.declarative.partition_routers import SinglePartitionRouter, SubstreamPartitionRouter |
| 41 | +from .sources.declarative.partition_routers.substream_partition_router import ParentStreamConfig |
| 42 | +from .sources.declarative.requesters import Requester, HttpRequester |
| 43 | + |
| 44 | +from .sources.declarative.requesters.error_handlers import BackoffStrategy |
| 45 | +from .sources.declarative.requesters.error_handlers.response_status import ResponseStatus |
| 46 | +from .sources.declarative.requesters.paginators import DefaultPaginator, PaginationStrategy |
| 47 | +from .sources.declarative.requesters.paginators.strategies import OffsetIncrement, CursorPaginationStrategy, PageIncrement, StopConditionPaginationStrategyDecorator |
| 48 | + |
| 49 | +from .sources.declarative.requesters.request_option import RequestOption, RequestOptionType |
| 50 | + |
| 51 | +from .sources.declarative.requesters.request_options.interpolated_request_input_provider import InterpolatedRequestInputProvider |
| 52 | +from .sources.declarative.requesters.requester import HttpMethod |
| 53 | +from .sources.declarative.retrievers import SimpleRetriever |
| 54 | +from .sources.declarative.schema import JsonFileSchemaLoader |
| 55 | +from .sources.declarative.stream_slicers import CartesianProductStreamSlicer |
| 56 | +from .sources.declarative.transformations.add_fields import AddFields, AddedFieldDefinition |
| 57 | +from .sources.declarative.transformations.transformation import RecordTransformation |
| 58 | +from .sources.declarative.types import FieldPointer |
| 59 | +from .sources.declarative.yaml_declarative_source import YamlDeclarativeSource |
| 60 | +from .sources.message import InMemoryMessageRepository, MessageRepository |
| 61 | +from .sources.source import TState |
| 62 | +from .sources.streams.availability_strategy import AvailabilityStrategy |
| 63 | +from .sources.streams.call_rate import AbstractAPIBudget, HttpAPIBudget, HttpRequestMatcher, MovingWindowCallRatePolicy, Rate, CachedLimiterSession, LimiterSession |
| 64 | +from .sources.streams.concurrent.adapters import StreamFacade |
| 65 | +from .sources.streams.concurrent.cursor import ConcurrentCursor, CursorField, FinalStateCursor |
| 66 | +from .sources.streams.concurrent.cursor import Cursor |
| 67 | +from .sources.streams.concurrent.state_converters.datetime_stream_state_converter import EpochValueConcurrentStreamStateConverter, IsoMillisConcurrentStreamStateConverter |
| 68 | +from .sources.streams.core import Stream, IncrementalMixin, package_name_from_class |
| 69 | +from .sources.streams.http import HttpStream, HttpSubStream |
| 70 | +from .sources.streams.http.availability_strategy import HttpAvailabilityStrategy |
| 71 | +from .sources.streams.http.exceptions import BaseBackoffException, DefaultBackoffException, UserDefinedBackoffException |
| 72 | +from .sources.streams.http.rate_limiting import default_backoff_handler |
| 73 | +from .sources.streams.http.requests_native_auth import Oauth2Authenticator, TokenAuthenticator, SingleUseRefreshTokenOauth2Authenticator |
| 74 | +from .sources.streams.http.requests_native_auth.abstract_token import AbstractHeaderAuthenticator |
| 75 | +from .sources.utils import casing |
| 76 | +from .sources.utils.schema_helpers import InternalConfig, ResourceSchemaLoader, check_config_against_spec_or_exit, split_config, expand_refs |
| 77 | +from .sources.utils.transform import TransformConfig, TypeTransformer |
| 78 | +from .utils import AirbyteTracedException, is_cloud_environment |
| 79 | +from .utils.constants import ENV_REQUEST_CACHE_PATH |
| 80 | +from .utils.event_timing import create_timer |
| 81 | +from .utils.oneof_option_config import OneOfOptionConfig |
| 82 | +from .utils.spec_schema_transformations import resolve_refs |
| 83 | +from .utils.stream_status_utils import as_airbyte_message |
| 84 | + |
| 85 | + |
| 86 | +__all__ = [ |
| 87 | + # Availability strategy |
| 88 | + "AvailabilityStrategy", |
| 89 | + "HttpAvailabilityStrategy", |
| 90 | + |
| 91 | + # Concurrent |
| 92 | + "ConcurrentCursor", |
| 93 | + "ConcurrentSource", |
| 94 | + "ConcurrentSourceAdapter", |
| 95 | + "Cursor", |
| 96 | + "CursorField", |
| 97 | + "DEFAULT_CONCURRENCY", |
| 98 | + "EpochValueConcurrentStreamStateConverter", |
| 99 | + "FinalStateCursor", |
| 100 | + "IsoMillisConcurrentStreamStateConverter", |
| 101 | + "StreamFacade", |
| 102 | + |
| 103 | + # Config observation |
| 104 | + "create_connector_config_control_message", |
| 105 | + "emit_configuration_as_airbyte_control_message", |
| 106 | + |
| 107 | + # Connector |
| 108 | + "AbstractSource", |
| 109 | + "BaseConfig", |
| 110 | + "BaseConnector", |
| 111 | + "Connector", |
| 112 | + "Destination", |
| 113 | + "Source", |
| 114 | + "TState", |
| 115 | + |
| 116 | + # Declarative |
| 117 | + "AddFields", |
| 118 | + "AddedFieldDefinition", |
| 119 | + "ApiKeyAuthenticator", |
| 120 | + "BackoffStrategy", |
| 121 | + "BasicHttpAuthenticator", |
| 122 | + "BearerAuthenticator", |
| 123 | + "CartesianProductStreamSlicer", |
| 124 | + "CursorPaginationStrategy", |
| 125 | + "DatetimeBasedCursor" |
| 126 | + "DeclarativeAuthenticator", |
| 127 | + "DeclarativeOauth2Authenticator", |
| 128 | + "DeclarativeSingleUseRefreshTokenOauth2Authenticator", |
| 129 | + "DeclarativeStream", |
| 130 | + "Decoder", |
| 131 | + "DefaultPaginator", |
| 132 | + "DpathExtractor", |
| 133 | + "FieldPointer", |
| 134 | + "HttpMethod", |
| 135 | + "HttpRequester", |
| 136 | + "InterpolatedBoolean", |
| 137 | + "InterpolatedRequestInputProvider", |
| 138 | + "InterpolatedString", |
| 139 | + "JsonDecoder", |
| 140 | + "JsonFileSchemaLoader", |
| 141 | + "LegacyToPerPartitionStateMigration", |
| 142 | + "ManifestDeclarativeSource", |
| 143 | + "MinMaxDatetime", |
| 144 | + "NoAuth", |
| 145 | + "OffsetIncrement", |
| 146 | + "PageIncrement", |
| 147 | + "PaginationStrategy", |
| 148 | + "ParentStreamConfig", |
| 149 | + "ReadException", |
| 150 | + "RecordExtractor", |
| 151 | + "RecordFilter", |
| 152 | + "RecordSelector", |
| 153 | + "RecordTransformation", |
| 154 | + "RequestOption", |
| 155 | + "RequestOptionType", |
| 156 | + "Requester", |
| 157 | + "ResponseStatus", |
| 158 | + "SimpleRetriever", |
| 159 | + "SinglePartitionRouter", |
| 160 | + "StopConditionPaginationStrategyDecorator", |
| 161 | + "StreamSlice", |
| 162 | + "SubstreamPartitionRouter", |
| 163 | + "YamlDeclarativeSource", |
| 164 | + |
| 165 | + # Entrypoint |
| 166 | + "launch", |
| 167 | + "AirbyteEntrypoint", |
| 168 | + |
| 169 | + # HTTP |
| 170 | + "AbstractAPIBudget", |
| 171 | + "AbstractHeaderAuthenticator", |
| 172 | + "BaseBackoffException", |
| 173 | + "CachedLimiterSession", |
| 174 | + "DefaultBackoffException", |
| 175 | + "default_backoff_handler", |
| 176 | + "HttpAPIBudget", |
| 177 | + "HttpAuthenticator", |
| 178 | + "HttpRequestMatcher", |
| 179 | + "HttpStream", |
| 180 | + "HttpSubStream", |
| 181 | + "LimiterSession", |
| 182 | + "MovingWindowCallRatePolicy", |
| 183 | + "MultipleTokenAuthenticator" |
| 184 | + "Oauth2Authenticator", |
| 185 | + "Rate", |
| 186 | + "SingleUseRefreshTokenOauth2Authenticator", |
| 187 | + "TokenAuthenticator", |
| 188 | + "UserDefinedBackoffException", |
| 189 | + |
| 190 | + # Logger |
| 191 | + "AirbyteLogFormatter", |
| 192 | + "init_logger", |
| 193 | + |
| 194 | + # Protocol classes |
| 195 | + "AirbyteStream", |
| 196 | + "AirbyteConnectionStatus", "AirbyteMessage", "ConfiguredAirbyteCatalog", "Status", "Type", |
| 197 | + "OrchestratorType", |
| 198 | + "ConfiguredAirbyteStream", |
| 199 | + "DestinationSyncMode", |
| 200 | + "SyncMode", |
| 201 | + "FailureType", |
| 202 | + "AdvancedAuth", |
| 203 | + "AirbyteLogMessage", |
| 204 | + "OAuthConfigSpecification", |
| 205 | + "ConnectorSpecification", |
| 206 | + "Level", |
| 207 | + "AirbyteRecordMessage", |
| 208 | + |
| 209 | + # Repository |
| 210 | + "InMemoryMessageRepository", |
| 211 | + "MessageRepository", |
| 212 | + |
| 213 | + # State management |
| 214 | + "ConnectorStateManager", |
| 215 | + |
| 216 | + # Stream |
| 217 | + "IncrementalMixin", |
| 218 | + "Stream", |
| 219 | + "StreamData", |
| 220 | + "package_name_from_class", |
| 221 | + |
| 222 | + # Utils |
| 223 | + "AirbyteTracedException", |
| 224 | + "is_cloud_environment", |
| 225 | + "casing", |
| 226 | + "InternalConfig", |
| 227 | + "ResourceSchemaLoader", |
| 228 | + "check_config_against_spec_or_exit", |
| 229 | + "split_config", |
| 230 | + "TransformConfig", |
| 231 | + "TypeTransformer", |
| 232 | + "ENV_REQUEST_CACHE_PATH", |
| 233 | + "create_timer", |
| 234 | + "OneOfOptionConfig", |
| 235 | + "resolve_refs", |
| 236 | + "as_airbyte_message", |
| 237 | + |
| 238 | + # Types |
| 239 | + "Config", |
| 240 | + "Record", |
| 241 | + "Source", |
| 242 | + "StreamSlice", |
| 243 | +] |
11 | 244 | __version__ = metadata.version("airbyte_cdk")
|
0 commit comments