apache-iotdb 2.0.8__py3-none-any.whl → 2.0.11__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-iotdb
3
- Version: 2.0.8
3
+ Version: 2.0.11
4
4
  Summary: Apache IoTDB client API
5
5
  Author-email: Apache IoTDB <dev@iotdb.apache.org>
6
6
  License-Expression: Apache-2.0
@@ -112,6 +112,40 @@ Notice: this RPC compression status of client must comply with that of IoTDB ser
112
112
  session.close()
113
113
  ```
114
114
 
115
+ ### SSL and Mutual TLS
116
+
117
+ Use `use_ssl=True` and `ca_certs` to enable SSL and verify the server certificate.
118
+
119
+ ```python
120
+ session = Session(
121
+ ip,
122
+ port_,
123
+ username_,
124
+ password_,
125
+ use_ssl=True,
126
+ ca_certs="/path/ca.crt",
127
+ )
128
+ ```
129
+
130
+ When the server enables Thrift mutual TLS, also configure a client certificate and an unencrypted PEM private key.
131
+
132
+ ```python
133
+ session = Session(
134
+ ip,
135
+ port_,
136
+ username_,
137
+ password_,
138
+ use_ssl=True,
139
+ ca_certs="/path/ca.crt",
140
+ client_cert="/path/client.crt",
141
+ client_key="/path/client.key",
142
+ )
143
+ ```
144
+
145
+ `client_cert` and `client_key` must be set together. `client_key` should be protected by file permissions because encrypted private keys are not supported by this client API.
146
+
147
+ The same SSL parameters are available in `PoolConfig`, `TableSessionConfig`, `TableSessionPoolConfig`, and DBAPI `connect`.
148
+
115
149
  ### Data Definition Interface (DDL Interface)
116
150
 
117
151
  #### DATABASE Management
@@ -628,5 +662,3 @@ Namely, these are
628
662
  * Release to pypi
629
663
 
630
664
 
631
-
632
-
@@ -1,9 +1,9 @@
1
- iotdb/Session.py,sha256=L26uKpMG5LyiXJfvWVFIr0hpDdBNv6StmMMN82XNXtA,102601
2
- iotdb/SessionPool.py,sha256=vBy8vG7fmuDexGPzVqQhM8pWjKLrczN0na1OD-hFDnY,6674
1
+ iotdb/Session.py,sha256=irmKLLX5IIgNPeYLrHl9577TfZhjZhwIAgikJj2nZhQ,103751
2
+ iotdb/SessionPool.py,sha256=bF4_xv-rBvWVlkHEwh3nqHA8Dqlduduyl0HM5FOT8V0,7051
3
3
  iotdb/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
4
- iotdb/table_session.py,sha256=Jav4TuvRl4PxOhNBaBqTvMGFWemu5YkAwRU_KXUy9wk,6173
5
- iotdb/table_session_pool.py,sha256=sqhceeGbr1bsLjYj6aEF_p3qzqiVhtXKAEjV9CY4pWI,5329
6
- iotdb/dbapi/Connection.py,sha256=t5CuwOTrMJxJ2YVxaEKi2fdaH9Vob-u7nQRCD_9vLcg,2569
4
+ iotdb/table_session.py,sha256=MbPOI80uqkewLrjU1WM1Eg9ykgU4dt4mTwAEBJMwUes,6436
5
+ iotdb/table_session_pool.py,sha256=VZtkmk3WOjkJNGgb9mSJCiF6QpfygMZoX0ZHPB7QneU,5466
6
+ iotdb/dbapi/Connection.py,sha256=vEH41ytAvC-ojwL9KS7aVRv73X62pdlmBcTj3iRQiVA,3421
7
7
  iotdb/dbapi/Cursor.py,sha256=CBFyHsk7cOxLJEwCWMJK0r4guXQ-OkNh39H54cyyH5k,9110
8
8
  iotdb/dbapi/Exceptions.py,sha256=X3qhGXQ_rNL7998DQwFeQc9cG5ByXlfhIQx2sBHOiuw,1278
9
9
  iotdb/dbapi/__init__.py,sha256=98jGNzw_AI1iqbYbUxGRg4Yd92Uo63S1v143_NnKKCs,953
@@ -19,21 +19,21 @@ iotdb/template/TemplateQueryType.py,sha256=6bNiydOiIqFnzutiuxdpWrOm-z9CkSawMCd_5
19
19
  iotdb/template/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
20
20
  iotdb/thrift/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  iotdb/thrift/common/__init__.py,sha256=YFcZTT8Cm-6Y4oTiCaqq0DT1lw2W09WqoEc5_pTAwW0,34
22
- iotdb/thrift/common/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
23
- iotdb/thrift/common/ttypes.py,sha256=QXp6TLXKIiU86OTY6MmtB8wfyscoV0RBS05vF3h-7xs,134613
24
- iotdb/thrift/confignode/IConfigNodeRPCService.py,sha256=4voZsyfIsR_m94NsxXjxMK3xdkO7GwOWCP_97hdfh_Y,1010712
22
+ iotdb/thrift/common/constants.py,sha256=J1z6mszd_3klwrgFDNrNEiMClInMP87lx5NVK017ckk,388
23
+ iotdb/thrift/common/ttypes.py,sha256=CPLadwC0kRV8PwOkrtzgMxqAkQM5LESLAyjMxuN2RGs,138732
24
+ iotdb/thrift/confignode/IConfigNodeRPCService.py,sha256=Qbzwvm8SJvkxudYcMAkgE7Pj19HiZnH_yVy-sHCxH5A,1064170
25
25
  iotdb/thrift/confignode/__init__.py,sha256=_SxvW-9GzGZcPWR-szpFI_VrvxJvSfjwu8HEieGWtik,59
26
- iotdb/thrift/confignode/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
27
- iotdb/thrift/confignode/ttypes.py,sha256=3k5LGp5izJkS0BaJntgUxyS_Xn0CZq5J_O0uc6TUsRY,728801
28
- iotdb/thrift/datanode/IDataNodeRPCService.py,sha256=CtU54jbK_a6MBw3zoRN2-F26NqZbol3dDYrEqsR5BV0,650884
29
- iotdb/thrift/datanode/MPPDataExchangeService.py,sha256=Pk3n-6JLTzf_SAVSC5cdUjgYUsi1fL4h2J5HIc_jPWU,35226
26
+ iotdb/thrift/confignode/constants.py,sha256=J1z6mszd_3klwrgFDNrNEiMClInMP87lx5NVK017ckk,388
27
+ iotdb/thrift/confignode/ttypes.py,sha256=OdYSwigfnSrC7J3w7OqA1Y0FhdeizYQNZIq6xmK-S_U,761004
28
+ iotdb/thrift/datanode/IDataNodeRPCService.py,sha256=YQkFWzSqpDV1vqfSGfGGriLdxwBnZ1d5hXW1jS6nMro,719785
29
+ iotdb/thrift/datanode/MPPDataExchangeService.py,sha256=YvWSAC3R_YKS5MzekQQ6e_MuRubo1SIyFQuUqN3DYPY,35954
30
30
  iotdb/thrift/datanode/__init__.py,sha256=J5dw3MYQMv2wUCQqOxUUdaNrCJP8j3Iy80Fv-PJ70S4,83
31
- iotdb/thrift/datanode/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
32
- iotdb/thrift/datanode/ttypes.py,sha256=Doj7X-jVfXBkCoB_R_19xl7OAyB5dFTbRXJHkGxulf0,469550
33
- iotdb/thrift/rpc/IClientRPCService.py,sha256=hXl5EO7a9QUfNO_ne_CLDgszaIyZobF9yZStD8PVsUs,416412
31
+ iotdb/thrift/datanode/constants.py,sha256=J1z6mszd_3klwrgFDNrNEiMClInMP87lx5NVK017ckk,388
32
+ iotdb/thrift/datanode/ttypes.py,sha256=H4g-iG31nrO_MMy_IlJ9R2gCU9OEJsKEPQMTmccAc2k,529359
33
+ iotdb/thrift/rpc/IClientRPCService.py,sha256=grGLFvdVqy2KZ0k944kLRSolBSnfcuZNNvCwoHxdHQ4,442270
34
34
  iotdb/thrift/rpc/__init__.py,sha256=69gRO2XxQu71SDeCRxiZFjK6Xw_61hdl5MdWceI-e1A,55
35
- iotdb/thrift/rpc/constants.py,sha256=IKRM8SpfhYWXERWBgUbUhbdFpn363hmZjXDhEYnVRbw,366
36
- iotdb/thrift/rpc/ttypes.py,sha256=Jql-3y1wnJFsRihKpL1tuLsmEjvWDXiSV6uE-hlpcaE,301327
35
+ iotdb/thrift/rpc/constants.py,sha256=J1z6mszd_3klwrgFDNrNEiMClInMP87lx5NVK017ckk,388
36
+ iotdb/thrift/rpc/ttypes.py,sha256=IWeKtBMX9_RKhr-ahTN89MW0N9PlB3CE69VdCKyH20Q,318790
37
37
  iotdb/tsfile/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
38
38
  iotdb/tsfile/common/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
39
39
  iotdb/tsfile/common/constant/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
@@ -53,7 +53,7 @@ iotdb/utils/Tablet.py,sha256=HOYPSV1vyTB79T3e8rsHBN6ZiZJm_rFutEIOI8nDcDk,10198
53
53
  iotdb/utils/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
54
54
  iotdb/utils/exception.py,sha256=iCSzBE2Cy1q_OwC3nHdGH-OnGuwy0iPRY63VQvO8fcg,1834
55
55
  iotdb/utils/iotdb_rpc_dataset.py,sha256=SyzpddGVTQTaFb_OMmf3xWN6ojv_rcBoFwe5wUZvbKM,19165
56
- iotdb/utils/rpc_utils.py,sha256=4-pYb-0IFxq9QASYcqAo5hbRLlh7YJERwyU3R6L-VEg,3679
56
+ iotdb/utils/rpc_utils.py,sha256=3RlCaaVViiIAoU8fg47oTYJqYNZWQHJpLcGvUTuw4JM,5889
57
57
  tests/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
58
58
  tests/integration/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
59
59
  tests/integration/iotdb_container.py,sha256=nDBwiFwTETVisgVAOpjhECdHdgSfO8i_4k0wOrFmIU0,2551
@@ -70,7 +70,7 @@ tests/integration/test_tablemodel_insert.py,sha256=NMF4f-FzhAIDc8qLBxI8rZEtQjfs0
70
70
  tests/integration/test_tablemodel_query.py,sha256=Z5ORRj9I_b5lRkacT_7ktf6THweFutK2S1aYBwsz8JM,16862
71
71
  tests/integration/test_tablet.py,sha256=j6LQJKVAZ9elZdHrv8O-yeb3q9yNIXOdjCexJqlLE24,4434
72
72
  tests/integration/test_todf.py,sha256=OQMEEg8RAD0IG3YEg-NXZ2k4_CRcxnh6ykbeK-KXb_M,8126
73
- tests/integration/test_treemodel_insert.py,sha256=sMC7euFTenldcr-_qqvh_yp6HC6VKM6T26dQISZUuzI,195649
73
+ tests/integration/test_treemodel_insert.py,sha256=Td1pThwzjxg2JKSKKeMXsi9WYibDGa_eY9GlPRGajJo,195607
74
74
  tests/integration/dbapi/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
75
75
  tests/integration/dbapi/test_connection.py,sha256=FgM9Ama-YHcuZ-IaukAjoFcqnff9YEkAvVnXg9Y7AXg,1702
76
76
  tests/integration/dbapi/test_cursor.py,sha256=5pmvTMTfsBDn9hVbBEnbrB4Obknbx3zDHm2VA19yheQ,3956
@@ -78,8 +78,10 @@ tests/integration/sqlalchemy/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a
78
78
  tests/integration/sqlalchemy/test_dialect.py,sha256=HF2lJuV19l4Kfi7u3ZQ5vCFtu-xd3U8EFkgjXvJTi9o,3767
79
79
  tests/unit/__init__.py,sha256=vGVFsdMOp1iKaCQl5rfYcPVa0FV94d-a7MsMDQDhHMc,789
80
80
  tests/unit/test_numpy_tablet.py,sha256=w3lLK8Cft7lGsCj_6Z1Y7kDshltN0osSDJb-EESi6_Y,7235
81
- apache_iotdb-2.0.8.dist-info/METADATA,sha256=mMBr-RSBhUFlJcyFgAQHkIwgru3eCv5k8CDdBi_hgXQ,18769
82
- apache_iotdb-2.0.8.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
83
- apache_iotdb-2.0.8.dist-info/entry_points.txt,sha256=BmQWy6NHyWXorQcVm8-VWpt9MSqe46UFyV2hnsl4yok,73
84
- apache_iotdb-2.0.8.dist-info/top_level.txt,sha256=B9jGGOaAAqF1WrWw2jX2K-naWAZn2nhyrL-6hM1qwyM,12
85
- apache_iotdb-2.0.8.dist-info/RECORD,,
81
+ tests/unit/test_session_connection.py,sha256=W6anKyz30bhdeN8JqrEtPUIbQAlTTdQumr4NU54RBv0,3576
82
+ tests/unit/test_session_ssl.py,sha256=sGYz-9HxDNuJh2gfms58ASFYC7I54qAGj5vYFKyLdOQ,4764
83
+ apache_iotdb-2.0.11.dist-info/METADATA,sha256=7yRWAWxZbMWRe278pCtWgdJqDF92W6yDLe7NyhvVmM0,19628
84
+ apache_iotdb-2.0.11.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
85
+ apache_iotdb-2.0.11.dist-info/entry_points.txt,sha256=BmQWy6NHyWXorQcVm8-VWpt9MSqe46UFyV2hnsl4yok,73
86
+ apache_iotdb-2.0.11.dist-info/top_level.txt,sha256=B9jGGOaAAqF1WrWw2jX2K-naWAZn2nhyrL-6hM1qwyM,12
87
+ apache_iotdb-2.0.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
iotdb/Session.py CHANGED
@@ -87,6 +87,8 @@ class Session(object):
87
87
  use_ssl=False,
88
88
  ca_certs=None,
89
89
  connection_timeout_in_ms=None,
90
+ client_cert=None,
91
+ client_key=None,
90
92
  ):
91
93
  self.__host = host
92
94
  self.__port = port
@@ -117,6 +119,8 @@ class Session(object):
117
119
  self.database = None
118
120
  self.__use_ssl = use_ssl
119
121
  self.__ca_certs = ca_certs
122
+ self.__client_cert = client_cert
123
+ self.__client_key = client_key
120
124
  self.__connection_timeout_in_ms = connection_timeout_in_ms
121
125
  self.__time_precision = "ms"
122
126
 
@@ -132,6 +136,8 @@ class Session(object):
132
136
  use_ssl=False,
133
137
  ca_certs=None,
134
138
  connection_timeout_in_ms=None,
139
+ client_cert=None,
140
+ client_key=None,
135
141
  ):
136
142
  if node_urls is None:
137
143
  raise RuntimeError("node urls is empty")
@@ -145,6 +151,8 @@ class Session(object):
145
151
  enable_redirection,
146
152
  use_ssl=use_ssl,
147
153
  ca_certs=ca_certs,
154
+ client_cert=client_cert,
155
+ client_key=client_key,
148
156
  connection_timeout_in_ms=connection_timeout_in_ms,
149
157
  )
150
158
  session.__hosts = []
@@ -171,7 +179,7 @@ class Session(object):
171
179
  self.__default_connection = self.init_connection(
172
180
  self.__default_endpoint
173
181
  )
174
- except Exception as e:
182
+ except IoTDBConnectionException as e:
175
183
  if not self.reconnect():
176
184
  if str(e).startswith("Could not connect to any of"):
177
185
  error_msg = (
@@ -232,9 +240,12 @@ class Session(object):
232
240
  session_id = open_resp.sessionId
233
241
  statement_id = client.requestStatementId(session_id)
234
242
 
235
- except Exception as e:
243
+ except TTransport.TTransportException as e:
236
244
  transport.close()
237
245
  raise IoTDBConnectionException(e) from None
246
+ except Exception:
247
+ transport.close()
248
+ raise
238
249
 
239
250
  if self.__zone_id is not None:
240
251
  request = TSSetTimeZoneReq(session_id, self.__zone_id)
@@ -259,7 +270,21 @@ class Session(object):
259
270
  context = ssl.SSLContext(ssl.PROTOCOL_TLS)
260
271
  context.verify_mode = ssl.CERT_REQUIRED
261
272
  context.check_hostname = True
262
- context.load_verify_locations(cafile=self.__ca_certs)
273
+ context.load_default_certs(ssl.Purpose.SERVER_AUTH)
274
+ if self.__has_text(self.__ca_certs):
275
+ context.load_verify_locations(cafile=self.__ca_certs)
276
+ if self.__has_text(self.__client_cert) or self.__has_text(
277
+ self.__client_key
278
+ ):
279
+ if not self.__has_text(self.__client_cert) or not self.__has_text(
280
+ self.__client_key
281
+ ):
282
+ raise TTransport.TTransportException(
283
+ message="client_cert and client_key must be set together."
284
+ )
285
+ context.load_cert_chain(
286
+ certfile=self.__client_cert, keyfile=self.__client_key
287
+ )
263
288
  socket = TSSLSocket.TSSLSocket(
264
289
  host=endpoint.ip, port=endpoint.port, ssl_context=context
265
290
  )
@@ -275,6 +300,10 @@ class Session(object):
275
300
  raise IoTDBConnectionException(e) from None
276
301
  return transport
277
302
 
303
+ @staticmethod
304
+ def __has_text(value):
305
+ return value is not None and str(value).strip() != ""
306
+
278
307
  def is_open(self):
279
308
  return not self.__is_close
280
309
 
iotdb/SessionPool.py CHANGED
@@ -49,6 +49,8 @@ class PoolConfig(object):
49
49
  use_ssl: bool = False,
50
50
  ca_certs: str = None,
51
51
  connection_timeout_in_ms: int = None,
52
+ client_cert: str = None,
53
+ client_key: str = None,
52
54
  ):
53
55
  self.host = host
54
56
  self.port = port
@@ -68,6 +70,8 @@ class PoolConfig(object):
68
70
  self.enable_redirection = enable_redirection
69
71
  self.use_ssl = use_ssl
70
72
  self.ca_certs = ca_certs
73
+ self.client_cert = client_cert
74
+ self.client_key = client_key
71
75
  self.connection_timeout_in_ms = connection_timeout_in_ms
72
76
 
73
77
 
@@ -96,6 +100,8 @@ class SessionPool(object):
96
100
  enable_redirection=self.__pool_config.enable_redirection,
97
101
  use_ssl=self.__pool_config.use_ssl,
98
102
  ca_certs=self.__pool_config.ca_certs,
103
+ client_cert=self.__pool_config.client_cert,
104
+ client_key=self.__pool_config.client_key,
99
105
  connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
100
106
  )
101
107
  session.sql_dialect = self.sql_dialect
@@ -112,6 +118,8 @@ class SessionPool(object):
112
118
  enable_redirection=self.__pool_config.enable_redirection,
113
119
  use_ssl=self.__pool_config.use_ssl,
114
120
  ca_certs=self.__pool_config.ca_certs,
121
+ client_cert=self.__pool_config.client_cert,
122
+ client_key=self.__pool_config.client_key,
115
123
  connection_timeout_in_ms=self.__pool_config.connection_timeout_in_ms,
116
124
  )
117
125
  session.sql_dialect = self.sql_dialect
iotdb/dbapi/Connection.py CHANGED
@@ -37,12 +37,29 @@ class Connection(object):
37
37
  zone_id=Session.DEFAULT_ZONE_ID,
38
38
  enable_rpc_compression=False,
39
39
  sqlalchemy_mode=False,
40
+ use_ssl=False,
41
+ ca_certs=None,
42
+ connection_timeout_in_ms=None,
43
+ client_cert=None,
44
+ client_key=None,
40
45
  ):
41
- self.__session = Session(host, port, username, password, fetch_size, zone_id)
46
+ self.__session = Session(
47
+ host,
48
+ port,
49
+ username,
50
+ password,
51
+ fetch_size,
52
+ zone_id,
53
+ use_ssl=self.__to_bool(use_ssl),
54
+ ca_certs=ca_certs,
55
+ connection_timeout_in_ms=self.__to_optional_int(connection_timeout_in_ms),
56
+ client_cert=client_cert,
57
+ client_key=client_key,
58
+ )
42
59
  self.__sqlalchemy_mode = sqlalchemy_mode
43
60
  self.__is_close = True
44
61
  try:
45
- self.__session.open(enable_rpc_compression)
62
+ self.__session.open(self.__to_bool(enable_rpc_compression))
46
63
  self.__is_close = False
47
64
  except Exception as e:
48
65
  raise ConnectionError(e)
@@ -89,3 +106,17 @@ class Connection(object):
89
106
 
90
107
  def __exit__(self, exc_type, exc_val, exc_tb):
91
108
  self.close()
109
+
110
+ @staticmethod
111
+ def __to_bool(value):
112
+ if isinstance(value, bool):
113
+ return value
114
+ if isinstance(value, str):
115
+ return value.strip().lower() in ("true", "1", "yes", "y")
116
+ return bool(value)
117
+
118
+ @staticmethod
119
+ def __to_optional_int(value):
120
+ if value is None or value == "":
121
+ return None
122
+ return int(value)
iotdb/table_session.py CHANGED
@@ -38,6 +38,8 @@ class TableSessionConfig(object):
38
38
  use_ssl: bool = False,
39
39
  ca_certs: str = None,
40
40
  connection_timeout_in_ms: int = None,
41
+ client_cert: str = None,
42
+ client_key: str = None,
41
43
  ):
42
44
  """
43
45
  Initialize a TableSessionConfig object with the provided parameters.
@@ -71,6 +73,8 @@ class TableSessionConfig(object):
71
73
  self.enable_compression = enable_compression
72
74
  self.use_ssl = use_ssl
73
75
  self.ca_certs = ca_certs
76
+ self.client_cert = client_cert
77
+ self.client_key = client_key
74
78
  self.connection_timeout_in_ms = connection_timeout_in_ms
75
79
 
76
80
 
@@ -91,6 +95,8 @@ class TableSession(object):
91
95
  table_session_config.use_ssl,
92
96
  table_session_config.ca_certs,
93
97
  table_session_config.connection_timeout_in_ms,
98
+ client_cert=table_session_config.client_cert,
99
+ client_key=table_session_config.client_key,
94
100
  )
95
101
  self.__session.sql_dialect = "table"
96
102
  self.__session.database = table_session_config.database
@@ -37,6 +37,8 @@ class TableSessionPoolConfig(object):
37
37
  use_ssl: bool = False,
38
38
  ca_certs: str = None,
39
39
  connection_timeout_in_ms: int = None,
40
+ client_cert: str = None,
41
+ client_key: str = None,
40
42
  ):
41
43
  """
42
44
  Initialize a TableSessionPoolConfig object with the provided parameters.
@@ -77,6 +79,8 @@ class TableSessionPoolConfig(object):
77
79
  use_ssl=use_ssl,
78
80
  ca_certs=ca_certs,
79
81
  connection_timeout_in_ms=connection_timeout_in_ms,
82
+ client_cert=client_cert,
83
+ client_key=client_key,
80
84
  )
81
85
  self.max_pool_size = max_pool_size
82
86
  self.wait_timeout_in_ms = wait_timeout_in_ms
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.14.1)
2
+ # Autogenerated by Thrift Compiler (0.23.0)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -9,6 +9,7 @@
9
9
  from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
10
10
  from thrift.protocol.TProtocol import TProtocolException
11
11
  from thrift.TRecursive import fix_spec
12
+ from uuid import UUID
12
13
 
13
14
  import sys
14
15
  from .ttypes import *