Skip to content

Commit d1b8edf

Browse files
author
aviau
committed
Removed chunked and time_precision parameters
1 parent 4654015 commit d1b8edf

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

influxdb/client.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import socket
77
import requests
88

9-
from influxdb import chunked_json
109

1110
try:
1211
xrange
@@ -195,40 +194,21 @@ def query(self,
195194
query,
196195
params={},
197196
expected_response_code=200,
198-
time_precision='s',
199197
database=None,
200-
raw=False,
201-
chunked=False):
198+
raw=False):
202199
"""
203200
Query data
204201
205202
:param params: Additional parameters to be passed to requests.
206-
:param time_precision: [Optional, default 's'] Either 's', 'm', 'ms'
207-
or 'u'.
208203
:param database: Database to query, default to None.
209204
:param expected_response_code: Expected response code. Defaults to 200.
210205
:param raw: Wether or not to return the raw influxdb response.
211-
:param chunked: [Optional, default=False] True if the data shall be
212-
retrieved in chunks, False otherwise.
213-
214206
"""
215207

216-
if time_precision not in ['s', 'm', 'ms', 'u']:
217-
raise Exception(
218-
"Invalid time precision is given. (use 's', 'm', 'ms' or 'u')")
219-
220208
params['q'] = query
221209
if database:
222210
params['db'] = database
223211

224-
if time_precision:
225-
params['time_precision'] = time_precision
226-
227-
if chunked is True:
228-
params['chunked'] = 'true'
229-
else:
230-
params['chunked'] = 'false'
231-
232212
response = self.request(
233213
url="query",
234214
method='GET',
@@ -237,10 +217,8 @@ def query(self,
237217
expected_response_code=expected_response_code
238218
)
239219

240-
if raw and not chunked:
220+
if raw:
241221
return response.json()
242-
elif not raw and chunked:
243-
return list(chunked_json.loads(response.content.decode()))
244222
else:
245223
return self.format_query_response(response.json())
246224

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy