Skip to content

Commit ca486fc

Browse files
author
aviau
committed
Various documentation improvements
1 parent 3772a71 commit ca486fc

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

docs/source/api-documentation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ These clients are initiated in the same way as the
6969
:class:`ResultSet`
7070
-----------------------
7171

72+
See the :ref:`resultset` page for more information.
73+
7274
.. currentmodule:: influxdb.ResultSet
7375
.. autoclass:: influxdb.resultset.ResultSet
7476
:members:

docs/source/resultset.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
.. _resultset:
3+
14
================================
25
Query response object: ResultSet
36
================================

influxdb/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ def write_points(self,
321321
:param points: A list of dicts.
322322
:param time_precision: [Optional, default None] Either 's', 'm', 'ms'
323323
or 'u'.
324-
:param database The database to write the points to. Defaults to
324+
:param database: The database to write the points to. Defaults to
325325
the client's current db.
326-
:param retention_policy The retention policy for the points.
326+
:param retention_policy: The retention policy for the points.
327327
"""
328328
# TODO: re-implement chunks.
329329
return self._write_points(points=points,

influxdb/resultset.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def __len__(self):
9898
return len(self.keys())
9999

100100
def keys(self):
101+
"""
102+
:return: List of keys. Keys are tuples (serie_name, tags)
103+
"""
101104
keys = []
102105
for serie in self._get_series():
103106
keys.append(
@@ -106,6 +109,9 @@ def keys(self):
106109
return keys
107110

108111
def items(self):
112+
"""
113+
:return: List of tuples, (key, generator)
114+
"""
109115
items = []
110116
for serie in self._get_series():
111117
serie_key = (serie.get('name', 'results'), serie.get('tags', None))
@@ -116,6 +122,12 @@ def items(self):
116122

117123
@staticmethod
118124
def point_from_cols_vals(cols, vals):
125+
""" Creates a dict from columns and values lists
126+
127+
:param cols: List of columns
128+
:param vals: List of values
129+
:return: Dict where keys are columns.
130+
"""
119131
point = {}
120132
for col_index, col_name in enumerate(cols):
121133
point[col_name] = vals[col_index]

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