|
1 | | -# |
2 | 1 | # Copyright (c) 2021 Airbyte, Inc., all rights reserved. |
3 | | -# |
| 2 | +""" |
| 3 | +# Welcome to the Airbyte Python CDK! |
4 | 4 |
|
| 5 | +The Airbyte Python CDK is a Python library that provides a set of tools to help you build |
| 6 | +connectors for the Airbyte platform. |
| 7 | +
|
| 8 | +## Building Source Connectors |
| 9 | +
|
| 10 | +To build a source connector, you will want to refer to |
| 11 | +the following classes and modules: |
| 12 | +
|
| 13 | +- `airbyte_cdk.sources` |
| 14 | +- `airbyte_cdk.sources.concurrent_source` |
| 15 | +- `airbyte_cdk.sources.config` |
| 16 | +- `airbyte_cdk.sources.file_based` |
| 17 | +- `airbyte_cdk.sources.streams` |
| 18 | +
|
| 19 | +## Building Destination Connectors |
| 20 | +
|
| 21 | +To build a destination connector, you will want to refer to |
| 22 | +the following classes and modules: |
| 23 | +
|
| 24 | +- `airbyte_cdk.destinations` |
| 25 | +- `airbyte_cdk.destinations.Destination` |
| 26 | +- `airbyte_cdk.destinations.vector_db_based` |
| 27 | +
|
| 28 | +## Working with Airbyte Protocol Models |
| 29 | +
|
| 30 | +The Airbyte CDK provides a set of classes that help you work with the Airbyte protocol models: |
| 31 | +
|
| 32 | +- `airbyte_cdk.models.airbyte_protocol` |
| 33 | +- `airbyte_cdk.models.airbyte_protocol_serializers` |
| 34 | +
|
| 35 | +--- |
| 36 | +
|
| 37 | +API Reference |
| 38 | +
|
| 39 | +--- |
| 40 | +
|
| 41 | +""" |
| 42 | + |
| 43 | +# Warning: The below imports are not stable and will cause circular |
| 44 | +# dependencies if auto-sorted with isort. Please keep them in the same order. |
| 45 | +# TODO: Submodules should import from lower-level modules, rather than importing from here. |
| 46 | +# Imports should also be placed in `if TYPE_CHECKING` blocks if they are only used as type |
| 47 | +# hints - again, to avoid circular dependencies. |
| 48 | +# Once those issues are resolved, the below can be sorted with isort. |
5 | 49 | from importlib import metadata |
6 | 50 |
|
7 | 51 | from .destinations import Destination |
|
88 | 132 | # Availability strategy |
89 | 133 | "AvailabilityStrategy", |
90 | 134 | "HttpAvailabilityStrategy", |
91 | | - |
92 | 135 | # Checkpoint |
93 | 136 | "LegacyCursor", |
94 | 137 | "ResumableFullRefreshCursor", |
95 | | - |
96 | 138 | # Concurrent |
97 | 139 | "ConcurrentCursor", |
98 | 140 | "ConcurrentSource", |
|
104 | 146 | "FinalStateCursor", |
105 | 147 | "IsoMillisConcurrentStreamStateConverter", |
106 | 148 | "StreamFacade", |
107 | | - |
108 | 149 | # Config observation |
109 | 150 | "create_connector_config_control_message", |
110 | 151 | "emit_configuration_as_airbyte_control_message", |
111 | | - |
112 | 152 | # Connector |
113 | 153 | "AbstractSource", |
114 | 154 | "BaseConfig", |
|
117 | 157 | "Destination", |
118 | 158 | "Source", |
119 | 159 | "TState", |
120 | | - |
121 | 160 | # Declarative |
122 | 161 | "AddFields", |
123 | 162 | "AddedFieldDefinition", |
|
167 | 206 | "StreamSlice", |
168 | 207 | "SubstreamPartitionRouter", |
169 | 208 | "YamlDeclarativeSource", |
170 | | - |
171 | 209 | # Entrypoint |
172 | 210 | "launch", |
173 | 211 | "AirbyteEntrypoint", |
174 | | - |
175 | 212 | # HTTP |
176 | 213 | "AbstractAPIBudget", |
177 | 214 | "AbstractHeaderAuthenticator", |
|
192 | 229 | "SingleUseRefreshTokenOauth2Authenticator", |
193 | 230 | "TokenAuthenticator", |
194 | 231 | "UserDefinedBackoffException", |
195 | | - |
196 | 232 | # Logger |
197 | 233 | "AirbyteLogFormatter", |
198 | 234 | "init_logger", |
199 | | - |
200 | 235 | # Protocol classes |
201 | 236 | "AirbyteStream", |
202 | 237 | "AirbyteConnectionStatus", |
|
215 | 250 | "ConnectorSpecification", |
216 | 251 | "Level", |
217 | 252 | "AirbyteRecordMessage", |
218 | | - |
219 | 253 | # Repository |
220 | 254 | "InMemoryMessageRepository", |
221 | 255 | "MessageRepository", |
222 | | - |
223 | 256 | # State management |
224 | 257 | "ConnectorStateManager", |
225 | | - |
226 | 258 | # Stream |
227 | 259 | "IncrementalMixin", |
228 | 260 | "Stream", |
229 | 261 | "StreamData", |
230 | 262 | "package_name_from_class", |
231 | | - |
232 | 263 | # Utils |
233 | 264 | "AirbyteTracedException", |
234 | 265 | "is_cloud_environment", |
|
244 | 275 | "OneOfOptionConfig", |
245 | 276 | "resolve_refs", |
246 | 277 | "as_airbyte_message", |
247 | | - |
248 | 278 | # Types |
249 | 279 | "Config", |
250 | 280 | "Record", |
|
0 commit comments