or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/web3@7.13.x
tile.json

tessl/pypi-web3

tessl install tessl/pypi-web3@7.13.0

A Python library for interacting with Ethereum blockchain

Agent Success

Agent success rate when using this tile

88%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

87%

task.mdevals/scenario-2/

Node Sync Status Checker

A utility to check if an Ethereum node is synchronized with the blockchain network.

Capabilities

Check Node Synchronization Status

Build a function that queries whether an Ethereum node is currently synchronizing with the network and returns detailed synchronization information when available.

  • Returns False when the node is fully synchronized @test
  • Returns a dictionary with sync details (starting block, current block, highest block) when the node is actively syncing @test
  • Handles connection errors gracefully by returning None @test

Format Sync Progress

Create a function that takes synchronization data and formats it into a human-readable progress report.

  • Returns "Node is fully synchronized" when sync status is False @test
  • Returns formatted string showing progress percentage and block numbers when syncing @test
  • Returns "Unable to determine sync status" when sync data is None @test

Implementation

@generates

API

from typing import Union, Dict, Any, Optional

def get_sync_status(provider_uri: str) -> Union[bool, Dict[str, Any], None]:
    """
    Query the synchronization status of an Ethereum node.

    Args:
        provider_uri: The URI of the Ethereum node provider (e.g., HTTP endpoint)

    Returns:
        - False if the node is fully synchronized
        - Dict with keys 'startingBlock', 'currentBlock', 'highestBlock' if syncing
        - None if unable to connect or query the node
    """
    pass

def format_sync_progress(sync_status: Union[bool, Dict[str, Any], None]) -> str:
    """
    Format synchronization status into a human-readable message.

    Args:
        sync_status: The sync status returned from get_sync_status()

    Returns:
        A formatted string describing the sync status
    """
    pass

Dependencies { .dependencies }

web3 { .dependency }

Provides Python interface for interacting with Ethereum blockchain nodes.

@satisfied-by