qe-api-client 2.3.0__tar.gz → 2.5.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.
Files changed (31) hide show
  1. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/PKG-INFO +13 -3
  2. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_app_api.py +19 -10
  3. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_generic_dimension_api.py +3 -3
  4. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_generic_measure_api.py +3 -3
  5. qe_api_client-2.5.0/qe_api_client/engine.py +686 -0
  6. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/engine_communicator.py +4 -13
  7. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/structs.py +59 -10
  8. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client.egg-info/PKG-INFO +13 -3
  9. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client.egg-info/SOURCES.txt +3 -0
  10. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client.egg-info/requires.txt +1 -0
  11. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/setup.py +4 -3
  12. qe_api_client-2.5.0/test/test.py +43 -0
  13. qe_api_client-2.5.0/test/test_api.py +52 -0
  14. qe_api_client-2.5.0/test/test_chart_content.py +17 -0
  15. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/test/test_labs.py +1 -1
  16. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/test/test_pyqlikengine.py +7 -7
  17. qe_api_client-2.3.0/qe_api_client/engine.py +0 -383
  18. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/LICENSE +0 -0
  19. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/README.md +0 -0
  20. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/__init__.py +0 -0
  21. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/__init__.py +0 -0
  22. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_field_api.py +0 -0
  23. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_generic_object_api.py +0 -0
  24. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_generic_variable_api.py +0 -0
  25. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client/api_classes/engine_global_api.py +0 -0
  26. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client.egg-info/dependency_links.txt +0 -0
  27. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/qe_api_client.egg-info/top_level.txt +0 -0
  28. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/setup.cfg +0 -0
  29. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/test/test_app_api.py +0 -0
  30. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/test/test_field_api.py +0 -0
  31. {qe_api_client-2.3.0 → qe_api_client-2.5.0}/test/test_global_api.py +0 -0
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: qe-api-client
3
- Version: 2.3.0
4
- Summary: Python wrapper around Qlik Engine JSON API
3
+ Version: 2.5.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
@@ -12,6 +12,16 @@ Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
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
 
@@ -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.
@@ -708,5 +698,24 @@ class EngineAppApi:
708
698
  response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
709
699
  try:
710
700
  return response['result']
701
+ except KeyError:
702
+ return response['error']
703
+
704
+ def get_variable_by_id(self, doc_handle, variable_id):
705
+ """
706
+ Gets the handle of a variable.
707
+
708
+ Parameters:
709
+ doc_handle (int): The handle identifying the document.
710
+ variable_id (str): The id of the variable.
711
+
712
+ Returns:
713
+ dict: The handle of the generic variable.
714
+ """
715
+ msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": doc_handle, "method": "GetVariableById",
716
+ "params": {"qId": variable_id}})
717
+ response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
718
+ try:
719
+ return response['result']['qReturn']
711
720
  except KeyError:
712
721
  return response['error']
@@ -18,18 +18,18 @@ class EngineGenericDimensionApi:
18
18
  """
19
19
  self.engine_socket = socket
20
20
 
21
- def get_dimension(self, handle, dimension_id):
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
- handle (int): The handle identifying the dimension object.
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": handle, "method": "GetDimension",
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:
@@ -18,18 +18,18 @@ class EngineGenericMeasureApi:
18
18
  """
19
19
  self.engine_socket = socket
20
20
 
21
- def get_measure(self, handle, measure_id):
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
- handle (int): The handle identifying the measure object.
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": handle, "method": "GetMeasure", "params": {"qId": measure_id}})
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"]