qe-api-client 1.0.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.
@@ -0,0 +1,107 @@
1
+ class Structs:
2
+ def __init__(self):
3
+ pass
4
+
5
+ @staticmethod
6
+ def list_object_def(state_name="$", library_id="",
7
+ field_defs=None, field_labels=None,
8
+ sort_criterias=None, initial_data_fetch=None
9
+ ):
10
+ if initial_data_fetch is None:
11
+ initial_data_fetch = []
12
+ if sort_criterias is None:
13
+ sort_criterias = []
14
+ if field_labels is None:
15
+ field_labels = []
16
+ if field_defs is None:
17
+ field_defs = []
18
+ return {"qStateName": state_name,
19
+ "qLibraryId": library_id,
20
+ "qDef": {
21
+ "qFieldDefs": field_defs,
22
+ "qFieldLabels": field_labels,
23
+ "qSortCriterias": sort_criterias
24
+ },
25
+ "qInitialDataFetch": initial_data_fetch
26
+ }
27
+
28
+ @staticmethod
29
+ def hypercube_def(state_name="$", nx_dims=[],
30
+ nx_meas=[], nx_page=[],
31
+ inter_column_sort=[0, 1, 2], suppress_zero=False,
32
+ suppress_missing=False
33
+ ):
34
+ return {"qStateName": state_name,
35
+ "qDimensions": nx_dims, # NxDimensions
36
+ "qMeasures": nx_meas, # NxMeasure
37
+ "qInterColumnSortOrder": inter_column_sort,
38
+ "qSuppressZero": suppress_zero,
39
+ "qSuppressMissing": suppress_missing,
40
+ "qInitialDataFetch": nx_page, # NxPage
41
+ "qMode": 'S',
42
+ "qNoOfLeftDims": -1,
43
+ "qAlwaysFullyExpanded": False,
44
+ "qMaxStackedCells": 5000,
45
+ "qPopulateMissing": False,
46
+ "qShowTotalsAbove": False,
47
+ "qIndentMode": False,
48
+ "qCalcCond": "",
49
+ "qSortbyYValue": 0
50
+ }
51
+
52
+ @staticmethod
53
+ def nx_hypercube_dimensions(dim_def):
54
+ return {"qLibraryId": "",
55
+ "qNullSuppression": False,
56
+ "qDef": dim_def
57
+ }
58
+
59
+ @staticmethod
60
+ def nx_inline_dimension_def(field_definitions=[],
61
+ grouping='N',
62
+ field_labels=[]
63
+ ):
64
+ return {"qGrouping": grouping,
65
+ "qFieldDefs": field_definitions,
66
+ "qFieldLabels": field_labels
67
+ }
68
+
69
+ @staticmethod
70
+ def nx_hypercube_measure(sort_by={}, nx_inline_measures_def=""):
71
+ return {"qSortBy": sort_by,
72
+ "qDef": nx_inline_measures_def
73
+ }
74
+
75
+ @staticmethod
76
+ def nx_sort_by(state=0, freq=0, numeric=0, ascii=0, load_order=1):
77
+ return {"qSortByState": state,
78
+ "qSortByFrequency": freq,
79
+ "qSortByNumeric": numeric,
80
+ "qSortByAscii": ascii,
81
+ "qSortByLoadOrder": load_order,
82
+ "qSortByExpression": 0,
83
+ "qExpression": {
84
+ "qv": ""
85
+ }
86
+ }
87
+
88
+ @staticmethod
89
+ def nx_inline_measure_def(definition, label="",
90
+ description="",
91
+ tags=[],
92
+ grouping="N"
93
+ ):
94
+ return {"qLabel": label,
95
+ "qDescription": description,
96
+ "qTags": tags,
97
+ "qGrouping": grouping,
98
+ "qDef": definition
99
+ }
100
+
101
+ @staticmethod
102
+ def nx_page(top=0, left=0, height=2, width=2):
103
+ return {"qTop": top,
104
+ "qLeft": left,
105
+ "qHeight": height,
106
+ "qWidth": width
107
+ }
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2018 The Python Packaging Authority
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.1
2
+ Name: qe-api-client
3
+ Version: 1.0.0
4
+ Summary: Python wrapper around Qlik Engine JSON API
5
+ Home-page: https://github.com/lr-bicc/qe-api-client
6
+ Author: Rumen Vasilev
7
+ Author-email: R.Vasilev@LRWorld.com
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.6
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: websocket-client >=0.47.0
15
+
16
+ # pyqlikengine
17
+
18
+ Python wrapper around [Qlik Engine JSON API](https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineAPI/Content/Sense_EngineAPI/introducing-engine-API.htm)
19
+
20
+ Forked from [jhettler/pyqlikengine](https://github.com/jhettler/pyqlikengine)
21
+
22
+ ## Requirements
23
+ * Python 3.6+
24
+ * websocket-client>=0.47.0
25
+
26
+ ## Example of usage
27
+ ```bash
28
+ pip install qe-api-client
29
+ ```
30
+ ```python
31
+ from qe_api_client.engine import QixEngine
32
+
33
+ url = 'qlik-1.ad.xxx.xxx'
34
+ user_directory = 'UserDomainToQlikLogin'
35
+ user_id = 'sense'
36
+ ca_certs = 'qlik_certs/qlik-1_root.pem'
37
+ certfile = 'qlik_certs/qlik-1_client.pem'
38
+ keyfile = 'qlik_certs/qlik-1_client_key.pem'
39
+ qixe = QixEngine(url=url, user_directory=user_directory,
40
+ user_id=user_id, ca_certs=ca_certs,
41
+ certfile=certfile, keyfile=keyfile)
42
+
43
+ # print all apps in Qlik Server
44
+ print(qixe.ega.get_doc_list())
45
+ ```
@@ -0,0 +1,14 @@
1
+ qe_api_client/__init__.py,sha256=bypB4CIjpHtf5Pu_NwtJajC69zqQD7qB9jo8cCX0B54,23
2
+ qe_api_client/engine.py,sha256=OKYxlPh4ley5g4ATfOqLxycg-ysAGiT5F1A0Ub8JAK4,6797
3
+ qe_api_client/engine_app_api.py,sha256=_BE39CeNhe9j5wChMdObgz7-3WSKSYF9yx-nixpfzkw,40267
4
+ qe_api_client/engine_communicator.py,sha256=Va8Kz4cN6uyKLzV3JllBw08KbU4uDn8e-5pIm5Kmsfs,1291
5
+ qe_api_client/engine_field_api.py,sha256=L9a6sqQNmtoi8fnZfLBewbflbGg5RRA1CfCXkejnuNw,3166
6
+ qe_api_client/engine_generic_object_api.py,sha256=s0yIqDhaWkRzNYQDDTYQKJkuEevl9xVaPnBT7uxBinc,4128
7
+ qe_api_client/engine_global_api.py,sha256=CTHsmA-QG6Hoq_XOEJGQTg0ddslkG9s1f0Zzc8a9e54,20831
8
+ qe_api_client/engine_helper.py,sha256=gxaTFU06YMGwXloxv3Sku6PbhDmTw_jEZdX9w-gfw5c,2337
9
+ qe_api_client/structs.py,sha256=YHxIurQjmWWEZ-F3kZ_kQHkoWiVAqCpZB7k6hlioOxU,3709
10
+ qe_api_client-1.0.0.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
11
+ qe_api_client-1.0.0.dist-info/METADATA,sha256=GoPkVED7pdyfB9gvlg2qfwPSTyCMPffoh8zAJIpzXrY,1376
12
+ qe_api_client-1.0.0.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
13
+ qe_api_client-1.0.0.dist-info/top_level.txt,sha256=m_43YagP8UtZgJHmZEfu0vlBNwt36M01-Qby2jByMnk,14
14
+ qe_api_client-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (70.1.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ qe_api_client