Skip to content

Commit bf0abd7

Browse files
authored
docs: documentation about delete endpoint (influxdata#189)
1 parent 2b7a6c0 commit bf0abd7

File tree

6 files changed

+46
-2
lines changed

6 files changed

+46
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
1. [#183](https://github.com/influxdata/influxdb-client-python/pull/183): Fixes to DataFrame writing.
1111
1. [#181](https://github.com/influxdata/influxdb-client-python/pull/181): Encode Point whole numbers without trailing `.0`
1212

13+
### Documentation
14+
1. [#189](https://github.com/influxdata/influxdb-client-python/pull/189): Updated docs about `DeleteApi`.
15+
1316
## 1.13.0 [2020-12-04]
1417

1518
### Features

README.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ InfluxDB 2.0 client features
6565
- `How to efficiently import large dataset`_
6666
- `Efficiency write data from IOT sensor`_
6767
- `How to use Jupyter + Pandas + InfluxDB 2`_
68+
- Advanced Usage
69+
- `Gzip support`_
70+
- `Delete data`_
6871

6972
Installation
7073
------------
@@ -898,6 +901,34 @@ Gzip support
898901
899902
.. marker-gzip-end
900903
904+
Delete data
905+
^^^^^^^^^^^
906+
.. marker-delete-start
907+
908+
The `delete_api.py <influxdb_client/client/delete_api.py>`_ supports deletes `points <https://v2.docs.influxdata.com/v2.0/reference/glossary/#point>`_ from an InfluxDB bucket.
909+
910+
.. code-block:: python
911+
912+
from influxdb_client import InfluxDBClient
913+
914+
client = InfluxDBClient(url="http://localhost:8086", token="my-token")
915+
916+
delete_api = client.delete_api()
917+
918+
"""
919+
Delete Data
920+
"""
921+
start = "1970-01-01T00:00:00Z"
922+
stop = "2021-02-01T00:00:00Z"
923+
delete_api.delete(start, stop, '_measurement="my_measurement"', bucket='my-bucket', org='my-org')
924+
925+
"""
926+
Close client
927+
"""
928+
client.__del__()
929+
930+
.. marker-delete-end
931+
901932
InfluxDB 1.8 API compatibility
902933
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
903934

docs/api.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ TasksApi
5757
:members:
5858

5959
DeleteApi
60-
""""""""
60+
"""""""""
6161
.. autoclass:: influxdb_client.DeleteApi
6262
:members:
63+
64+
.. autoclass:: influxdb_client.domain.DeletePredicateRequest
65+
:members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def setup(app):
3131

3232

3333
project = 'influxdb_client'
34-
copyright = '2019, Bonitoo.io'
34+
copyright = '2019 InfluxData, Inc'
3535
author = 'Robert Hajek, Jakub Bednar'
3636

3737
autoclass_content = 'both'

docs/usage.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Write
2222
:start-after: marker-writes-start
2323
:end-before: marker-writes-end
2424

25+
Delete data
26+
^^^^^^^^^^^
27+
.. include:: ../README.rst
28+
:start-after: marker-delete-start
29+
:end-before: marker-delete-end
30+
2531
Gzip support
2632
^^^^^^^^^^^^
2733
.. include:: ../README.rst

influxdb_client/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@
268268

269269
from influxdb_client.client.authorizations_api import AuthorizationsApi
270270
from influxdb_client.client.bucket_api import BucketsApi
271+
from influxdb_client.client.delete_api import DeleteApi
271272
from influxdb_client.client.labels_api import LabelsApi
272273
from influxdb_client.client.organizations_api import OrganizationsApi
273274
from influxdb_client.client.query_api import QueryApi

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