I have searched through the library's code to see if I could find something that does this. I might be wrong, but it appears that as of right now there's no interface for this functionality.
However, it is possible to do what you want by executing the following:
from influxdb_client import InfluxDBClient
address = "myaddress"
token = "mytoken"
org = "myorg"
client = InfluxDBClient(url=address, token=token, org=org)
qapi = client.query_api()
q = 'import "influxdata/influxdb/schema"\n\nschema.measurements(bucket: "example-bucket")'
tables = qapi.query(q)
for table in tables:
print(table)
for record in table.records:
print(record.values)
You will have to substitute any defined variables from this code sample with your own. Also, make sure that the bucket name in the query matches the bucket you want to query.
Finally, the token you use must have enough permissions to accomplish the task.