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
Build a simple translation service that properly manages resources when translating text between languages.
Your service should:
The function should accept:
text: The text to translatesource_lang: The source language code (e.g., "en", "ko", "ja")dest_lang: The destination language code@generates
async def translate_text(text: str, source_lang: str, dest_lang: str) -> str:
"""
Translates text from source language to destination language.
Args:
text: The text to translate
source_lang: Source language code (e.g., "en", "ko", "ja")
dest_lang: Destination language code
Returns:
The translated text as a string
"""
passProvides translation capabilities.
@satisfied-by
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