qe-api-client 2.5.0__py3-none-any.whl → 2.7.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 +3 -3
- qe_api_client/api_classes/engine_generic_dimension_api.py +19 -0
- qe_api_client/api_classes/engine_generic_object_api.py +35 -5
- qe_api_client/engine.py +504 -18
- qe_api_client/structs.py +453 -34
- {qe_api_client-2.5.0.dist-info → qe_api_client-2.7.0.dist-info}/METADATA +4 -3
- qe_api_client-2.7.0.dist-info/RECORD +17 -0
- {qe_api_client-2.5.0.dist-info → qe_api_client-2.7.0.dist-info}/WHEEL +1 -1
- qe_api_client-2.5.0.dist-info/RECORD +0 -17
- {qe_api_client-2.5.0.dist-info → qe_api_client-2.7.0.dist-info/licenses}/LICENSE +0 -0
- {qe_api_client-2.5.0.dist-info → qe_api_client-2.7.0.dist-info}/top_level.txt +0 -0
qe_api_client/structs.py
CHANGED
@@ -1,27 +1,138 @@
|
|
1
|
-
|
2
|
-
return {"qStateName": state_name, "qLibraryId": library_id, "qDef": field_defs,
|
3
|
-
"qInitialDataFetch": initial_data_fetch}
|
1
|
+
import uuid
|
4
2
|
|
5
3
|
|
6
|
-
def
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
4
|
+
def list_object_def(state_name: str = "$", library_id: str = "", definition: dict = None,
|
5
|
+
auto_sort_by_state: dict = None, frequency_mode: str = "N", show_alternatives: bool = False,
|
6
|
+
initial_data_fetch: list = None, expressions: list = None,
|
7
|
+
direct_query_simplified_view: bool = False, show_titles: bool = True, title: str = "",
|
8
|
+
subtitle: str = "", footnote: str = "", disable_nav_menu: bool = False, show_details: bool = True,
|
9
|
+
show_details_expression: bool = False, other_total_spec: dict = None):
|
10
|
+
if other_total_spec is None:
|
11
|
+
other_total_spec = {}
|
12
|
+
if expressions is None:
|
13
|
+
expressions = []
|
14
|
+
if initial_data_fetch is None:
|
15
|
+
initial_data_fetch = []
|
16
|
+
if auto_sort_by_state is None:
|
17
|
+
auto_sort_by_state = {}
|
18
|
+
if definition is None:
|
19
|
+
definition = {}
|
20
|
+
return {
|
21
|
+
"qStateName": state_name, "qLibraryId": library_id, "qDef": definition,
|
22
|
+
"qAutoSortByState": auto_sort_by_state, "qFrequencyMode": frequency_mode,
|
23
|
+
"qShowAlternatives": show_alternatives, "qInitialDataFetch": initial_data_fetch,
|
24
|
+
"qExpressions": expressions, "qDirectQuerySimplifiedView": direct_query_simplified_view,
|
25
|
+
"showTitles": show_titles, "title": title, "subtitle": subtitle, "footnote": footnote,
|
26
|
+
"disableNavMenu": disable_nav_menu, "showDetails": show_details,
|
27
|
+
"showDetailsExpression": show_details_expression, "qOtherTotalSpec": other_total_spec
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
def hypercube_def(
|
32
|
+
state_name: str = "", dimensions: list = None, measures: list = None, inter_column_sort_order: list = None,
|
33
|
+
suppress_zero: bool = False, suppress_missing: bool = False, initial_data_fetch: list = None,
|
34
|
+
reduction_mode: str = "N", mode: str = "S", pseudo_dim_pos: int = -1, no_of_left_dims: int = -1,
|
35
|
+
always_fully_expanded: bool = False, max_stacked_cells: int = 5000, populate_missing: bool = False,
|
36
|
+
show_totals_above: bool = False, indent_mode: bool = False, calc_cond: dict = None, sort_by_y_value: int = 0,
|
37
|
+
title: dict = None, calc_condition: dict = None, column_order: list = None, expansion_state: list = None,
|
38
|
+
dynamic_script: list = None, context_set_expression: str = "", suppress_measure_totals: bool = False,
|
39
|
+
column_widths: list = None
|
40
|
+
):
|
41
|
+
|
42
|
+
if column_widths is None:
|
43
|
+
column_widths = []
|
44
|
+
if dynamic_script is None:
|
45
|
+
dynamic_script = []
|
46
|
+
if expansion_state is None:
|
47
|
+
expansion_state = []
|
48
|
+
if column_order is None:
|
49
|
+
column_order = []
|
50
|
+
if calc_condition is None:
|
51
|
+
calc_condition = nx_calc_cond()
|
52
|
+
if title is None:
|
53
|
+
title = string_expr()
|
54
|
+
if calc_cond is None:
|
55
|
+
calc_cond = value_expr()
|
56
|
+
if initial_data_fetch is None:
|
57
|
+
initial_data_fetch = [nx_page()]
|
58
|
+
if inter_column_sort_order is None:
|
59
|
+
inter_column_sort_order = []
|
60
|
+
if measures is None:
|
61
|
+
measures = []
|
62
|
+
if dimensions is None:
|
63
|
+
dimensions = []
|
64
|
+
|
65
|
+
return {
|
66
|
+
"qStateName": state_name, "qDimensions": dimensions, "qMeasures": measures,
|
67
|
+
"qInterColumnSortOrder": inter_column_sort_order, "qSuppressZero": suppress_zero,
|
68
|
+
"qSuppressMissing": suppress_missing, "qInitialDataFetch": initial_data_fetch,
|
69
|
+
"qReductionMode": reduction_mode, "qMode": mode, "qPseudoDimPos": pseudo_dim_pos,
|
70
|
+
"qNoOfLeftDims": no_of_left_dims, "qAlwaysFullyExpanded": always_fully_expanded,
|
71
|
+
"qMaxStackedCells": max_stacked_cells, "qPopulateMissing": populate_missing,
|
72
|
+
"qShowTotalsAbove": show_totals_above, "qIndentMode": indent_mode, "qCalcCond": calc_cond,
|
73
|
+
"qSortbyYValue": sort_by_y_value, "qTitle": title, "qCalcCondition": calc_condition,
|
74
|
+
"qColumnOrder": column_order, "qExpansionState": expansion_state, "qDynamicScript": dynamic_script,
|
75
|
+
"qContextSetExpression": context_set_expression, "qSuppressMeasureTotals": suppress_measure_totals,
|
76
|
+
"columnOrder": column_order, "columnWidths": column_widths
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
def nx_inline_dimension_def(
|
81
|
+
grouping: str = "N", field_definitions: list = None, field_labels: list = None, sort_criterias: list = None,
|
82
|
+
number_presentations: list = None, reverse_sort: bool = False, active_field: int = 0, label_expression: str = "",
|
83
|
+
alias: str = "", auto_sort: bool = True, id = None, others_label: str = "Others", _text_align: dict = None
|
84
|
+
):
|
85
|
+
|
86
|
+
if _text_align is None:
|
87
|
+
_text_align = text_align()
|
88
|
+
if id is None:
|
89
|
+
id = str(uuid.uuid4())
|
90
|
+
if number_presentations is None:
|
91
|
+
number_presentations = []
|
92
|
+
if sort_criterias is None:
|
93
|
+
sort_criterias = [sort_criteria()]
|
94
|
+
if field_labels is None:
|
95
|
+
field_labels = []
|
96
|
+
if field_definitions is None:
|
97
|
+
field_definitions = []
|
18
98
|
|
99
|
+
return {
|
100
|
+
"qGrouping": grouping, "qFieldDefs": field_definitions, "qFieldLabels": field_labels,
|
101
|
+
"qSortCriterias": sort_criterias, "qNumberPresentations": number_presentations, "qReverseSort": reverse_sort,
|
102
|
+
"qActiveField": active_field, "qLabelExpression": label_expression, "qAlias": alias, "autoSort": auto_sort,
|
103
|
+
"cId": id, "othersLabel": others_label, "textAlign": _text_align
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
def nx_inline_measure_def(
|
108
|
+
label: str = "", description: str = "", tags: list = None, grouping="N", definition: str = "",
|
109
|
+
num_format: dict = None, relative: bool = False, brutal_sum: bool = False, aggr_func: str = "Expr",
|
110
|
+
accumulate: int = 0, reverse_sort: bool = False, active_expression: int = 0, expressions: list = None,
|
111
|
+
label_expression: str = "", auto_sort: bool = True, id = None, num_format_from_template: bool = True,
|
112
|
+
_text_align: dict = None
|
113
|
+
):
|
114
|
+
|
115
|
+
if _text_align is None:
|
116
|
+
_text_align = text_align()
|
117
|
+
if id is None:
|
118
|
+
id = str(uuid.uuid4())
|
119
|
+
if tags is None:
|
120
|
+
tags = []
|
121
|
+
if expressions is None:
|
122
|
+
expressions = []
|
123
|
+
if num_format is None:
|
124
|
+
num_format = {}
|
19
125
|
|
20
|
-
|
21
|
-
|
126
|
+
return {
|
127
|
+
"qLabel": label, "qDescription": description, "qTags": tags, "qGrouping": grouping, "qDef": definition,
|
128
|
+
"qNumFormat": num_format, "qRelative": relative, "qBrutalSum": brutal_sum, "qAggrFunc": aggr_func,
|
129
|
+
"qAccumulate": accumulate, "qReverseSort": reverse_sort, "qActiveExpression": active_expression,
|
130
|
+
"qExpressions": expressions, "qLabelExpression": label_expression, "autoSort": auto_sort, "cId": id,
|
131
|
+
"numFormatFromTemplate": num_format_from_template, "textAlign": _text_align
|
132
|
+
}
|
22
133
|
|
23
134
|
|
24
|
-
def nx_page(left=0, top=0, width=
|
135
|
+
def nx_page(left: int = 0, top: int = 0, width: int = 50, height: int = 50):
|
25
136
|
return {"qLeft": left, "qTop": top, "qWidth": width, "qHeight": height}
|
26
137
|
|
27
138
|
|
@@ -40,21 +151,103 @@ def nx_info(obj_type, obj_id=""):
|
|
40
151
|
return {"qId": obj_id, "qType": obj_type}
|
41
152
|
|
42
153
|
|
43
|
-
def nx_dimension(
|
44
|
-
|
154
|
+
def nx_dimension(
|
155
|
+
library_id: str = "", dim_def: dict = None, null_suppression: bool = False, include_elem_value: bool = False,
|
156
|
+
other_total_spec: dict = None, show_total: bool = False, show_all: bool = False, other_label: dict = None,
|
157
|
+
total_label: dict = None, calc_cond: dict = None, attribute_expressions: list = None,
|
158
|
+
attribute_dimensions: list = None, calc_condition: dict = None
|
159
|
+
):
|
160
|
+
|
161
|
+
if calc_condition is None:
|
162
|
+
calc_condition = nx_calc_cond()
|
163
|
+
if attribute_dimensions is None:
|
164
|
+
attribute_dimensions = []
|
165
|
+
if attribute_expressions is None:
|
166
|
+
attribute_expressions = []
|
167
|
+
if calc_cond is None:
|
168
|
+
calc_cond = value_expr()
|
169
|
+
if total_label is None:
|
170
|
+
total_label = string_expr(qv="Totals")
|
171
|
+
if other_label is None:
|
172
|
+
other_label = string_expr(qv="Others")
|
173
|
+
if other_total_spec is None:
|
174
|
+
other_total_spec = {}
|
175
|
+
if dim_def is None:
|
176
|
+
dim_def = {}
|
177
|
+
|
178
|
+
return {
|
179
|
+
"qLibraryId": library_id, "qDef": dim_def, "qNullSuppression": null_suppression,
|
180
|
+
"qIncludeElemValue": include_elem_value, "qOtherTotalSpec": other_total_spec, "qShowTotal": show_total,
|
181
|
+
"qShowAll": show_all, "qOtherLabel": other_label, "qTotalLabel": total_label, "qCalcCond": calc_cond,
|
182
|
+
"qAttributeExpressions": attribute_expressions, "qAttributeDimensions": attribute_dimensions,
|
183
|
+
"qCalcCondition": calc_condition
|
184
|
+
}
|
185
|
+
|
186
|
+
|
187
|
+
def nx_measure(
|
188
|
+
library_id: str = "", mes_def: dict = None, sort_by: dict = None, attribute_expressions: list = None,
|
189
|
+
attribute_dimensions: list = None, calc_cond: dict = None, calc_condition: dict = None, trend_lines: list = None
|
190
|
+
):
|
191
|
+
|
192
|
+
if trend_lines is None:
|
193
|
+
trend_lines = []
|
194
|
+
if calc_condition is None:
|
195
|
+
calc_condition = nx_calc_cond()
|
196
|
+
if calc_cond is None:
|
197
|
+
calc_cond = value_expr()
|
198
|
+
if attribute_dimensions is None:
|
199
|
+
attribute_dimensions = []
|
200
|
+
if attribute_expressions is None:
|
201
|
+
attribute_expressions = []
|
202
|
+
if sort_by is None:
|
203
|
+
sort_by = sort_criteria()
|
204
|
+
if mes_def is None:
|
205
|
+
mes_def = {}
|
206
|
+
|
207
|
+
return {
|
208
|
+
"qLibraryId": library_id, "qDef": mes_def, "qSortBy": sort_by, "qAttributeExpressions": attribute_expressions,
|
209
|
+
"qAttributeDimensions": attribute_dimensions, "qCalcCond": calc_cond, "qCalcCondition": calc_condition,
|
210
|
+
"qTrendLines": trend_lines
|
211
|
+
}
|
212
|
+
|
213
|
+
|
214
|
+
def generic_object_properties(info: dict, prop_name: str, prop_def:dict = None, extends_id: str = "",
|
215
|
+
state_name: str = ""):
|
216
|
+
if prop_def is None:
|
217
|
+
prop_def = {}
|
218
|
+
return {"qInfo": info, "qExtendsId": extends_id, prop_name: prop_def, "qStateName": state_name}
|
45
219
|
|
46
220
|
|
47
|
-
def
|
48
|
-
|
221
|
+
def sort_criteria(
|
222
|
+
sort_by_state: int = 1, sort_by_frequency:int = 0, sort_by_numeric: int = 1, sort_by_ascii: int = 1,
|
223
|
+
sort_by_load_order: int = 1, sort_by_load_expression: int = 0, expression=None, sort_by_load_greyness: int = 0
|
224
|
+
):
|
49
225
|
|
226
|
+
if expression is None:
|
227
|
+
expression = value_expr()
|
228
|
+
|
229
|
+
return {
|
230
|
+
"qSortByState": sort_by_state, "qSortByFrequency": sort_by_frequency, "qSortByNumeric": sort_by_numeric,
|
231
|
+
"qSortByAscii": sort_by_ascii, "qSortByLoadOrder": sort_by_load_order,
|
232
|
+
"qSortByExpression": sort_by_load_expression, "qExpression": expression,
|
233
|
+
"qSortByGreyness": sort_by_load_greyness
|
234
|
+
}
|
50
235
|
|
51
|
-
def generic_object_properties(info, prop_name, prop_def, extends_id="", state_name="$"):
|
52
|
-
return {"qInfo": info, "qExtendsId": extends_id, prop_name: prop_def, "qStateName": state_name}
|
53
236
|
|
237
|
+
def value_expr(qv: str = ""):
|
238
|
+
return {"qv": qv}
|
54
239
|
|
55
|
-
|
56
|
-
|
57
|
-
|
240
|
+
|
241
|
+
def string_expr(qv: str = ""):
|
242
|
+
return {"qv": qv}
|
243
|
+
|
244
|
+
|
245
|
+
def nx_calc_cond(cond: dict = None, msg: dict = None):
|
246
|
+
if msg is None:
|
247
|
+
msg = string_expr()
|
248
|
+
if cond is None:
|
249
|
+
cond = value_expr()
|
250
|
+
return {"qCond": cond, "qMsg": msg}
|
58
251
|
|
59
252
|
|
60
253
|
def field_value(text, is_numeric = False, number = 0):
|
@@ -70,13 +263,17 @@ def generic_dimension_properties(nx_info: dict, nx_library_dimension_def: dict,
|
|
70
263
|
|
71
264
|
|
72
265
|
def nx_library_dimension_def(grouping: str = "N", field_definitions: list = None, field_labels: list = None,
|
73
|
-
label_expression: str = ""):
|
266
|
+
label_expression: str = "", alias: str = "", title: str = "", coloring: dict = None):
|
267
|
+
if coloring is None:
|
268
|
+
coloring = {}
|
74
269
|
if field_labels is None:
|
75
270
|
field_labels = []
|
76
271
|
if field_definitions is None:
|
77
272
|
field_definitions = []
|
78
|
-
return {
|
79
|
-
|
273
|
+
return {
|
274
|
+
"qGrouping": grouping, "qFieldDefs": field_definitions, "qFieldLabels": field_labels,
|
275
|
+
"qLabelExpression": label_expression, "qAlias": alias, "title": title, "coloring": coloring
|
276
|
+
}
|
80
277
|
|
81
278
|
|
82
279
|
def nx_library_measure_def(label: str, mes_def: str, grouping: str = "N", expressions: list = None,
|
@@ -85,11 +282,13 @@ def nx_library_measure_def(label: str, mes_def: str, grouping: str = "N", expres
|
|
85
282
|
num_format = {}
|
86
283
|
if expressions is None:
|
87
284
|
expressions = []
|
88
|
-
return {
|
89
|
-
|
285
|
+
return {
|
286
|
+
"qLabel": label, "qDef": mes_def,"qGrouping": grouping, "qExpressions": expressions,
|
287
|
+
"qActiveExpression": active_expression, "qLabelExpression": label_expression, "qNumFormat": num_format
|
288
|
+
}
|
90
289
|
|
91
290
|
|
92
|
-
def
|
291
|
+
def field_attributes(type: str = "U", n_dec: int = 10, use_thou:int = 0, fmt: str = "", dec: str = "", thou: str = ""):
|
93
292
|
return {"qType": type, "qnDec": n_dec, "qUseThou": use_thou, "qFmt": fmt, "qDec": dec, "qThou": thou}
|
94
293
|
|
95
294
|
|
@@ -119,4 +318,224 @@ def measure_list_def():
|
|
119
318
|
def field_list_def(show_system: bool = True, show_hidden: bool = True, show_derived_fields: bool = True,
|
120
319
|
show_semantic: bool = True, show_src_tables: bool = True, show_implicit: bool = True):
|
121
320
|
return {"qShowSystem": show_system, "qShowHidden": show_hidden, "qShowDerivedFields": show_derived_fields,
|
122
|
-
"qShowSemantic": show_semantic, "qShowSrcTables": show_src_tables, "qShowImplicit": show_implicit}
|
321
|
+
"qShowSemantic": show_semantic, "qShowSrcTables": show_src_tables, "qShowImplicit": show_implicit}
|
322
|
+
|
323
|
+
|
324
|
+
def sheet_list_def():
|
325
|
+
return {
|
326
|
+
"qType": "sheet",
|
327
|
+
"qData": {
|
328
|
+
"title": "/qMetaDef/title",
|
329
|
+
"description": "/qMetaDef/description",
|
330
|
+
"thumbnail": "/thumbnail",
|
331
|
+
"cells": "/cells",
|
332
|
+
"rank": "/rank",
|
333
|
+
"columns": "/columns",
|
334
|
+
"rows": "/rows"
|
335
|
+
}
|
336
|
+
}
|
337
|
+
|
338
|
+
|
339
|
+
def variable_list_def():
|
340
|
+
return {
|
341
|
+
"qType": "variable",
|
342
|
+
"qShowReserved": True,
|
343
|
+
"qShowConfig": True,
|
344
|
+
"qData": {
|
345
|
+
"tags": "/tags"
|
346
|
+
}
|
347
|
+
}
|
348
|
+
|
349
|
+
|
350
|
+
def nx_patch(op: str, path: str, value: str):
|
351
|
+
return {"qOp": op, "qPath": path, "qValue": value}
|
352
|
+
|
353
|
+
|
354
|
+
def object_position_size(obj_id: str, obj_type: str, col: int, row: int, colspan: int, rowspan: int, y: float, x: float,
|
355
|
+
width: float, height: float):
|
356
|
+
return {
|
357
|
+
"name": obj_id,
|
358
|
+
"type": obj_type,
|
359
|
+
"col": col,
|
360
|
+
"row": row,
|
361
|
+
"colspan": colspan,
|
362
|
+
"rowspan": rowspan,
|
363
|
+
"bounds": {
|
364
|
+
"y": y,
|
365
|
+
"x": x,
|
366
|
+
"width": width,
|
367
|
+
"height": height
|
368
|
+
}
|
369
|
+
}
|
370
|
+
|
371
|
+
|
372
|
+
def nx_attr_expr_def(expression: str = "", library_id: str = "", attribute: bool = True, num_format: dict = None,
|
373
|
+
label: str = "", label_expression: str = ""):
|
374
|
+
if num_format is None:
|
375
|
+
num_format = {}
|
376
|
+
return {
|
377
|
+
"qExpression": expression,
|
378
|
+
"qLibraryId": library_id,
|
379
|
+
"qAttribute": attribute,
|
380
|
+
"qNumFormat": num_format,
|
381
|
+
"qLabel": label,
|
382
|
+
"qLabelExpression": label_expression
|
383
|
+
}
|
384
|
+
|
385
|
+
|
386
|
+
def table_properties(
|
387
|
+
info: dict, hypercube_def: dict, prop_def: dict = None, extends_id: str = "", state_name: str = "",
|
388
|
+
script: str = "", _search: dict = None, show_titles: bool = True, title: str = "", subtitle: str = "",
|
389
|
+
footnote: str = "", disable_nav_menu: bool = False, show_details: bool = False,
|
390
|
+
show_details_expression: bool = False, _totals: dict = None, scrolling_horizontal: bool = True, scrolling_keep_first_column_in_view: bool = False,
|
391
|
+
scrolling_keep_first_column_in_view_touch: bool = False, multiline_wrap_text_in_headers: bool = True,
|
392
|
+
multiline_wrap_text_in_cells: bool = True
|
393
|
+
):
|
394
|
+
|
395
|
+
if _totals is None:
|
396
|
+
_totals = totals()
|
397
|
+
if prop_def is None:
|
398
|
+
prop_def = {}
|
399
|
+
if _search is None:
|
400
|
+
_search = search()
|
401
|
+
|
402
|
+
return {
|
403
|
+
"qInfo": info, "qExtendsId": extends_id, "qMetaDef": prop_def, "qStateName": state_name,
|
404
|
+
"qHyperCubeDef": hypercube_def, "script": script, "search": _search, "showTitles": show_titles, "title": title,
|
405
|
+
"subtitle": subtitle, "footnote": footnote, "disableNavMenu": disable_nav_menu, "showDetails": show_details,
|
406
|
+
"showDetailsExpression": show_details_expression, "totals": _totals,
|
407
|
+
"scrolling": {"horizontal": scrolling_horizontal, "keepFirstColumnInView": scrolling_keep_first_column_in_view, "keepFirstColumnInViewTouch": scrolling_keep_first_column_in_view_touch},
|
408
|
+
"multiline": {"wrapTextInHeaders": multiline_wrap_text_in_headers, "wrapTextInCells": multiline_wrap_text_in_cells},
|
409
|
+
"visualization": "table"
|
410
|
+
}
|
411
|
+
|
412
|
+
|
413
|
+
def sn_table_properties(
|
414
|
+
info: dict, hypercube_def: dict, prop_def: dict = None, extends_id: str = "", state_name: str = "",
|
415
|
+
show_titles: bool = True, title: str = "", subtitle: str = "", footnote: str = "", disable_nav_menu: bool = False,
|
416
|
+
show_details: bool = False, show_details_expression: bool = False, components: list = None, _totals: dict = None,
|
417
|
+
use_pagination: bool = False, enable_chart_exploration: bool = False, chart_exploration: dict = None
|
418
|
+
):
|
419
|
+
|
420
|
+
if chart_exploration is None:
|
421
|
+
chart_exploration = {"menuVisibility": "auto"}
|
422
|
+
if components is None:
|
423
|
+
components = []
|
424
|
+
if _totals is None:
|
425
|
+
_totals = totals()
|
426
|
+
if prop_def is None:
|
427
|
+
prop_def = {}
|
428
|
+
|
429
|
+
return {
|
430
|
+
"qInfo": info, "qExtendsId": extends_id, "qMetaDef": prop_def, "qStateName": state_name,
|
431
|
+
"qHyperCubeDef": hypercube_def, "showTitles": show_titles, "title": title, "subtitle": subtitle,
|
432
|
+
"footnote": footnote, "disableNavMenu": disable_nav_menu, "showDetails": show_details,
|
433
|
+
"showDetailsExpression": show_details_expression, "components": components, "totals": _totals,
|
434
|
+
"usePagination": use_pagination, "enableChartExploration": enable_chart_exploration,
|
435
|
+
"chartExploration": chart_exploration, "visualization": "sn-table"
|
436
|
+
}
|
437
|
+
|
438
|
+
|
439
|
+
def pivot_table_properties(
|
440
|
+
info: dict, hypercube_def: dict, prop_def: dict = None, extends_id: str = "", state_name: str = "",
|
441
|
+
_search: dict = None, show_titles: bool = True, title: str = "", subtitle: str = "",
|
442
|
+
footnote: str = "", disable_nav_menu: bool = False, show_details: bool = True,
|
443
|
+
show_details_expression: bool = False
|
444
|
+
):
|
445
|
+
|
446
|
+
if prop_def is None:
|
447
|
+
prop_def = {}
|
448
|
+
if _search is None:
|
449
|
+
_search = search()
|
450
|
+
|
451
|
+
return {
|
452
|
+
"qInfo": info, "qExtendsId": extends_id, "qMetaDef": prop_def, "qStateName": state_name,
|
453
|
+
"qHyperCubeDef": hypercube_def, "search": _search, "showTitles": show_titles, "title": title,
|
454
|
+
"subtitle": subtitle, "footnote": footnote, "disableNavMenu": disable_nav_menu, "showDetails": show_details,
|
455
|
+
"showDetailsExpression": show_details_expression, "visualization": "pivot-table"
|
456
|
+
}
|
457
|
+
|
458
|
+
|
459
|
+
def sn_pivot_table_properties(
|
460
|
+
info: dict, hypercube_def: dict, prop_def: dict = None, extends_id: str = "", state_name: str = "",
|
461
|
+
_search: dict = None, show_titles: bool = True, title: str = "", subtitle: str = "",
|
462
|
+
footnote: str = "", disable_nav_menu: bool = False, show_details: bool = True,
|
463
|
+
show_details_expression: bool = False, components: list = None, null_value_representation: dict = None
|
464
|
+
):
|
465
|
+
if null_value_representation is None:
|
466
|
+
null_value_representation = {"text": "-"}
|
467
|
+
if components is None:
|
468
|
+
components = []
|
469
|
+
if prop_def is None:
|
470
|
+
prop_def = {}
|
471
|
+
if _search is None:
|
472
|
+
_search = search()
|
473
|
+
|
474
|
+
return {
|
475
|
+
"qInfo": info, "qExtendsId": extends_id, "qMetaDef": prop_def, "qStateName": state_name,
|
476
|
+
"qHyperCubeDef": hypercube_def, "search": _search, "showTitles": show_titles, "title": title,
|
477
|
+
"subtitle": subtitle, "footnote": footnote, "disableNavMenu": disable_nav_menu, "showDetails": show_details,
|
478
|
+
"showDetailsExpression": show_details_expression, "components": components,
|
479
|
+
"nullValueRepresentation": null_value_representation, "visualization": "sn-pivot-table"
|
480
|
+
}
|
481
|
+
|
482
|
+
|
483
|
+
def search(sorting: str = "auto"):
|
484
|
+
return {"sorting": sorting}
|
485
|
+
|
486
|
+
|
487
|
+
def text_align(auto: bool = True, align: str = "left"):
|
488
|
+
return {"auto": auto, "align": align}
|
489
|
+
|
490
|
+
|
491
|
+
def totals(totals_show: bool = True, totals_position: str = "noTotals", totals_label: str = "Totals"):
|
492
|
+
return {"show": totals_show, "position": totals_position, "label": totals_label}
|
493
|
+
|
494
|
+
|
495
|
+
def color_map(colors: list = None, nul: dict = None, oth: dict = None, pal: str = None, single: dict = None,
|
496
|
+
use_pal: bool = True, auto_fill: bool = True):
|
497
|
+
|
498
|
+
if colors is None:
|
499
|
+
colors = []
|
500
|
+
|
501
|
+
return {
|
502
|
+
"colors": colors,
|
503
|
+
"nul": nul,
|
504
|
+
"oth": oth,
|
505
|
+
"pal": pal,
|
506
|
+
"single": single,
|
507
|
+
"usePal": use_pal,
|
508
|
+
"autoFill": auto_fill
|
509
|
+
}
|
510
|
+
|
511
|
+
|
512
|
+
def coloring(change_hash: str = None, color_map_ref: str = "", has_value_colors: bool = False, base_color: dict = None):
|
513
|
+
if base_color is None:
|
514
|
+
base_color = {"color": "none", "index": 0}
|
515
|
+
return {
|
516
|
+
"changeHash": change_hash,
|
517
|
+
"colorMapRef": color_map_ref,
|
518
|
+
"hasValueColors": has_value_colors,
|
519
|
+
"baseColor": base_color
|
520
|
+
}
|
521
|
+
|
522
|
+
|
523
|
+
def color_map_properties(dim_id: str, prop_def:dict = None, extends_id: str = "", state_name: str = "",
|
524
|
+
_color_map: dict = None):
|
525
|
+
|
526
|
+
if _color_map is None:
|
527
|
+
_color_map = color_map()
|
528
|
+
if prop_def is None:
|
529
|
+
prop_def = {}
|
530
|
+
info = nx_info(obj_type="ColorMap", obj_id="ColorMapModel_" + dim_id)
|
531
|
+
|
532
|
+
return {
|
533
|
+
"qInfo": info, "qExtendsId": extends_id, "qMetaDef": prop_def, "qStateName": state_name, "colorMap": _color_map
|
534
|
+
}
|
535
|
+
|
536
|
+
|
537
|
+
def value_color(value: str, color: str, index: int = -1):
|
538
|
+
return {
|
539
|
+
"value": value,
|
540
|
+
"baseColor": {"color": color, "index": index}
|
541
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: qe-api-client
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.7.0
|
4
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
|
@@ -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
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
qe_api_client/__init__.py,sha256=bypB4CIjpHtf5Pu_NwtJajC69zqQD7qB9jo8cCX0B54,23
|
2
|
+
qe_api_client/engine.py,sha256=4pll0uoFPph5WgRufpP4OsYlypWKQhMfJQAaaWPWWUU,56738
|
3
|
+
qe_api_client/engine_communicator.py,sha256=q6x7ix2Ev8yGmTTm7cf1vHcidOihKM0HjDXeJ-dZYjk,1133
|
4
|
+
qe_api_client/structs.py,sha256=Gh7aGNLN58kYeBY-6Nb7yagQpHnd1f-IlfaE8aEF9ns,22621
|
5
|
+
qe_api_client/api_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
qe_api_client/api_classes/engine_app_api.py,sha256=qobuSdLV5I-DOXto0Qi5ckMG3q5Dll0Lto3TyjZSbso,37493
|
7
|
+
qe_api_client/api_classes/engine_field_api.py,sha256=zCLIR7rmxqwIrJYK_-uHVEhMvBcEP2qofuX8ZPygqCA,5479
|
8
|
+
qe_api_client/api_classes/engine_generic_dimension_api.py,sha256=oSZoRT-j4hsCVnUm1OSg7XZPWXhUzFLY_53kM0KwPHs,2122
|
9
|
+
qe_api_client/api_classes/engine_generic_measure_api.py,sha256=uj4i_ykX9F9Dtk78fOidMBhzSP8vEucEfrB6MrLwgPI,1340
|
10
|
+
qe_api_client/api_classes/engine_generic_object_api.py,sha256=iasoNYSSsBTr_S3ExoorfCip9fhy7sCQ_J-ru2JYal8,10130
|
11
|
+
qe_api_client/api_classes/engine_generic_variable_api.py,sha256=sWXZpE-GLfcMijmfORnDNrJ6lmXX3x5TRHlkEu_i0BQ,2027
|
12
|
+
qe_api_client/api_classes/engine_global_api.py,sha256=G6QQHI36WOo7W25zg4Uz__gMSLC2ptNTvbBdElPzgZI,27535
|
13
|
+
qe_api_client-2.7.0.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
14
|
+
qe_api_client-2.7.0.dist-info/METADATA,sha256=5-VkSmGbK-92mrMlEqFgozK8FtbUfmpW1o5_zQZrLlA,2385
|
15
|
+
qe_api_client-2.7.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
16
|
+
qe_api_client-2.7.0.dist-info/top_level.txt,sha256=m_43YagP8UtZgJHmZEfu0vlBNwt36M01-Qby2jByMnk,14
|
17
|
+
qe_api_client-2.7.0.dist-info/RECORD,,
|
@@ -1,17 +0,0 @@
|
|
1
|
-
qe_api_client/__init__.py,sha256=bypB4CIjpHtf5Pu_NwtJajC69zqQD7qB9jo8cCX0B54,23
|
2
|
-
qe_api_client/engine.py,sha256=AGv3Ab5YE5-PpNdkQF6aCLYECKkgbiU96jqEcpb6VUE,32019
|
3
|
-
qe_api_client/engine_communicator.py,sha256=q6x7ix2Ev8yGmTTm7cf1vHcidOihKM0HjDXeJ-dZYjk,1133
|
4
|
-
qe_api_client/structs.py,sha256=9_2LzC8Er_cFNmGPLRB_xuQ0v3AHY24XirGFVSBxkMo,5996
|
5
|
-
qe_api_client/api_classes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
qe_api_client/api_classes/engine_app_api.py,sha256=_wNFr3scbw0THoM_mMpSapKyiNEhjB4qYBDNgZLLoHg,37493
|
7
|
-
qe_api_client/api_classes/engine_field_api.py,sha256=zCLIR7rmxqwIrJYK_-uHVEhMvBcEP2qofuX8ZPygqCA,5479
|
8
|
-
qe_api_client/api_classes/engine_generic_dimension_api.py,sha256=OdYnL54jTaNgfICDj5czJcFB1QZ4Y0s_YslqomQY26I,1394
|
9
|
-
qe_api_client/api_classes/engine_generic_measure_api.py,sha256=uj4i_ykX9F9Dtk78fOidMBhzSP8vEucEfrB6MrLwgPI,1340
|
10
|
-
qe_api_client/api_classes/engine_generic_object_api.py,sha256=nqsEtvKkt5XkUEIVUoBtNVXtmUvuifxrgTcw2fDuaOE,8218
|
11
|
-
qe_api_client/api_classes/engine_generic_variable_api.py,sha256=sWXZpE-GLfcMijmfORnDNrJ6lmXX3x5TRHlkEu_i0BQ,2027
|
12
|
-
qe_api_client/api_classes/engine_global_api.py,sha256=G6QQHI36WOo7W25zg4Uz__gMSLC2ptNTvbBdElPzgZI,27535
|
13
|
-
qe_api_client-2.5.0.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
14
|
-
qe_api_client-2.5.0.dist-info/METADATA,sha256=TcvlAA9v6e69nWGG-dCXD9E0lxx_jrxrjBi7cVLKgmw,2363
|
15
|
-
qe_api_client-2.5.0.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
16
|
-
qe_api_client-2.5.0.dist-info/top_level.txt,sha256=m_43YagP8UtZgJHmZEfu0vlBNwt36M01-Qby2jByMnk,14
|
17
|
-
qe_api_client-2.5.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|