qe-api-client 1.0.0__py3-none-any.whl → 1.1.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/engine.py CHANGED
@@ -3,24 +3,27 @@ import qe_api_client.engine_communicator as engine_communicator
3
3
  import qe_api_client.engine_field_api as engine_field_api
4
4
  import qe_api_client.engine_generic_object_api as engine_generic_object_api
5
5
  import qe_api_client.engine_global_api as engine_global_api
6
+ import qe_api_client.engine_generic_variable_api as engine_generic_variable_api
6
7
  import qe_api_client.structs as structs
7
8
 
8
9
 
9
10
  class QixEngine:
10
11
 
11
- def __init__(self, url, user_directory,
12
- user_id, ca_certs, certfile,
13
- keyfile, app_id=None):
12
+ def __init__(self, url, user_directory=None, user_id=None, ca_certs=None, certfile=None, keyfile=None, app_id=None):
14
13
  self.url = url
15
- self.conn = engine_communicator.SecureEngineCommunicator(
16
- url, user_directory,
17
- user_id, ca_certs, certfile,
18
- keyfile, app_id
19
- )
14
+
15
+ # Check, if server or local connection available
16
+ if user_directory is None and user_id is None and ca_certs is None and certfile is None and keyfile is None:
17
+ self.conn = engine_communicator.EngineCommunicator(url)
18
+ else:
19
+ self.conn = engine_communicator.SecureEngineCommunicator(url, user_directory, user_id, ca_certs, certfile,
20
+ keyfile, app_id)
21
+
20
22
  self.ega = engine_global_api.EngineGlobalApi(self.conn)
21
23
  self.eaa = engine_app_api.EngineAppApi(self.conn)
22
24
  self.egoa = engine_generic_object_api.EngineGenericObjectApi(self.conn)
23
25
  self.efa = engine_field_api.EngineFieldApi(self.conn)
26
+ self.egva = engine_generic_variable_api.EngineGenericVariableApi(self.conn)
24
27
  self.Structs = structs.Structs()
25
28
  self.app_handle = ''
26
29
 
@@ -0,0 +1,24 @@
1
+ import json
2
+
3
+
4
+ class EngineGenericVariableApi:
5
+
6
+ def __init__(self, socket):
7
+ self.engine_socket = socket
8
+
9
+ def set_string_value(self, handle, str_val):
10
+ msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": handle, "method": "SetStringValue",
11
+ "params": {"qVal": str_val}})
12
+ response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
13
+ try:
14
+ return response["result"]
15
+ except KeyError:
16
+ return response["error"]
17
+
18
+ def get_properties(self, handle):
19
+ msg = json.dumps({"jsonrpc": "2.0", "id": 0, "handle": handle, "method": "GetProperties", "params": {}})
20
+ response = json.loads(self.engine_socket.send_call(self.engine_socket, msg))
21
+ try:
22
+ return response["result"]
23
+ except KeyError:
24
+ return response["error"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qe-api-client
3
- Version: 1.0.0
3
+ Version: 1.1.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
@@ -1,14 +1,15 @@
1
1
  qe_api_client/__init__.py,sha256=bypB4CIjpHtf5Pu_NwtJajC69zqQD7qB9jo8cCX0B54,23
2
- qe_api_client/engine.py,sha256=OKYxlPh4ley5g4ATfOqLxycg-ysAGiT5F1A0Ub8JAK4,6797
2
+ qe_api_client/engine.py,sha256=ZsTnPuXZxcP55fR8gv5eSO9SJpMgxYwXMjW8CkMLf-U,7201
3
3
  qe_api_client/engine_app_api.py,sha256=_BE39CeNhe9j5wChMdObgz7-3WSKSYF9yx-nixpfzkw,40267
4
4
  qe_api_client/engine_communicator.py,sha256=Va8Kz4cN6uyKLzV3JllBw08KbU4uDn8e-5pIm5Kmsfs,1291
5
5
  qe_api_client/engine_field_api.py,sha256=L9a6sqQNmtoi8fnZfLBewbflbGg5RRA1CfCXkejnuNw,3166
6
6
  qe_api_client/engine_generic_object_api.py,sha256=s0yIqDhaWkRzNYQDDTYQKJkuEevl9xVaPnBT7uxBinc,4128
7
+ qe_api_client/engine_generic_variable_api.py,sha256=mKew3p9dDDSpOl_iMfzPL5GM3FL1oOxHBm1Qp7xatP8,867
7
8
  qe_api_client/engine_global_api.py,sha256=CTHsmA-QG6Hoq_XOEJGQTg0ddslkG9s1f0Zzc8a9e54,20831
8
9
  qe_api_client/engine_helper.py,sha256=gxaTFU06YMGwXloxv3Sku6PbhDmTw_jEZdX9w-gfw5c,2337
9
10
  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,,
11
+ qe_api_client-1.1.0.dist-info/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
12
+ qe_api_client-1.1.0.dist-info/METADATA,sha256=bkw_Vp53xgFn-LK2THCN6QJOHOdQZ2FNSJ8snz0CbB4,1376
13
+ qe_api_client-1.1.0.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
14
+ qe_api_client-1.1.0.dist-info/top_level.txt,sha256=m_43YagP8UtZgJHmZEfu0vlBNwt36M01-Qby2jByMnk,14
15
+ qe_api_client-1.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (71.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5