fivetran-connector-sdk 1.4.6__tar.gz → 1.5.1__tar.gz

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.
Files changed (24) hide show
  1. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/PKG-INFO +4 -4
  2. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/pyproject.toml +3 -3
  3. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/__init__.py +11 -4
  4. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/helpers.py +5 -2
  5. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/logger.py +11 -6
  6. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk.egg-info/PKG-INFO +4 -4
  7. fivetran_connector_sdk-1.5.1/src/fivetran_connector_sdk.egg-info/requires.txt +5 -0
  8. fivetran_connector_sdk-1.4.6/src/fivetran_connector_sdk.egg-info/requires.txt +0 -5
  9. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/README.md +0 -0
  10. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/setup.cfg +0 -0
  11. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/connector_helper.py +0 -0
  12. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/constants.py +0 -0
  13. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/operations.py +0 -0
  14. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/__init__.py +0 -0
  15. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/common_pb2.py +0 -0
  16. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/common_pb2.pyi +0 -0
  17. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/common_pb2_grpc.py +0 -0
  18. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/connector_sdk_pb2.py +0 -0
  19. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/connector_sdk_pb2.pyi +0 -0
  20. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk/protos/connector_sdk_pb2_grpc.py +0 -0
  21. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk.egg-info/SOURCES.txt +0 -0
  22. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk.egg-info/dependency_links.txt +0 -0
  23. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk.egg-info/entry_points.txt +0 -0
  24. {fivetran_connector_sdk-1.4.6 → fivetran_connector_sdk-1.5.1}/src/fivetran_connector_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fivetran_connector_sdk
3
- Version: 1.4.6
3
+ Version: 1.5.1
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
@@ -11,11 +11,11 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
- Requires-Dist: grpcio==1.60.1
15
- Requires-Dist: grpcio-tools==1.60.1
14
+ Requires-Dist: grpcio==1.71.0
15
+ Requires-Dist: grpcio-tools==1.71.0
16
16
  Requires-Dist: requests==2.32.3
17
17
  Requires-Dist: pipreqs==0.5.0
18
- Requires-Dist: unidecode==1.3.8
18
+ Requires-Dist: unidecode==1.4.0
19
19
 
20
20
  # **fivetran-connector-sdk**
21
21
  [![Downloads](https://static.pepy.tech/badge/fivetran-connector-sdk)](https://pepy.tech/project/fivetran-connector-sdk)
@@ -13,11 +13,11 @@ classifiers = [
13
13
  "Operating System :: OS Independent",
14
14
  ]
15
15
  dependencies = [
16
- "grpcio==1.60.1",
17
- "grpcio-tools==1.60.1",
16
+ "grpcio==1.71.0",
17
+ "grpcio-tools==1.71.0",
18
18
  "requests==2.32.3",
19
19
  "pipreqs==0.5.0",
20
- "unidecode==1.3.8"
20
+ "unidecode==1.4.0"
21
21
  ]
22
22
 
23
23
  [project.scripts]
@@ -39,8 +39,9 @@ from fivetran_connector_sdk.connector_helper import (
39
39
 
40
40
  # Version format: <major_version>.<minor_version>.<patch_version>
41
41
  # (where Major Version = 1 for GA, Minor Version is incremental MM from Jan 25 onwards, Patch Version is incremental within a month)
42
- __version__ = "1.4.6"
42
+ __version__ = "1.5.1"
43
43
  TESTER_VERSION = TESTER_VER
44
+ MAX_MESSAGE_LENGTH = 32 * 1024 * 1024 # 32MB
44
45
 
45
46
  __all__ = [cls.__name__ for cls in [Logging, Operations]]
46
47
 
@@ -177,7 +178,13 @@ class Connector(connector_sdk_pb2_grpc.ConnectorServicer):
177
178
  if not constants.DEBUGGING:
178
179
  print_library_log(f"Running on fivetran_connector_sdk: {__version__}")
179
180
 
180
- server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
181
+ server = grpc.server(
182
+ futures.ThreadPoolExecutor(max_workers=10),
183
+ options=[
184
+ ('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),
185
+ ('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH),
186
+ ]
187
+ )
181
188
  connector_sdk_pb2_grpc.add_ConnectorServicer_to_server(self, server)
182
189
  server.add_insecure_port("[::]:" + str(port))
183
190
  server.start()
@@ -420,7 +427,7 @@ def main():
420
427
  configuration = validate_and_load_configuration(args, configuration)
421
428
  state = validate_and_load_state(args, state)
422
429
 
423
- FIVETRAN_API_KEY = os.getenv('FIVETRAN_API_KEY', None)
430
+ FIVETRAN_BASE_64_ENCODED_API_KEY = os.getenv('FIVETRAN_BASE_64_ENCODED_API_KEY', None)
424
431
  FIVETRAN_DESTINATION_NAME = os.getenv('FIVETRAN_DESTINATION_NAME', None)
425
432
  FIVETRAN_CONNECTION_NAME = os.getenv('FIVETRAN_CONNECTION_NAME', None)
426
433
 
@@ -429,7 +436,7 @@ def main():
429
436
  print_library_log("'state' parameter is not used for 'deploy' command", Logging.Level.WARNING)
430
437
 
431
438
  if not ft_deploy_key:
432
- ft_deploy_key = get_input_from_cli("Please provide the API Key", FIVETRAN_API_KEY)
439
+ ft_deploy_key = get_input_from_cli("Please provide the API Key", FIVETRAN_BASE_64_ENCODED_API_KEY)
433
440
 
434
441
  if not ft_group:
435
442
  ft_group = get_input_from_cli("Please provide the destination", FIVETRAN_DESTINATION_NAME)
@@ -304,8 +304,11 @@ def validate_and_load_state(args, state):
304
304
 
305
305
  def reset_local_file_directory(args):
306
306
  files_path = os.path.join(args.project_path, OUTPUT_FILES_DIR)
307
- confirm = input(
308
- "This will delete your current state and `warehouse.db` files. Do you want to continue? (Y/N): ")
307
+ if args.force:
308
+ confirm = "y"
309
+ else:
310
+ confirm = input(
311
+ "This will delete your current state and `warehouse.db` files. Do you want to continue? (Y/N): ")
309
312
  if confirm.lower() != "y":
310
313
  print_library_log("Reset canceled")
311
314
  else:
@@ -24,12 +24,20 @@ class Logging:
24
24
  """
25
25
  if constants.DEBUGGING:
26
26
  current_time = datetime.now().strftime("%b %d, %Y %I:%M:%S %p")
27
- print(f"{Logging.get_color(level)}{current_time} {level.name}: {message} {Logging.reset_color()}")
27
+ prefix = f"{current_time} {level.name}: "
28
+ message = Logging.get_formatted_log(message, prefix)
29
+ print(f"{Logging.get_color(level)}{prefix}{message} {Logging.reset_color()}")
28
30
  else:
29
31
  escaped_message = json.dumps(message)
30
32
  log_message = f'{{"level":"{level.name}", "message": {escaped_message}, "message_origin": "connector_sdk"}}'
31
33
  print(log_message)
32
34
 
35
+ @staticmethod
36
+ def get_formatted_log(message, prefix):
37
+ lines = message.split('\n')
38
+ padding = "\n" + " " * len(prefix)
39
+ return padding.join(lines)
40
+
33
41
  @staticmethod
34
42
  def get_color(level):
35
43
  if level == Logging.Level.WARNING:
@@ -81,11 +89,8 @@ class Logging:
81
89
  exception (Exception, optional): Exception to be logged if provided.
82
90
  """
83
91
  if Logging.LOG_LEVEL <= Logging.Level.SEVERE:
84
- Logging.__log(Logging.Level.SEVERE, message)
85
-
86
92
  if exception:
87
93
  exc_type, exc_value, exc_traceback = type(exception), exception, exception.__traceback__
88
94
  tb_str = "".join(traceback.format_exception(exc_type, exc_value, exc_traceback, limit=1))
89
-
90
- for error in tb_str.split("\n"):
91
- Logging.__log(Logging.Level.SEVERE, error)
95
+ message += "\n" + tb_str
96
+ Logging.__log(Logging.Level.SEVERE, message)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fivetran_connector_sdk
3
- Version: 1.4.6
3
+ Version: 1.5.1
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
@@ -11,11 +11,11 @@ Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.9
13
13
  Description-Content-Type: text/markdown
14
- Requires-Dist: grpcio==1.60.1
15
- Requires-Dist: grpcio-tools==1.60.1
14
+ Requires-Dist: grpcio==1.71.0
15
+ Requires-Dist: grpcio-tools==1.71.0
16
16
  Requires-Dist: requests==2.32.3
17
17
  Requires-Dist: pipreqs==0.5.0
18
- Requires-Dist: unidecode==1.3.8
18
+ Requires-Dist: unidecode==1.4.0
19
19
 
20
20
  # **fivetran-connector-sdk**
21
21
  [![Downloads](https://static.pepy.tech/badge/fivetran-connector-sdk)](https://pepy.tech/project/fivetran-connector-sdk)
@@ -0,0 +1,5 @@
1
+ grpcio==1.71.0
2
+ grpcio-tools==1.71.0
3
+ requests==2.32.3
4
+ pipreqs==0.5.0
5
+ unidecode==1.4.0
@@ -1,5 +0,0 @@
1
- grpcio==1.60.1
2
- grpcio-tools==1.60.1
3
- requests==2.32.3
4
- pipreqs==0.5.0
5
- unidecode==1.3.8