tessl install tessl/pypi-influxdb-client@1.49.0Comprehensive Python client library for InfluxDB 2.x with sync/async APIs for writing, querying, and managing time series data.
Agent Success
Agent success rate when using this tile
82%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.19x
Baseline
Agent success rate without this tile
69%
A Python application that queries time series data from an InfluxDB database and processes the results.
@generates
The implementation should:
class TimeSeriesQuerySystem:
"""A system for querying time series data from InfluxDB."""
def __init__(self, url: str, token: str, org: str, bucket: str):
"""
Initialize the query system with connection parameters.
Args:
url: The InfluxDB server URL
token: Authentication token
org: Organization name
bucket: Default bucket name
"""
pass
def query_time_range(self, start: str, stop: str) -> list[dict]:
"""
Query all data within a time range.
Args:
start: Start time (e.g., "-1h", "-30m", "2024-01-01T00:00:00Z")
stop: Stop time (e.g., "now()", "2024-01-02T00:00:00Z")
Returns:
List of dictionaries containing measurement, tags, fields, and time
"""
pass
def query_with_filter(self, start: str, stop: str, tag_name: str, tag_value: str) -> list[dict]:
"""
Query data within a time range filtered by a tag.
Args:
start: Start time
stop: Stop time
tag_name: Name of the tag to filter on
tag_value: Value the tag must match
Returns:
List of dictionaries containing matching records
"""
pass
def close(self):
"""Close the database connection."""
passProvides Python client library for querying time series data from InfluxDB 2.x databases.