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 utility that demonstrates secure connection configuration for an InfluxDB time-series database client. The utility should support multiple SSL/TLS security scenarios commonly encountered in production environments.
Create a Python module that implements a secure client connection manager with the following capabilities:
The module should handle three distinct security scenarios:
Production Secure Connection: Connect to an InfluxDB instance using full SSL certificate verification with a custom Certificate Authority (CA) certificate file.
Development Connection: Connect to a development InfluxDB instance where SSL verification is disabled (for local testing environments only).
Standard HTTPS Connection: Connect to an InfluxDB cloud instance using standard HTTPS with default certificate verification enabled.
SecureClientManager class that can initialize connections for each of the three scenarios@generates
class SecureClientManager:
"""
Manages secure InfluxDB client connections with various SSL/TLS configurations.
"""
def __init__(self):
"""Initialize the secure client manager."""
pass
def create_production_client(self, url: str, token: str, org: str, ca_cert_path: str):
"""
Create a client configured for production use with custom CA certificate.
Args:
url: The InfluxDB server URL
token: Authentication token
org: Organization name
ca_cert_path: Path to the CA certificate file
Returns:
Configured InfluxDB client instance
"""
pass
def create_development_client(self, url: str, token: str, org: str):
"""
Create a client configured for development with SSL verification disabled.
Args:
url: The InfluxDB server URL
token: Authentication token
org: Organization name
Returns:
Configured InfluxDB client instance
"""
pass
def create_standard_client(self, url: str, token: str, org: str):
"""
Create a client configured with default SSL verification.
Args:
url: The InfluxDB server URL
token: Authentication token
org: Organization name
Returns:
Configured InfluxDB client instance
"""
pass
def verify_connection(self, client) -> bool:
"""
Verify that a client connection is working by performing a health check.
Args:
client: An InfluxDB client instance
Returns:
True if connection is healthy, False otherwise
"""
passProvides Python client library for InfluxDB 2.x with SSL/TLS configuration support.