e6data-python-connector 1.1.0__tar.gz → 1.1.2__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 (30) hide show
  1. {e6data-python-connector-1.1.0/e6data_python_connector.egg-info → e6data-python-connector-1.1.2}/PKG-INFO +8 -8
  2. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/README.md +7 -7
  3. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/e6xgrpc.py +27 -9
  4. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2/e6data_python_connector.egg-info}/PKG-INFO +8 -8
  5. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/setup.py +1 -1
  6. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/LICENSE +0 -0
  7. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/MANIFEST.in +0 -0
  8. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/__init__.py +0 -0
  9. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/QueryEngineService.py +0 -0
  10. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/__init__.py +0 -0
  11. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/constants.py +0 -0
  12. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
  13. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
  14. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector/server/ttypes.py +0 -0
  15. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
  16. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
  17. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector.egg-info/entry_points.txt +0 -0
  18. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector.egg-info/requires.txt +0 -0
  19. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6data_python_connector.egg-info/top_level.txt +0 -0
  20. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/__init__.py +0 -0
  21. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/common.py +0 -0
  22. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/constants.py +0 -0
  23. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/datainputstream.py +0 -0
  24. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/date_time_utils.py +0 -0
  25. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/e6x.py +0 -0
  26. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/exceptions.py +0 -0
  27. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/sqlalchemy_e6x.py +0 -0
  28. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/e6xdb/typeId.py +0 -0
  29. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/pyproject.toml +0 -0
  30. {e6data-python-connector-1.1.0 → e6data-python-connector-1.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e6data-python-connector
3
- Version: 1.1.0
3
+ Version: 1.1.2
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: Uniphi, Inc.
@@ -8,7 +8,7 @@ Author-email: info@e6data.com
8
8
  License: Apache 2.0
9
9
  Description: # e6data Python Connector
10
10
 
11
- ![version](https://img.shields.io/badge/version-1.1.0-blue.svg)
11
+ ![version](https://img.shields.io/badge/version-1.1.2-blue.svg)
12
12
 
13
13
  ## Introduction
14
14
 
@@ -20,8 +20,8 @@ Description: # e6data Python Connector
20
20
  ```
21
21
  ### Prerequisites
22
22
 
23
- * Open Inbound Port 9000 in the Engine Cluster.
24
- * Limit access to Port 9000 according to your organizational security policy. Public access is not encouraged.
23
+ * Open Inbound Port 9001 in the Engine Cluster.
24
+ * Limit access to Port 9001 according to your organizational security policy. Public access is not encouraged.
25
25
  * Access Token generated in the e6data console.
26
26
 
27
27
  ### Create a Connection
@@ -36,7 +36,7 @@ Description: # e6data Python Connector
36
36
 
37
37
  host = '<host>' # IP address or hostname of the cluster to be used.
38
38
  database = '<database>' # # Database to perform the query on.
39
- port = 9000 # Port of the e6data engine.
39
+ port = 9001 # Port of the e6data engine.
40
40
  catalog_name = '<catalog_name>'
41
41
 
42
42
  conn = Connection(
@@ -156,7 +156,7 @@ Description: # e6data Python Connector
156
156
  ### Code Example
157
157
  The following code is an example which combines a few functions described above.
158
158
  ```python
159
- import e6xdb.e6x as edb
159
+ from e6data_python_connector import Connection
160
160
  import json
161
161
 
162
162
  username = '<username>' # Your e6data Email ID.
@@ -164,13 +164,13 @@ Description: # e6data Python Connector
164
164
 
165
165
  host = '<host>' # IP address or hostname of the cluster to be used.
166
166
  database = '<database>' # # Database to perform the query on.
167
- port = 9000 # Port of the e6data engine.
167
+ port = 9001 # Port of the e6data engine.
168
168
 
169
169
  sql_query = 'SELECT * FROM <TABLE_NAME>' # Replace with the actual query.
170
170
 
171
171
  catalog_name = '<catalog_name>' # Replace with the actual catalog name.
172
172
 
173
- conn = edb.connect(
173
+ conn = Connection(
174
174
  host=host,
175
175
  port=port,
176
176
  username=username,
@@ -1,6 +1,6 @@
1
1
  # e6data Python Connector
2
2
 
3
- ![version](https://img.shields.io/badge/version-1.1.0-blue.svg)
3
+ ![version](https://img.shields.io/badge/version-1.1.2-blue.svg)
4
4
 
5
5
  ## Introduction
6
6
 
@@ -12,8 +12,8 @@ pip install e6data-python-connector
12
12
  ```
13
13
  ### Prerequisites
14
14
 
15
- * Open Inbound Port 9000 in the Engine Cluster.
16
- * Limit access to Port 9000 according to your organizational security policy. Public access is not encouraged.
15
+ * Open Inbound Port 9001 in the Engine Cluster.
16
+ * Limit access to Port 9001 according to your organizational security policy. Public access is not encouraged.
17
17
  * Access Token generated in the e6data console.
18
18
 
19
19
  ### Create a Connection
@@ -28,7 +28,7 @@ password = '<password>' # Access Token generated in the e6data console.
28
28
 
29
29
  host = '<host>' # IP address or hostname of the cluster to be used.
30
30
  database = '<database>' # # Database to perform the query on.
31
- port = 9000 # Port of the e6data engine.
31
+ port = 9001 # Port of the e6data engine.
32
32
  catalog_name = '<catalog_name>'
33
33
 
34
34
  conn = Connection(
@@ -148,7 +148,7 @@ conn.close()
148
148
  ### Code Example
149
149
  The following code is an example which combines a few functions described above.
150
150
  ```python
151
- import e6xdb.e6x as edb
151
+ from e6data_python_connector import Connection
152
152
  import json
153
153
 
154
154
  username = '<username>' # Your e6data Email ID.
@@ -156,13 +156,13 @@ password = '<password>' # Access Token generated in the e6data console.
156
156
 
157
157
  host = '<host>' # IP address or hostname of the cluster to be used.
158
158
  database = '<database>' # # Database to perform the query on.
159
- port = 9000 # Port of the e6data engine.
159
+ port = 9001 # Port of the e6data engine.
160
160
 
161
161
  sql_query = 'SELECT * FROM <TABLE_NAME>' # Replace with the actual query.
162
162
 
163
163
  catalog_name = '<catalog_name>' # Replace with the actual catalog name.
164
164
 
165
- conn = edb.connect(
165
+ conn = Connection(
166
166
  host=host,
167
167
  port=port,
168
168
  username=username,
@@ -107,20 +107,39 @@ class Connection(object):
107
107
  password=None,
108
108
  check_hostname=None,
109
109
  ssl_cert=None,
110
- thrift_transport=None
110
+ thrift_transport=None,
111
+ grpc_options=None
111
112
  ):
113
+ if not username or not password:
114
+ raise ValueError("username or password cannot be empty.")
115
+ if not host or not port:
116
+ raise ValueError("host or port cannot be empty.")
112
117
  self.__username = username
113
118
  self.__password = password
114
119
  self._database = database
115
120
  self._session_id = None
116
121
  self._host = host
117
-
118
- if not self.__username or not self.__password:
119
- raise ValueError("username or password cannot be empty.")
120
- if port is None:
121
- port = 9000
122
122
  self._port = port
123
- self._channel = grpc.insecure_channel('{}:{}'.format(host, port))
123
+
124
+ self._keepalive_timeout_ms = 900000
125
+ self._max_receive_message_length = 100 * 1024 * 1024 # mb
126
+ self._max_send_message_length = 300 * 1024 * 1024 # mb
127
+
128
+ if type(grpc_options) == dict:
129
+ self._keepalive_timeout_ms = grpc_options.get('keepalive_timeout_ms') or self._keepalive_timeout_ms
130
+ self._max_receive_message_length = grpc_options.get('max_receive_message_length') or self._max_receive_message_length
131
+ self._max_send_message_length = grpc_options.get('max_send_message_length') or self._max_send_message_length
132
+ self._create_client()
133
+
134
+ def _create_client(self):
135
+ self._channel = grpc.insecure_channel(
136
+ target='{}:{}'.format(self._host, self._port),
137
+ options=[
138
+ ("grpc.keepalive_timeout_ms", self._keepalive_timeout_ms),
139
+ ('grpc.max_send_message_length', self._max_send_message_length),
140
+ ('grpc.max_receive_message_length', self._max_receive_message_length)
141
+ ],
142
+ )
124
143
  self._client = e6x_engine_pb2_grpc.QueryEngineServiceStub(self._channel)
125
144
 
126
145
  @property
@@ -139,7 +158,6 @@ class Connection(object):
139
158
  self._session_id = authenticate_response.sessionId
140
159
  if not self._session_id:
141
160
  raise ValueError("Invalid credentials.")
142
- # self._client.setSchema(database)
143
161
  except Exception as e:
144
162
  self._channel.close()
145
163
  raise e
@@ -183,7 +201,7 @@ class Connection(object):
183
201
 
184
202
  def reopen(self):
185
203
  self._channel.close()
186
- self._channel = grpc.insecure_channel('{}:{}'.format(self._host, self._port))
204
+ self._create_client()
187
205
 
188
206
  def query_cancel(self, engine_ip, query_id):
189
207
  cancel_query_request = e6x_engine_pb2.CancelQueryRequest(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e6data-python-connector
3
- Version: 1.1.0
3
+ Version: 1.1.2
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: Uniphi, Inc.
@@ -8,7 +8,7 @@ Author-email: info@e6data.com
8
8
  License: Apache 2.0
9
9
  Description: # e6data Python Connector
10
10
 
11
- ![version](https://img.shields.io/badge/version-1.1.0-blue.svg)
11
+ ![version](https://img.shields.io/badge/version-1.1.2-blue.svg)
12
12
 
13
13
  ## Introduction
14
14
 
@@ -20,8 +20,8 @@ Description: # e6data Python Connector
20
20
  ```
21
21
  ### Prerequisites
22
22
 
23
- * Open Inbound Port 9000 in the Engine Cluster.
24
- * Limit access to Port 9000 according to your organizational security policy. Public access is not encouraged.
23
+ * Open Inbound Port 9001 in the Engine Cluster.
24
+ * Limit access to Port 9001 according to your organizational security policy. Public access is not encouraged.
25
25
  * Access Token generated in the e6data console.
26
26
 
27
27
  ### Create a Connection
@@ -36,7 +36,7 @@ Description: # e6data Python Connector
36
36
 
37
37
  host = '<host>' # IP address or hostname of the cluster to be used.
38
38
  database = '<database>' # # Database to perform the query on.
39
- port = 9000 # Port of the e6data engine.
39
+ port = 9001 # Port of the e6data engine.
40
40
  catalog_name = '<catalog_name>'
41
41
 
42
42
  conn = Connection(
@@ -156,7 +156,7 @@ Description: # e6data Python Connector
156
156
  ### Code Example
157
157
  The following code is an example which combines a few functions described above.
158
158
  ```python
159
- import e6xdb.e6x as edb
159
+ from e6data_python_connector import Connection
160
160
  import json
161
161
 
162
162
  username = '<username>' # Your e6data Email ID.
@@ -164,13 +164,13 @@ Description: # e6data Python Connector
164
164
 
165
165
  host = '<host>' # IP address or hostname of the cluster to be used.
166
166
  database = '<database>' # # Database to perform the query on.
167
- port = 9000 # Port of the e6data engine.
167
+ port = 9001 # Port of the e6data engine.
168
168
 
169
169
  sql_query = 'SELECT * FROM <TABLE_NAME>' # Replace with the actual query.
170
170
 
171
171
  catalog_name = '<catalog_name>' # Replace with the actual catalog name.
172
172
 
173
- conn = edb.connect(
173
+ conn = Connection(
174
174
  host=host,
175
175
  port=port,
176
176
  username=username,
@@ -16,7 +16,7 @@ import setuptools
16
16
 
17
17
  envstring = lambda var: os.environ.get(var) or ""
18
18
 
19
- VERSION = [1, 1, 0]
19
+ VERSION = [1, 1, 2]
20
20
 
21
21
 
22
22
  def get_long_desc():