Skip to content

Commit 75b2772

Browse files
committed
Merge method 'write_points' with 'write_points_with_precision'
1 parent 7ed4743 commit 75b2772

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

influxdb/client.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,11 @@ def switch_user(self, username, password):
6060
# by doing a POST to /db/foo_production/series?u=some_user&p=some_password
6161
# with a JSON body of points.
6262

63-
def write_points(self, data):
63+
def write_points(self, *args, **kwargs):
6464
"""
6565
Write to multiple time series names
6666
"""
67-
response = session.post(
68-
"{0}/db/{1}/series?u={2}&p={3}".format(
69-
self._baseurl,
70-
self._database,
71-
self._username,
72-
self._password),
73-
data=json.dumps(data),
74-
headers=self._headers)
75-
76-
if response.status_code == 200:
77-
return True
78-
else:
79-
raise Exception(
80-
"{0}: {1}".format(response.status_code, response.content))
67+
return self.write_points_with_precision(*args, **kwargs)
8168

8269
def write_points_with_precision(self, data, time_precision='s'):
8370
"""

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