1
0
mirror of synced 2026-01-06 15:03:36 -05:00
Files
airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_source.py
Marcos Marx dca2256a7c Bump 2022 license version (#13233)
* Bump year in license short to 2022

* remove protocol from cdk
2022-05-26 15:00:42 -03:00

24 lines
681 B
Python

#
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
#
from abc import abstractmethod
from typing import Tuple
from airbyte_cdk.sources.abstract_source import AbstractSource
from airbyte_cdk.sources.declarative.checks.connection_checker import ConnectionChecker
class ConfigurableSource(AbstractSource):
"""
Base class for declarative Source. Concrete sources need to define the connection_checker to use
"""
@property
@abstractmethod
def connection_checker(self) -> ConnectionChecker:
pass
def check_connection(self, logger, config) -> Tuple[bool, any]:
return self.connection_checker.check_connection(self, logger, config)