qe-api-client 2.4.0__tar.gz → 2.6.0__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.
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/PKG-INFO +5 -4
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/README.md +1 -1
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_app_api.py +3 -13
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_dimension_api.py +3 -3
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_measure_api.py +3 -3
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_object_api.py +35 -5
- qe_api_client-2.6.0/qe_api_client/engine.py +1081 -0
- qe_api_client-2.6.0/qe_api_client/structs.py +435 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client.egg-info/PKG-INFO +5 -4
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/setup.py +2 -2
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_api.py +1 -1
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_app_api.py +2 -2
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_labs.py +1 -1
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_pyqlikengine.py +7 -7
- qe_api_client-2.4.0/qe_api_client/engine.py +0 -383
- qe_api_client-2.4.0/qe_api_client/structs.py +0 -78
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/LICENSE +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/__init__.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/__init__.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_field_api.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_variable_api.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_global_api.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/engine_communicator.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client.egg-info/SOURCES.txt +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client.egg-info/dependency_links.txt +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client.egg-info/requires.txt +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client.egg-info/top_level.txt +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/setup.cfg +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_chart_content.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_field_api.py +0 -0
- {qe_api_client-2.4.0 → qe_api_client-2.6.0}/test/test_global_api.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: qe-api-client
|
3
|
-
Version: 2.
|
4
|
-
Summary: Python
|
3
|
+
Version: 2.6.0
|
4
|
+
Summary: Python client for the Qlik Engine JSON API
|
5
5
|
Home-page: https://github.com/lr-bicc/qe-api-client
|
6
6
|
Author: Rumen Vasilev
|
7
7
|
Author-email: R.Vasilev@LRWorld.com
|
@@ -19,13 +19,14 @@ Dynamic: classifier
|
|
19
19
|
Dynamic: description
|
20
20
|
Dynamic: description-content-type
|
21
21
|
Dynamic: home-page
|
22
|
+
Dynamic: license-file
|
22
23
|
Dynamic: requires-dist
|
23
24
|
Dynamic: requires-python
|
24
25
|
Dynamic: summary
|
25
26
|
|
26
27
|
# Qlik Engine API Client
|
27
28
|
|
28
|
-
Python
|
29
|
+
Python client for the [Qlik Engine JSON API](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineAPI/Content/Sense_EngineAPI/introducing-engine-API.htm)
|
29
30
|
|
30
31
|
Forked from [jhettler/pyqlikengine](https://github.com/jhettler/pyqlikengine)
|
31
32
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Qlik Engine API Client
|
2
2
|
|
3
|
-
Python
|
3
|
+
Python client for the [Qlik Engine JSON API](https://help.qlik.com/en-US/sense-developer/November2024/Subsystems/EngineAPI/Content/Sense_EngineAPI/introducing-engine-API.htm)
|
4
4
|
|
5
5
|
Forked from [jhettler/pyqlikengine](https://github.com/jhettler/pyqlikengine)
|
6
6
|
|
@@ -115,18 +115,18 @@ class EngineAppApi:
|
|
115
115
|
except KeyError:
|
116
116
|
return response['error']
|
117
117
|
|
118
|
-
def get_object(self,
|
118
|
+
def get_object(self, app_handle, object_id):
|
119
119
|
"""
|
120
120
|
Retrieves a specific object from the app identified by the document handle.
|
121
121
|
|
122
122
|
Parameters:
|
123
|
-
|
123
|
+
app_handle (int): The handle identifying the app document.
|
124
124
|
object_id (str): The ID of the object to retrieve.
|
125
125
|
|
126
126
|
Returns:
|
127
127
|
dict: The retrieved object (qReturn). In case of an error, returns the error information.
|
128
128
|
"""
|
129
|
-
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle":
|
129
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": app_handle, "method": "GetObject",
|
130
130
|
"params": {"qId": object_id}})
|
131
131
|
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
132
132
|
try:
|
@@ -556,16 +556,6 @@ class EngineAppApi:
|
|
556
556
|
except KeyError:
|
557
557
|
return response['error']
|
558
558
|
|
559
|
-
# GetDimension: Get the handle of a dimension by using the GetDimension method. # NOQA
|
560
|
-
# Parameter: dimension id
|
561
|
-
def get_dimension(self, doc_handle, dim_id):
|
562
|
-
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": doc_handle, "method": "GetDimension",
|
563
|
-
"params": [dim_id]})
|
564
|
-
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
565
|
-
try:
|
566
|
-
return response['result']['qReturn']
|
567
|
-
except KeyError:
|
568
|
-
return response['error']
|
569
559
|
|
570
560
|
# GetEmptyScript: Creates a script that contains one section. This section contains Set statements that give # NOQA
|
571
561
|
# localized information from the regional settings of the computer.
|
@@ -18,18 +18,18 @@ class EngineGenericDimensionApi:
|
|
18
18
|
"""
|
19
19
|
self.engine_socket = socket
|
20
20
|
|
21
|
-
def get_dimension(self,
|
21
|
+
def get_dimension(self, app_handle: int, dimension_id: str):
|
22
22
|
"""
|
23
23
|
Retrieves the definition of a specific dimension from the Qlik Sense engine.
|
24
24
|
|
25
25
|
Parameters:
|
26
|
-
|
26
|
+
app_handle (int): The handle identifying the application.
|
27
27
|
dimension_id (str): The unique identifier (qId) of the dimension to retrieve.
|
28
28
|
|
29
29
|
Returns:
|
30
30
|
dict: The definition of the requested dimension (qReturn). In case of an error, returns the error information.
|
31
31
|
"""
|
32
|
-
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle":
|
32
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": app_handle, "method": "GetDimension",
|
33
33
|
"params": {"qId": dimension_id}})
|
34
34
|
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
35
35
|
try:
|
{qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_measure_api.py
RENAMED
@@ -18,18 +18,18 @@ class EngineGenericMeasureApi:
|
|
18
18
|
"""
|
19
19
|
self.engine_socket = socket
|
20
20
|
|
21
|
-
def get_measure(self,
|
21
|
+
def get_measure(self, app_handle: int, measure_id: str):
|
22
22
|
"""
|
23
23
|
Retrieves the definition of a specific measure from the Qlik Sense engine.
|
24
24
|
|
25
25
|
Parameters:
|
26
|
-
|
26
|
+
app_handle (int): The handle identifying the application.
|
27
27
|
measure_id (str): The unique identifier (qId) of the measure to retrieve.
|
28
28
|
|
29
29
|
Returns:
|
30
30
|
dict: The definition of the requested measure (qReturn). In case of an error, returns the error information.
|
31
31
|
"""
|
32
|
-
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle":
|
32
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": app_handle, "method": "GetMeasure", "params": {"qId": measure_id}})
|
33
33
|
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
34
34
|
try:
|
35
35
|
return response["result"]["qReturn"]
|
{qe_api_client-2.4.0 → qe_api_client-2.6.0}/qe_api_client/api_classes/engine_generic_object_api.py
RENAMED
@@ -24,24 +24,54 @@ class EngineGenericObjectApi:
|
|
24
24
|
socket (object): The socket connection to the Qlik Sense engine.
|
25
25
|
"""
|
26
26
|
self.engine_socket = socket
|
27
|
-
|
27
|
+
|
28
|
+
def apply_patches(self, handle: int, patches: list, soft_patch: bool = False):
|
28
29
|
"""
|
29
|
-
|
30
|
+
Applies a patch to the properties of an object. Allows an update to some of the properties. It is possible to
|
31
|
+
apply a patch to the properties of a generic object, that is not persistent. Such a patch is called a soft patch.
|
32
|
+
In that case, the result of the operation on the properties (add, remove or delete) is not shown when doing
|
33
|
+
GetProperties, and only a GetLayout call shows the result of the operation. Properties that are not persistent
|
34
|
+
are called soft properties. Once the engine session is over, soft properties are cleared. It should not be
|
35
|
+
possible to patch "/qInfo/qId", and it will be forbidden in the near future.
|
30
36
|
|
31
37
|
Parameters:
|
32
38
|
handle (int): The handle identifying the generic object.
|
33
|
-
|
39
|
+
patches (list): List of patches.
|
40
|
+
soft_patch (bool, optional): If set to true, it means that the properties to be applied are not persistent.
|
41
|
+
The patch is a soft patch. The default value is false.
|
34
42
|
|
35
43
|
Returns:
|
36
|
-
dict:
|
44
|
+
dict: Operation succeeded.
|
37
45
|
"""
|
38
|
-
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": handle, "method": "
|
46
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": handle, "method": "ApplyPatches",
|
47
|
+
"params": {"qPatches": patches, "qSoftPatch": soft_patch}})
|
39
48
|
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
40
49
|
try:
|
41
50
|
return response["result"]
|
42
51
|
except KeyError:
|
43
52
|
return response["error"]
|
44
53
|
|
54
|
+
def create_child(self, handle: int, prop: dict, prop_for_this: dict = None):
|
55
|
+
"""
|
56
|
+
Creates a generic object that is a child of another generic object.
|
57
|
+
|
58
|
+
Parameters:
|
59
|
+
handle (int): The handle identifying the generic object.
|
60
|
+
prop (dict): Information about the child. It is possible to create a child that is linked to another object.
|
61
|
+
prop_for_this (dict, optional): Identifier of the parent's object. Should be set to update the properties of
|
62
|
+
the parent's object at the same time the child is created.
|
63
|
+
|
64
|
+
Returns:
|
65
|
+
dict: The layout structure of the generic object (qLayout). In case of an error, returns the error information.
|
66
|
+
"""
|
67
|
+
msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": handle, "method": "CreateChild",
|
68
|
+
"params": {"qProp": prop, "qPropForThis": prop_for_this}})
|
69
|
+
response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
|
70
|
+
try:
|
71
|
+
return response["result"]["qReturn"]
|
72
|
+
except KeyError:
|
73
|
+
return response["error"]
|
74
|
+
|
45
75
|
def get_layout(self, handle):
|
46
76
|
"""
|
47
77
|
Retrieves the layout structure of a specific generic object.
|