fivetran-connector-sdk 1.4.3__py3-none-any.whl → 1.4.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fivetran_connector_sdk/__init__.py +42 -27
- {fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/METADATA +6 -5
- {fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/RECORD +6 -6
- {fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/WHEEL +1 -1
- {fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/entry_points.txt +0 -0
- {fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/top_level.txt +0 -0
@@ -32,13 +32,26 @@ from fivetran_connector_sdk.protos import connector_sdk_pb2_grpc
|
|
32
32
|
|
33
33
|
# Version format: <major_version>.<minor_version>.<patch_version>
|
34
34
|
# (where Major Version = 1 for GA, Minor Version is incremental MM from Jan 25 onwards, Patch Version is incremental within a month)
|
35
|
-
__version__ = "1.4.
|
35
|
+
__version__ = "1.4.5"
|
36
36
|
|
37
|
-
MAC_OS = "mac"
|
38
37
|
WIN_OS = "windows"
|
39
|
-
|
38
|
+
ARM_64 = "arm64"
|
39
|
+
X64 = "x64"
|
40
40
|
|
41
|
-
|
41
|
+
OS_MAP = {
|
42
|
+
"darwin": "mac",
|
43
|
+
"linux": "linux",
|
44
|
+
WIN_OS: WIN_OS
|
45
|
+
}
|
46
|
+
|
47
|
+
ARCH_MAP = {
|
48
|
+
"x86_64": X64,
|
49
|
+
"amd64": X64,
|
50
|
+
ARM_64: ARM_64,
|
51
|
+
"aarch64": ARM_64
|
52
|
+
}
|
53
|
+
|
54
|
+
TESTER_VERSION = "0.25.0521.001"
|
42
55
|
TESTER_FILENAME = "run_sdk_tester.jar"
|
43
56
|
VERSION_FILENAME = "version.txt"
|
44
57
|
UPLOAD_FILENAME = "code.zip"
|
@@ -84,8 +97,8 @@ INSTALLATION_SCRIPT = "installation.sh"
|
|
84
97
|
DRIVERS = "drivers"
|
85
98
|
JAVA_LONG_MAX_VALUE = 9223372036854775807
|
86
99
|
MAX_CONFIG_FIELDS = 100
|
87
|
-
SUPPORTED_PYTHON_VERSIONS = ["3.12
|
88
|
-
DEFAULT_PYTHON_VERSION = "3.12
|
100
|
+
SUPPORTED_PYTHON_VERSIONS = ["3.12", "3.11", "3.10", "3.9"]
|
101
|
+
DEFAULT_PYTHON_VERSION = "3.12"
|
89
102
|
FIVETRAN_HD_AGENT_ID = "FIVETRAN_HD_AGENT_ID"
|
90
103
|
UTF_8 = "utf-8"
|
91
104
|
|
@@ -324,8 +337,8 @@ def check_newer_version():
|
|
324
337
|
data = json.loads(response.text)
|
325
338
|
latest_version = data["info"]["version"]
|
326
339
|
if __version__ < latest_version:
|
327
|
-
print_library_log(f"[notice] A new release of 'fivetran-connector-sdk' is available: {latest_version}
|
328
|
-
|
340
|
+
print_library_log(f"[notice] A new release of 'fivetran-connector-sdk' is available: {latest_version}")
|
341
|
+
print_library_log("[notice] To update, run: pip install --upgrade fivetran-connector-sdk")
|
329
342
|
|
330
343
|
with open(last_check_file_path, 'w', encoding=UTF_8) as f_out:
|
331
344
|
f_out.write(f"{int(time.time())}")
|
@@ -1315,20 +1328,22 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
1315
1328
|
return False
|
1316
1329
|
|
1317
1330
|
@staticmethod
|
1318
|
-
def
|
1319
|
-
"""Returns the name of the operating system.
|
1320
|
-
|
1321
|
-
Returns:
|
1322
|
-
str: The name of the operating system.
|
1331
|
+
def __get_os_arch_suffix() -> str:
|
1323
1332
|
"""
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1333
|
+
Returns the operating system and architecture suffix for the current operating system.
|
1334
|
+
"""
|
1335
|
+
system = platform.system().lower()
|
1336
|
+
machine = platform.machine().lower()
|
1337
|
+
|
1338
|
+
if system not in OS_MAP:
|
1339
|
+
raise RuntimeError(f"Unsupported OS: {system}")
|
1340
|
+
|
1341
|
+
plat = OS_MAP[system]
|
1342
|
+
|
1343
|
+
if machine not in ARCH_MAP or (plat == WIN_OS and ARCH_MAP[machine] != X64):
|
1344
|
+
raise RuntimeError(f"Unsupported architecture '{machine}' for {plat}")
|
1345
|
+
|
1346
|
+
return f"{plat}-{ARCH_MAP[machine]}"
|
1332
1347
|
|
1333
1348
|
@staticmethod
|
1334
1349
|
def __get_group_info(group: str, deploy_key: str) -> tuple[str, str]:
|
@@ -1439,9 +1454,9 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
1439
1454
|
check_newer_version()
|
1440
1455
|
|
1441
1456
|
Logging.LOG_LEVEL = log_level
|
1442
|
-
|
1457
|
+
os_arch_suffix = self.__get_os_arch_suffix()
|
1443
1458
|
tester_root_dir = _tester_root_dir()
|
1444
|
-
java_exe = self.__java_exe(tester_root_dir,
|
1459
|
+
java_exe = self.__java_exe(tester_root_dir, os_arch_suffix)
|
1445
1460
|
install_tester = False
|
1446
1461
|
version_file = os.path.join(tester_root_dir, VERSION_FILENAME)
|
1447
1462
|
if os.path.isfile(version_file):
|
@@ -1457,7 +1472,7 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
1457
1472
|
|
1458
1473
|
if install_tester:
|
1459
1474
|
os.makedirs(tester_root_dir, exist_ok=True)
|
1460
|
-
download_filename = f"sdk-connector-tester-{
|
1475
|
+
download_filename = f"sdk-connector-tester-{os_arch_suffix}-{TESTER_VERSION}.zip"
|
1461
1476
|
download_filepath = os.path.join(tester_root_dir, download_filename)
|
1462
1477
|
try:
|
1463
1478
|
print_library_log(f"Downloading connector tester version: {TESTER_VERSION} ")
|
@@ -1514,18 +1529,18 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
|
|
1514
1529
|
server.stop(grace=2.0)
|
1515
1530
|
|
1516
1531
|
@staticmethod
|
1517
|
-
def __java_exe(location: str,
|
1532
|
+
def __java_exe(location: str, os_arch_suffix: str) -> str:
|
1518
1533
|
"""Returns the path to the Java executable.
|
1519
1534
|
|
1520
1535
|
Args:
|
1521
1536
|
location (str): The location of the Java executable.
|
1522
|
-
|
1537
|
+
os_arch_suffix (str): The name of the operating system and architecture
|
1523
1538
|
|
1524
1539
|
Returns:
|
1525
1540
|
str: The path to the Java executable.
|
1526
1541
|
"""
|
1527
1542
|
java_exe_base = os.path.join(location, "bin", "java")
|
1528
|
-
return f"{java_exe_base}.exe" if
|
1543
|
+
return f"{java_exe_base}.exe" if os_arch_suffix == f"{WIN_OS}-{X64}" else java_exe_base
|
1529
1544
|
|
1530
1545
|
@staticmethod
|
1531
1546
|
def process_stream(stream):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fivetran_connector_sdk
|
3
|
-
Version: 1.4.
|
3
|
+
Version: 1.4.5
|
4
4
|
Summary: Build custom connectors on Fivetran platform
|
5
5
|
Author-email: Fivetran <developers@fivetran.com>
|
6
6
|
Project-URL: Homepage, https://fivetran.com/docs/connectors/connector-sdk
|
@@ -35,10 +35,11 @@ To learn more, see our [Connector SDK documentation](https://fivetran.com/docs/c
|
|
35
35
|
pip install fivetran-connector-sdk
|
36
36
|
|
37
37
|
## **Requirements**
|
38
|
-
- Python ≥3.9 and ≤3.12
|
39
|
-
- Operating
|
40
|
-
|
41
|
-
|
38
|
+
- Python version ≥3.9 and ≤3.12
|
39
|
+
- Operating system:
|
40
|
+
- Windows: 10 or later (64-bit only)
|
41
|
+
- macOS: 13 (Ventura) or later (Apple Silicon [arm64] or Intel [x86_64])
|
42
|
+
- Linux: Distributions such as Ubuntu 20.04 or later, Debian 10 or later, or Amazon Linux 2 or later (arm64 or x86_64)
|
42
43
|
|
43
44
|
## **Getting started**
|
44
45
|
See [Quickstart guide](https://fivetran.com/docs/connectors/connector-sdk/quickstart-guide) to get started.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fivetran_connector_sdk/__init__.py,sha256=
|
1
|
+
fivetran_connector_sdk/__init__.py,sha256=BF_eAT9h-UCVMX9d-ZDgC8jtOYMAp15gbKzEMPoLMos,86932
|
2
2
|
fivetran_connector_sdk/protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
fivetran_connector_sdk/protos/common_pb2.py,sha256=kUwVcyZHgLigNR-KnHZn7dHrlxaMnUXqzprsRx6T72M,6831
|
4
4
|
fivetran_connector_sdk/protos/common_pb2.pyi,sha256=S0hdIzoXyyOKD5cjiGeDDLYpQ9J3LjAvu4rCj1JvJWE,9038
|
@@ -6,8 +6,8 @@ fivetran_connector_sdk/protos/common_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXH
|
|
6
6
|
fivetran_connector_sdk/protos/connector_sdk_pb2.py,sha256=9Ke_Ti1s0vAeXapfXT-EryrT2-TSGQb8mhs4gxTpUMk,7732
|
7
7
|
fivetran_connector_sdk/protos/connector_sdk_pb2.pyi,sha256=FWYxRgshEF3QDYAE0TM_mv4N2gGvkxCH_uPpxnMc4oA,8406
|
8
8
|
fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py,sha256=ZfJLp4DW7uP4pFOZ74s_wQ6tD3eIPi-08UfnLwe4tzo,7163
|
9
|
-
fivetran_connector_sdk-1.4.
|
10
|
-
fivetran_connector_sdk-1.4.
|
11
|
-
fivetran_connector_sdk-1.4.
|
12
|
-
fivetran_connector_sdk-1.4.
|
13
|
-
fivetran_connector_sdk-1.4.
|
9
|
+
fivetran_connector_sdk-1.4.5.dist-info/METADATA,sha256=oHKyhb91aaZ_obddY7yURX_SXNDqHYocbmi9lIDnlVs,3150
|
10
|
+
fivetran_connector_sdk-1.4.5.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
11
|
+
fivetran_connector_sdk-1.4.5.dist-info/entry_points.txt,sha256=uQn0KPnFlQmXJfxlk0tifdNsSXWfVlnAFzNqjXZM_xM,57
|
12
|
+
fivetran_connector_sdk-1.4.5.dist-info/top_level.txt,sha256=-_xk2MFY4psIh7jw1lJePMzFb5-vask8_ZtX-UzYWUI,23
|
13
|
+
fivetran_connector_sdk-1.4.5.dist-info/RECORD,,
|
{fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/entry_points.txt
RENAMED
File without changes
|
{fivetran_connector_sdk-1.4.3.dist-info → fivetran_connector_sdk-1.4.5.dist-info}/top_level.txt
RENAMED
File without changes
|