dqlmagic 1.2.4__tar.gz → 1.3.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dqlmagic
3
- Version: 1.2.4
3
+ Version: 1.3.1
4
4
  Summary: IPython magic function for Dynatrace Query Language (DQL)
5
5
  Home-page: https://github.com/dtPaTh/Dqlmagic
6
6
  Author: Patrick Thurner
@@ -1,4 +1,4 @@
1
- __version__='1.2.4'
1
+ __version__='1.3.1'
2
2
 
3
3
  from .dqlmagic import DQLmagic
4
4
 
@@ -24,6 +24,7 @@ class DQLmagic(Magics):
24
24
  dql_default_query_timespan_minutes = None
25
25
  dql_default_scanlimit_gbytes = None
26
26
  dql_max_result_records = None
27
+ dql_fetch_timeout_seconds = None
27
28
 
28
29
 
29
30
  def get_bearer(self):
@@ -84,6 +85,9 @@ class DQLmagic(Magics):
84
85
  optCfg = os.getenv('dql_max_result_records')
85
86
  if optCfg != None: self.dql_max_result_records= int(optCfg)
86
87
 
88
+ optCfg = os.getenv('dql_fetch_timeout_seconds')
89
+ if optCfg != None: self.dql_fetch_timeout_seconds= int(optCfg)
90
+
87
91
 
88
92
  self.get_bearer()
89
93
 
@@ -109,7 +113,7 @@ class DQLmagic(Magics):
109
113
  jdata = json.loads(res)
110
114
  records = jdata["result"]["records"]
111
115
 
112
- if self.shell.user_ns and len(cell) > 0:
116
+ if self.shell.user_ns and cell is not None:
113
117
  if line and not line.isspace():
114
118
  self.shell.user_ns.update({line: records})
115
119
  else:
@@ -167,6 +171,9 @@ class DQLmagic(Magics):
167
171
  if self.dql_max_result_records != None:
168
172
  body["maxResultRecords"] = self.dql_max_result_records
169
173
 
174
+ if self.dql_fetch_timeout_seconds != None:
175
+ body["fetchTimeoutSeconds"] = self.dql_fetch_timeout_seconds
176
+
170
177
  response = requests.request("POST", self.grail_apiurl+"query:execute", headers=headers, params=queryParams, json=body)
171
178
  if response.status_code == 200:
172
179
  return response.text
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dqlmagic
3
- Version: 1.2.4
3
+ Version: 1.3.1
4
4
  Summary: IPython magic function for Dynatrace Query Language (DQL)
5
5
  Home-page: https://github.com/dtPaTh/Dqlmagic
6
6
  Author: Patrick Thurner
File without changes
File without changes
File without changes
File without changes