You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+93-7Lines changed: 93 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -44,21 +44,24 @@ InfluxDB 2.0 client features
44
44
- Querying data
45
45
- using the Flux language
46
46
- into csv, raw data, `flux_table <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L5>`_ structure
- `InfluxDB 2.0 API <https://github.com/influxdata/influxdb/blob/master/http/swagger.yml>`_ client for management
55
57
- the client is generated from the `swagger <https://github.com/influxdata/influxdb/blob/master/http/swagger.yml>`_ by using the `openapi-generator <https://github.com/OpenAPITools/openapi-generator>`_
56
58
- organizations & users management
57
59
- buckets management
58
60
- tasks management
59
61
- authorizations
60
62
- health check
61
-
- How To
63
+
- ...
64
+
- Examples
62
65
- `Connect to InfluxDB Cloud`_
63
66
- `How to efficiently import large dataset`_
64
67
- `Efficiency write data from IOT sensor`_
@@ -79,7 +82,7 @@ The python package is hosted on Github, you can install latest version directly:
@@ -289,6 +292,89 @@ Data are writes in a synchronous HTTP request.
289
292
290
293
client.__del__()
291
294
295
+
Queries
296
+
^^^^^^^
297
+
298
+
The result retrieved by `QueryApi <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/query_api.py>`_ could be formatted as a:
299
+
300
+
1. Flux data structure: `FluxTable <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L5>`_, `FluxColumn <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L22>`_ and `FluxRecord <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/flux_table.py#L31>`_
301
+
2. `csv.reader <https://docs.python.org/3.4/library/csv.html#reader-objects>`__ which will iterate over CSV lines
302
+
3. Raw unprocessed results as a ``str`` iterator
303
+
304
+
The API also support streaming ``FluxRecord`` via `query_stream <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/query_api.py#L77>`_, see example below:
305
+
306
+
.. code-block:: python
307
+
308
+
from influxdb_client import InfluxDBClient, Point, Dialect
309
+
from influxdb_client.client.write_api importSYNCHRONOUS
0 commit comments