File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 13
13
]
14
14
15
15
16
- __version__ = '2.5.0 '
16
+ __version__ = '2.5.1 '
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
3
+ import warnings
4
+
3
5
from influxdb .exceptions import InfluxDBClientError
4
6
5
7
_sentinel = object ()
@@ -37,6 +39,13 @@ def __getitem__(self, key):
37
39
The order in which the points are yielded is actually undefined but
38
40
it might change..
39
41
"""
42
+
43
+ warnings .warn (
44
+ ("ResultSet's ``__getitem__`` method will be deprecated. Use"
45
+ "``get_points`` instead." ),
46
+ DeprecationWarning
47
+ )
48
+
40
49
if isinstance (key , tuple ):
41
50
if 2 != len (key ):
42
51
raise TypeError ('only 2-tuples allowed' )
@@ -54,6 +63,17 @@ def __getitem__(self, key):
54
63
return self .get_points (name , tags )
55
64
56
65
def get_points (self , measurement = None , tags = None ):
66
+ """
67
+ Returns a generator for all the points that match the given filters.
68
+
69
+ :param measurement: The measurement name
70
+ :type measurement: str
71
+
72
+ :param tags: Tags to look for
73
+ :type tags: dict
74
+
75
+ :return: Points generator
76
+ """
57
77
58
78
# Raise error if measurement is not str or bytes
59
79
if not isinstance (measurement ,
You can’t perform that action at this time.
0 commit comments