An unofficial Google Translate API for Python providing free text translation and language detection capabilities
Overall
score
100%
Evaluation — 100%
↑ 1.01xAgent success when using this tile
{
"context": "This criteria evaluates how well the engineer utilizes googletrans's advanced type system, including proper type annotations, correct usage of Union types, and understanding of the package's method overloading that returns different types based on input types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Translator import",
"description": "Correctly imports the Translator class from googletrans package",
"max_score": 5
},
{
"name": "Type imports",
"description": "Imports Translated and Detected types from googletrans for proper type annotations",
"max_score": 10
},
{
"name": "Async translate usage",
"description": "Uses await translator.translate() for translating text, properly handling the async nature of the API",
"max_score": 15
},
{
"name": "Async detect usage",
"description": "Uses await translator.detect() for language detection, properly handling the async nature of the API",
"max_score": 15
},
{
"name": "Union type annotations",
"description": "Uses typing.Union[str, typing.List[str]] type annotations for method parameters that accept both single strings and lists",
"max_score": 15
},
{
"name": "Return type annotations",
"description": "Uses typing.Union[Translated, typing.List[Translated]] and typing.Union[Detected, typing.List[Detected]] for return type annotations to reflect different return types based on input",
"max_score": 15
},
{
"name": "Batch translation",
"description": "Correctly passes lists of strings to translator.translate() for batch processing, taking advantage of the package's overloaded method signature",
"max_score": 10
},
{
"name": "Batch detection",
"description": "Correctly passes lists of strings to translator.detect() for batch language detection, taking advantage of the package's overloaded method signature",
"max_score": 10
},
{
"name": "Resource management",
"description": "Properly manages Translator lifecycle by storing an instance and calling appropriate cleanup, or using async context manager pattern with 'async with Translator()'",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-googletrans@4.0.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10