e6data-python-connector 2.2.4__tar.gz → 2.2.5__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 (36) hide show
  1. {e6data_python_connector-2.2.4/e6data_python_connector.egg-info → e6data_python_connector-2.2.5}/PKG-INFO +2 -2
  2. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/README.md +1 -1
  3. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/cluster_manager.py +2 -2
  4. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/dialect.py +11 -6
  5. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/e6data_grpc.py +9 -2
  6. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5/e6data_python_connector.egg-info}/PKG-INFO +2 -2
  7. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/setup.py +1 -1
  8. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/LICENSE +0 -0
  9. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/MANIFEST.in +0 -0
  10. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/__init__.py +0 -0
  11. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/cluster_server/__init__.py +0 -0
  12. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/cluster_server/cluster_pb2.py +0 -0
  13. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/cluster_server/cluster_pb2_grpc.py +0 -0
  14. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/common.py +0 -0
  15. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/constants.py +0 -0
  16. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/datainputstream.py +0 -0
  17. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/date_time_utils.py +0 -0
  18. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/e6x_vector/__init__.py +0 -0
  19. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/e6x_vector/constants.py +0 -0
  20. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
  21. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/exceptions.py +0 -0
  22. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/QueryEngineService.py +0 -0
  23. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/__init__.py +0 -0
  24. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/constants.py +0 -0
  25. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
  26. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
  27. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
  28. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/server/ttypes.py +0 -0
  29. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector/typeId.py +0 -0
  30. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
  31. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
  32. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector.egg-info/entry_points.txt +0 -0
  33. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector.egg-info/requires.txt +0 -0
  34. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/e6data_python_connector.egg-info/top_level.txt +0 -0
  35. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/pyproject.toml +0 -0
  36. {e6data_python_connector-2.2.4 → e6data_python_connector-2.2.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e6data-python-connector
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: Client for the e6data distributed SQL Engine.
5
5
  Home-page: https://github.com/e6x-labs/e6data-python-connector
6
6
  Author: e6data, Inc.
@@ -38,7 +38,7 @@ Dynamic: summary
38
38
 
39
39
  # e6data Python Connector
40
40
 
41
- ![version](https://img.shields.io/badge/version-2.2.4-blue.svg)
41
+ ![version](https://img.shields.io/badge/version-2.2.5-blue.svg)
42
42
 
43
43
  ## Introduction
44
44
 
@@ -1,6 +1,6 @@
1
1
  # e6data Python Connector
2
2
 
3
- ![version](https://img.shields.io/badge/version-2.2.4-blue.svg)
3
+ ![version](https://img.shields.io/badge/version-2.2.5-blue.svg)
4
4
 
5
5
  ## Introduction
6
6
 
@@ -136,7 +136,7 @@ class ClusterManager:
136
136
  cluster_uuid (str): The unique identifier for the target cluster.
137
137
  """
138
138
 
139
- def __init__(self, host: str, port: int, user: str, password: str, secure_channel: bool = False, timeout=60 * 3, cluster_uuid=None, grpc_options=None):
139
+ def __init__(self, host: str, port: int, user: str, password: str, secure_channel: bool = False, timeout=60 * 5, cluster_uuid=None, grpc_options=None):
140
140
  """
141
141
  Initializes a new instance of the ClusterManager class.
142
142
 
@@ -148,7 +148,7 @@ class ClusterManager:
148
148
  secure_channel (bool, optional): Whether to use a secure
149
149
  gRPC channel for communication; defaults to False.
150
150
  timeout (int, optional): The timeout duration (in seconds) for operations;
151
- defaults to 3 minutes.
151
+ defaults to 5 minutes.
152
152
  cluster_uuid (str, optional): The unique identifier for the target cluster;
153
153
  defaults to None.
154
154
  """
@@ -10,15 +10,12 @@ from __future__ import unicode_literals
10
10
  import datetime
11
11
  import decimal
12
12
  import logging
13
- import re
14
13
  from decimal import Decimal
15
14
 
16
15
  from dateutil.parser import parse
17
16
  from sqlalchemy import exc
18
17
  from sqlalchemy import processors
19
18
  from sqlalchemy import types
20
- from sqlalchemy import util
21
- # TODO shouldn't use mysql type
22
19
  from sqlalchemy.databases import mysql
23
20
  from sqlalchemy.engine import default, Engine, Connection
24
21
  from sqlalchemy.sql import compiler
@@ -230,11 +227,18 @@ class E6dataDialect(default.DefaultDialect):
230
227
  database = url.query.get("schema")
231
228
  self.catalog_name = url.query.get("catalog")
232
229
  self.cluster_uuid = url.query.get("cluster-uuid")
233
- self.secure = url.query.get("secure") == 'true'
234
- self.auto_resume = url.query.get("auto-resume") == 'true'
230
+ self.secure = url.query.get("secure") == "true"
231
+ self.auto_resume = url.query.get("auto-resume", "true") == "true" # default to True
235
232
  if not self.catalog_name:
236
233
  raise Exception('Please specify catalog in query parameter.')
237
234
 
235
+ # Extract grpc_options from query params
236
+ grpc_options = {}
237
+ for key, value in url.query.items():
238
+ # Skip known parameters that are not grpc_options
239
+ if key not in {"schema", "catalog", "cluster-uuid", "secure", "auto-resume"}:
240
+ grpc_options[key] = value
241
+
238
242
  kwargs = {
239
243
  "host": url.host,
240
244
  "port": url.port,
@@ -245,7 +249,8 @@ class E6dataDialect(default.DefaultDialect):
245
249
  "catalog": self.catalog_name,
246
250
  "cluster_uuid": self.cluster_uuid,
247
251
  'secure': self.secure,
248
- 'auto_resume': self.auto_resume
252
+ 'auto_resume': self.auto_resume,
253
+ 'grpc_options': grpc_options
249
254
  }
250
255
  return [], kwargs
251
256
 
@@ -142,7 +142,7 @@ class Connection(object):
142
142
  database: str = None,
143
143
  cluster_uuid: str = None,
144
144
  secure: bool = False,
145
- auto_resume: bool = False,
145
+ auto_resume: bool = True,
146
146
  grpc_options: dict = None,
147
147
  ):
148
148
  """
@@ -198,6 +198,12 @@ class Connection(object):
198
198
  if self._grpc_options is None:
199
199
  self._grpc_options = dict()
200
200
  self.grpc_prepare_timeout = self._grpc_options.get('grpc_prepare_timeout') or 10 * 60 # 10 minutes
201
+ self.grpc_auto_resume_timeout_seconds = 60 * 5 # 5 minutes
202
+ if 'grpc_auto_resume_timeout_seconds' in self._grpc_options:
203
+ """
204
+ The default maximum time on client side to wait for the cluster to resume is 5 minutes.
205
+ """
206
+ self.grpc_auto_resume_timeout_seconds = self._grpc_options.pop('grpc_auto_resume_timeout_seconds')
201
207
  self._create_client()
202
208
 
203
209
  @property
@@ -305,7 +311,8 @@ class Connection(object):
305
311
  user=self.__username,
306
312
  password=self.__password,
307
313
  secure_channel=self._secure_channel,
308
- cluster_uuid=self.cluster_uuid
314
+ cluster_uuid=self.cluster_uuid,
315
+ timeout=self.grpc_auto_resume_timeout_seconds
309
316
  ).resume()
310
317
  if status:
311
318
  authenticate_request = e6x_engine_pb2.AuthenticateRequest(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e6data-python-connector
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: Client for the e6data distributed SQL Engine.
5
5
  Home-page: https://github.com/e6x-labs/e6data-python-connector
6
6
  Author: e6data, Inc.
@@ -38,7 +38,7 @@ Dynamic: summary
38
38
 
39
39
  # e6data Python Connector
40
40
 
41
- ![version](https://img.shields.io/badge/version-2.2.4-blue.svg)
41
+ ![version](https://img.shields.io/badge/version-2.2.5-blue.svg)
42
42
 
43
43
  ## Introduction
44
44
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  import setuptools
14
14
 
15
- VERSION = (2, 2, 4)
15
+ VERSION = (2, 2, 5)
16
16
 
17
17
 
18
18
  def get_long_desc():