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: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
1.[#412](https://github.com/influxdata/influxdb-client-python/pull/412): `DeleteApi` uses default value from `InfluxDBClient.org` if an `org` parameter is not specified
7
7
1.[#405](https://github.com/influxdata/influxdb-client-python/pull/405): Add `InfluxLoggingHandler`. A handler to use the client in native python logging.
8
8
1.[#404](https://github.com/influxdata/influxdb-client-python/pull/404): Add `InvocableScriptsApi` to create, update, list, delete and invoke scripts by seamless way
9
+
1.[#413](https://github.com/influxdata/influxdb-client-python/pull/413): Add support for `async/await` with asyncio via `InfluxDBClientAsync`, for more info see: **How to use Asyncio**
9
10
10
11
### Bug Fixes
11
12
1.[#419](https://github.com/influxdata/influxdb-client-python/pull/419): Use `allowed_methods` to clear deprecation warning [urllib3]
@@ -1324,6 +1309,213 @@ that is replacement for python ``datetime.datetime`` object and also you should
1324
1309
1325
1310
.. marker-nanosecond-end
1326
1311
1312
+
How to use Asyncio
1313
+
^^^^^^^^^^^^^^^^^^
1314
+
.. marker-asyncio-start
1315
+
1316
+
Starting from version 1.27.0 for Python 3.6+ the ``influxdb-client`` package supports ``async/await`` based on
1317
+
`asyncio <https://docs.python.org/3/library/asyncio.html>`_ and `aiohttp <https://docs.aiohttp.org>`_.
1318
+
You can install ``aiohttp`` directly:
1319
+
1320
+
.. code-block:: bash
1321
+
1322
+
$ python -m pip install influxdb-client aiohttp
1323
+
1324
+
or use the ``[async]`` extra:
1325
+
1326
+
.. code-block:: bash
1327
+
1328
+
$ python -m pip install influxdb-client[async]
1329
+
1330
+
.. warning::
1331
+
1332
+
The ``InfluxDBClientAsync`` should be initialised inside ``async coroutine``
1333
+
otherwise there can be unexpected behaviour.
1334
+
For more info see: `Why is creating a ClientSession outside of an event loop dangerous? <https://docs.aiohttp.org/en/stable/faq.html#why-is-creating-a-clientsession-outside-of-an-event-loop-dangerous>`__.
1335
+
1336
+
Async APIs
1337
+
""""""""""
1338
+
All async APIs are available via :class:`~influxdb_client.client.influxdb_client_async.InfluxDBClientAsync`.
1339
+
The ``async`` version of the client supports following asynchronous APIs:
If your proxy notify the client with permanent redirect (``HTTP 301``) to **different host**.
1508
+
The client removes ``Authorization`` header, because otherwise the contents of ``Authorization`` is sent to third parties
1509
+
which is a security vulnerability.
1510
+
1511
+
Client automatically follows HTTP redirects. The default redirect policy is to follow up to ``10`` consecutive requests. The redirects can be configured via:
1512
+
1513
+
- ``allow_redirects`` - If set to ``False``, do not follow HTTP redirects. ``True`` by default.
1514
+
- ``max_redirects`` - Maximum number of HTTP redirects to follow. ``10`` by default.
0 commit comments