Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Add functions to SHOW TAG KEYS and SHOW FIELD KEYS#779

Open
tuykroa wants to merge4 commits intoinfluxdata:master
base:master
Choose a base branch
Loading
fromtuykroa:master
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletionsinfluxdb/client.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -673,6 +673,42 @@ def get_list_measurements(self):
"""
return list(self.query("SHOW MEASUREMENTS").get_points())

def get_list_tags(self):
"""Get the list of tags in InfluxDB.

:returns: all tags in InfluxDB
:rtype: list of dictionaries

:Example:

::

>> dbs = client.get_list_tags()
>> dbs
[{u'tagKey': u'tag1'},
{u'tagKey': u'tag2'},
{u'tagKey': u'tag3'}]
"""
return list(self.query("SHOW TAG KEYS").get_points())

def get_list_fields(self):
"""Get the list of fields in InfluxDB.

:returns: all fields in InfluxDB
:rtype: list of dictionaries

:Example:

::

>> dbs = client.get_list_fields()
>> dbs
[{u'fieldKey': u'field1', u'fieldType': u'type1'},
{u'fieldKey': u'field2', u'fieldType': u'type2'},
{u'fieldKey': u'field3', u'fieldType': u'type3'}]
"""
return list(self.query("SHOW FIELD KEYS").get_points())

def drop_measurement(self, measurement):
"""Drop a measurement from InfluxDB.

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp