or run

tessl search
Log in

Version

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

tessl/pypi-googletrans

tessl install tessl/pypi-googletrans@4.0.0

An unofficial Google Translate API for Python providing free text translation and language detection capabilities

Agent Success

Agent success rate when using this tile

100%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

99%

task.mdevals/scenario-6/

Translation Service with Timeout Handling

A translation service that handles network timeouts gracefully when performing language translation operations.

Capabilities

Configures connection timeout

  • The translator is configured with a 3-second connection timeout @test

Configures read timeout

  • The translator is configured with a 10-second read timeout @test

Configures write timeout

  • The translator is configured with a 3-second write timeout @test

Performs translation with timeout configuration

  • The translator successfully translates "Hello, world!" from English to Spanish with the configured timeouts @test

Implementation

@generates

API

async def translate_text(text: str, target_language: str) -> str:
    """
    Translates the given text to the target language using a translator
    with configured timeouts.

    Args:
        text: The text to translate
        target_language: The target language code (e.g., 'es', 'fr', 'de')

    Returns:
        The translated text as a string
    """
    pass

Dependencies { .dependencies }

googletrans { .dependency }

Provides translation capabilities with timeout configuration support.