Skip to content

Commit 43e40a4

Browse files
committed
Merge branch 'write_points' of github.com:william-p/influxdb-python
2 parents 5840981 + 75b2772 commit 43e40a4

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
@@ -61,24 +61,11 @@ def switch_user(self, username, password):
6161
# by doing a POST to /db/foo_production/series?u=some_user&p=some_password
6262
# with a JSON body of points.
6363

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

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

0 commit comments

Comments
 (0)