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 simple application for logging temperature sensor readings to a time-series database with immediate write confirmation.
Write temperature sensor readings to a time-series database. Each reading should be written immediately and wait for confirmation before proceeding to the next operation.
Given a bucket "sensors" and a measurement name "temperature", write a data point with tag "sensor_id"="sensor_1", field "value"=23.5, and timestamp 1609459200000000000 (nanoseconds). Verify the write completes successfully. @test
Given a bucket "sensors", write three consecutive data points with different sensor IDs (sensor_1, sensor_2, sensor_3) and values (21.0, 22.5, 24.0), each with sequential timestamps. All writes should complete before returning. @test
Control the precision of timestamps when writing data points.
Write a data point with millisecond precision timestamp 1609459200000 (milliseconds), and verify it's correctly stored at that precision level. @test
Write a data point with second precision timestamp 1609459200 (seconds), and verify it's correctly stored at that precision level. @test
@generates
from influxdb_client import InfluxDBClient
from typing import Optional
def write_temperature_reading(
client: InfluxDBClient,
bucket: str,
sensor_id: str,
temperature: float,
timestamp: int,
precision: str = "ns"
) -> None:
"""
Write a single temperature reading to InfluxDB with immediate confirmation.
Args:
client: InfluxDB client instance
bucket: Target bucket name
sensor_id: Unique sensor identifier
temperature: Temperature value in Celsius
timestamp: Unix timestamp in the specified precision
precision: Time precision - "ns", "us", "ms", or "s" (default: "ns")
"""
pass
def write_temperature_batch(
client: InfluxDBClient,
bucket: str,
readings: list[dict]
) -> None:
"""
Write multiple temperature readings sequentially with immediate confirmation for each.
Args:
client: InfluxDB client instance
bucket: Target bucket name
readings: List of dicts with keys 'sensor_id', 'temperature', 'timestamp'
"""
passProvides time-series database client functionality for writing sensor data.
@satisfied-by