CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-influxdb-client

Comprehensive Python client library for InfluxDB 2.x with sync/async APIs for writing, querying, and managing time series data.

82

1.18x
Overview
Eval results
Files

task.mdevals/scenario-3/

InfluxDB Connection Manager

A utility that manages secure connections to InfluxDB 2.x instances using token-based authentication and validates connection health.

Capabilities

Establish authenticated connection

  • Creates a client connection to InfluxDB using a URL, authentication token, and organization @test
  • Validates that the connection is successful by pinging the server @test

Handle authentication errors

  • Raises an appropriate error when authentication fails due to an invalid token @test
  • Properly closes the connection and releases resources @test

Implementation

@generates

API

class ConnectionManager:
    """Manages authenticated connections to InfluxDB instances."""

    def __init__(self, url: str, token: str, org: str):
        """
        Initialize the connection manager with InfluxDB credentials.

        Args:
            url: The InfluxDB server URL (e.g., "http://localhost:8086")
            token: Authentication token for InfluxDB
            org: Organization name or ID
        """
        pass

    def connect(self) -> bool:
        """
        Establish connection to InfluxDB and verify it's working.

        Returns:
            bool: True if connection and authentication successful

        Raises:
            Exception: If unable to authenticate or connect to server
        """
        pass

    def close(self):
        """Close the InfluxDB connection and cleanup resources."""
        pass

Dependencies { .dependencies }

influxdb-client { .dependency }

Provides Python client library for InfluxDB 2.x with token-based authentication support.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-influxdb-client

tile.json