qe-api-client 2.3.0__py3-none-any.whl → 2.4.0__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.
- qe_api_client/api_classes/engine_app_api.py +19 -0
- qe_api_client/engine_communicator.py +4 -13
- qe_api_client/structs.py +6 -1
- {qe_api_client-2.3.0.dist-info → qe_api_client-2.4.0.dist-info}/METADATA +13 -3
- {qe_api_client-2.3.0.dist-info → qe_api_client-2.4.0.dist-info}/RECORD +8 -8
- {qe_api_client-2.3.0.dist-info → qe_api_client-2.4.0.dist-info}/WHEEL +1 -1
- {qe_api_client-2.3.0.dist-info → qe_api_client-2.4.0.dist-info}/LICENSE +0 -0
- {qe_api_client-2.3.0.dist-info → qe_api_client-2.4.0.dist-info}/top_level.txt +0 -0
@@ -708,5 +708,24 @@ class EngineAppApi:
|
|
708
708
|
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
709
709
|
try:
|
710
710
|
return response['result']
|
711
|
+
except KeyError:
|
712
|
+
return response['error']
|
713
|
+
|
714
|
+
def get_variable_by_id(self, doc_handle, variable_id):
|
715
|
+
"""
|
716
|
+
Gets the handle of a variable.
|
717
|
+
|
718
|
+
Parameters:
|
719
|
+
doc_handle (int): The handle identifying the document.
|
720
|
+
variable_id (str): The id of the variable.
|
721
|
+
|
722
|
+
Returns:
|
723
|
+
dict: The handle of the generic variable.
|
724
|
+
"""
|
725
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": doc_handle, "method": "GetVariableById",
|
726
|
+
"params": {"qId": variable_id}})
|
727
|
+
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
728
|
+
try:
|
729
|
+
return response['result']['qReturn']
|
711
730
|
except KeyError:
|
712
731
|
return response['error']
|
@@ -22,21 +22,12 @@ class EngineCommunicator:
|
|
22
22
|
|
23
23
|
class SecureEngineCommunicator(EngineCommunicator):
|
24
24
|
|
25
|
-
def __init__(self, url, user_directory,
|
26
|
-
user_id, ca_certs, certfile,
|
27
|
-
keyfile, app_id=None
|
28
|
-
):
|
25
|
+
def __init__(self, url, user_directory, user_id, ca_certs, certfile, keyfile, app_id=None):
|
29
26
|
self.url = "wss://" + url + ":4747/app/" + str(app_id)
|
30
|
-
certs = ({"ca_certs": ca_certs,
|
31
|
-
"
|
32
|
-
"keyfile": keyfile,
|
33
|
-
"cert_reqs": ssl.CERT_NONE,
|
34
|
-
"server_side": False
|
35
|
-
})
|
27
|
+
certs = ({"ca_certs": ca_certs, "certfile": certfile, "keyfile": keyfile, "cert_reqs": ssl.CERT_NONE,
|
28
|
+
"server_side": False})
|
36
29
|
|
37
30
|
ssl.match_hostname = lambda cert, hostname: True
|
38
31
|
header = f'X-Qlik-User: UserDirectory={user_directory}; UserId={user_id}' # NOQA
|
39
|
-
self.ws = create_connection(
|
40
|
-
self.url, sslopt=certs,
|
41
|
-
cookie=None, header={header})
|
32
|
+
self.ws = create_connection(self.url, sslopt=certs, cookie=None, header={header})
|
42
33
|
self.session = self.ws.recv()
|
qe_api_client/structs.py
CHANGED
@@ -70,4 +70,9 @@ def generic_measure_properties(info, lb_meas_def, meas_title):
|
|
70
70
|
|
71
71
|
def do_reload_ex_params(mode=0, partial=False, debug=False, reload_id="", skip_store=False, row_limit=0):
|
72
72
|
return {"qMode": mode, "qPartial": partial, "qDebug": debug, "qReloadId": reload_id, "qSkipStore": skip_store,
|
73
|
-
"qRowLimit": row_limit}
|
73
|
+
"qRowLimit": row_limit}
|
74
|
+
|
75
|
+
def dimension_list_def():
|
76
|
+
return {"qInfo": {"qType": "DimensionList"},
|
77
|
+
"qDimensionListDef": {"qType": "dimension",
|
78
|
+
"qData": {"title": "/title", "tags": "/tags", "grouping": "/qDim/qGrouping", "info": "/qDimInfos"}}}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: qe-api-client
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.4.0
|
4
4
|
Summary: Python wrapper around Qlik Engine JSON API
|
5
5
|
Home-page: https://github.com/lr-bicc/qe-api-client
|
6
6
|
Author: Rumen Vasilev
|
@@ -11,7 +11,17 @@ Classifier: Operating System :: OS Independent
|
|
11
11
|
Requires-Python: >=3.6
|
12
12
|
Description-Content-Type: text/markdown
|
13
13
|
License-File: LICENSE
|
14
|
-
Requires-Dist: websocket-client
|
14
|
+
Requires-Dist: websocket-client>=0.47.0
|
15
|
+
Requires-Dist: pandas>=2.2.0
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: author-email
|
18
|
+
Dynamic: classifier
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: home-page
|
22
|
+
Dynamic: requires-dist
|
23
|
+
Dynamic: requires-python
|
24
|
+
Dynamic: summary
|
15
25
|
|
16
26
|
# Qlik Engine API Client
|
17
27
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
qe_api_client/__init__.py,sha256=bypB4CIjpHtf5Pu_NwtJajC69zqQD7qB9jo8cCX0B54,23
|
2
2
|
qe_api_client/engine.py,sha256=SCTjKlhtir2kOMNDnfwd1Cz-Su6xxDk79GBUtAMgSpU,16900
|
3
|
-
qe_api_client/engine_communicator.py,sha256=
|
4
|
-
qe_api_client/structs.py,sha256=
|
3
|
+
qe_api_client/engine_communicator.py,sha256=q6x7ix2Ev8yGmTTm7cf1vHcidOihKM0HjDXeJ-dZYjk,1133
|
4
|
+
qe_api_client/structs.py,sha256=eZw-M9QBhZe_lHxjMcWU5TJVi18G43FhCMMGzjdJxAk,4502
|
5
5
|
qe_api_client/api_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
qe_api_client/api_classes/engine_app_api.py,sha256=
|
6
|
+
qe_api_client/api_classes/engine_app_api.py,sha256=H0CF-BwSUi1ZpZo7pyQg736jsdKm5biShVcELun9jwY,38021
|
7
7
|
qe_api_client/api_classes/engine_field_api.py,sha256=zCLIR7rmxqwIrJYK_-uHVEhMvBcEP2qofuX8ZPygqCA,5479
|
8
8
|
qe_api_client/api_classes/engine_generic_dimension_api.py,sha256=1joTET6GWCTW-80wafrajLQuMyFwIPp0QKoILyLdP1U,1377
|
9
9
|
qe_api_client/api_classes/engine_generic_measure_api.py,sha256=zbRYRA99LQS9SY3QVgoUABqgVDRPwBQ8o2ZbESVEsHE,1321
|
10
10
|
qe_api_client/api_classes/engine_generic_object_api.py,sha256=nqsEtvKkt5XkUEIVUoBtNVXtmUvuifxrgTcw2fDuaOE,8218
|
11
11
|
qe_api_client/api_classes/engine_generic_variable_api.py,sha256=sWXZpE-GLfcMijmfORnDNrJ6lmXX3x5TRHlkEu_i0BQ,2027
|
12
12
|
qe_api_client/api_classes/engine_global_api.py,sha256=G6QQHI36WOo7W25zg4Uz__gMSLC2ptNTvbBdElPzgZI,27535
|
13
|
-
qe_api_client-2.
|
14
|
-
qe_api_client-2.
|
15
|
-
qe_api_client-2.
|
16
|
-
qe_api_client-2.
|
17
|
-
qe_api_client-2.
|
13
|
+
qe_api_client-2.4.0.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
14
|
+
qe_api_client-2.4.0.dist-info/METADATA,sha256=uXwa8Jwcq9-w4r0o0CbET_lwWPM87WLY1PwxUkJYBNo,2363
|
15
|
+
qe_api_client-2.4.0.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
16
|
+
qe_api_client-2.4.0.dist-info/top_level.txt,sha256=m_43YagP8UtZgJHmZEfu0vlBNwt36M01-Qby2jByMnk,14
|
17
|
+
qe_api_client-2.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|