CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-data-tables

Microsoft Azure Data Tables Client Library for Python

90

0.96x
Overview
Eval results
Files

task.mdevals/scenario-10/

High Availability Table Monitor

A monitoring system that checks the health and replication status of Azure Table Storage accounts configured with read-access geo-redundant storage (RA-GRS).

Capabilities

Retrieve Geo-Replication Statistics

  • The system retrieves service statistics including replication status and last sync time @test
  • The system handles cases where geo-replication data is unavailable @test

Secondary Endpoint Access

  • The system can configure a client to use the secondary (read-only) endpoint for read operations @test
  • The system can list tables from the secondary endpoint to verify replication @test

Implementation

@generates

API

from azure.data.tables import TableServiceClient
from typing import Dict, Optional, Any

def get_replication_status(
    account_name: str,
    account_key: str
) -> Dict[str, Any]:
    """
    Retrieves geo-replication statistics for a storage account.

    Args:
        account_name: Azure storage account name
        account_key: Azure storage account access key

    Returns:
        Dictionary containing:
        - 'status': Replication status string (e.g., 'live', 'bootstrap')
        - 'last_sync_time': Datetime of last successful sync, or None if unavailable
        - 'is_available': Boolean indicating if statistics are available

    Raises:
        Exception: If unable to retrieve service statistics
    """
    pass

def create_secondary_client(
    account_name: str,
    account_key: str
) -> TableServiceClient:
    """
    Creates a TableServiceClient configured to use the secondary endpoint.

    Args:
        account_name: Azure storage account name
        account_key: Azure storage account access key

    Returns:
        TableServiceClient configured for secondary endpoint access
    """
    pass

def verify_table_replication(
    account_name: str,
    account_key: str,
    table_name: str
) -> bool:
    """
    Verifies that a specific table exists on the secondary endpoint.

    Args:
        account_name: Azure storage account name
        account_key: Azure storage account access key
        table_name: Name of the table to verify

    Returns:
        True if the table exists on the secondary endpoint, False otherwise
    """
    pass

Dependencies { .dependencies }

azure-data-tables { .dependency }

Provides Azure Table Storage client library with support for geo-redundant storage access.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/pypi-azure-data-tables

tile.json