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%
Build a system that ingests temperature sensor data into a time-series database and monitors the ingestion process. The system should track successful writes, handle errors gracefully, and provide visibility into the ingestion pipeline.
The system should ingest temperature readings with the following structure:
temperaturesensor_id (string), location (string)value (float, in Celsius)Implement a monitoring system that tracks:
The monitoring statistics should be accessible via a get_stats() function that returns a dictionary with keys: successful_batches, failed_batches, retry_attempts, and errors (list of error strings).
Configure the write API to:
Create a function generate_sensor_data(count) that generates count temperature readings with:
Provides time-series database client functionality.
File: test_monitor.py
Description: Verify that successful batch writes are counted correctly.
Setup:
Expected Result:
successful_batches should be 3 (15 points / 5 per batch)failed_batches should be 0retry_attempts should be 0File: test_monitor.py
Description: Verify that write errors are captured and counted.
Setup:
Expected Result:
failed_batches should be at least 1errors list should contain at least one error messageFile: test_monitor.py
Description: Verify that retry attempts are counted when writes fail with retryable errors.
Setup:
Expected Result:
retry_attempts should be greater than 0 when a retryable error occurs