Python translation libraries

Updated Nov 2026

Python translation libraries convert text from one human language to another from Python code. A client either sends each string to a hosted translation service or runs a downloaded language model on the local machine. These libraries let apps and AI agents serve content in a reader's own language.

Popularity

google-cloud-translate has the most monthly downloads in this comparison, at 8.8M.

LibraryMonthly downloadsStarsLast releaseLicense
google-cloud-translate
8.8M
5.4KOct 2026Apache-2.0
Googletrans
2.2M
4.3KJan 2025MIT
deep-translator
1.8M
2.0KJun 2023MIT
DeepL Python
1.3M
1.3KNov 2026MIT
Argos Translate
489.6K
6.6KFeb 2026MIT OR CC0
Translate
287.5K
760Jul 2026MIT
LibreTranslate-py
287.1K
131Apr 2024MIT
Azure Text Translation
245.5K
5.6KMay 2026MIT
Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

google-cloud-translate

Provides the client library for the Google Cloud Translate API.

Downloads / mo
8.8M
Stars
5.4K
Last release
3.28.0
License
Apache-2.0

Quickstart

From README.md
$ pip install google-cloud-translate
from google.cloud import translate_v3
project_id = 'YOUR_PROJECT_ID'
client = translate_v3.TranslationServiceClient()
response = client.translate_text(request={
    'parent': f'projects/{project_id}/locations/global',
    'contents': ['Hello world!'], 'mime_type': 'text/plain', 'target_language_code': 'es',
})
print(response.translations[0].translated_text)

google-cloud-translate examples

From open-source projects on GitHub

Provides a Python client for Google Translate’s public web interface.

Downloads / mo
2.2M
Stars
4.3K
Last release
4.0.2
License
MIT

Strengths

  • Detects source language automatically. Omit the source language to let the service detect it.
  • Translates lists in one session. Pass a list of strings to translate a batch through one HTTP session.

Limitations

  • Unstable web API dependency. Translation relies on an unofficial web API without a stability guarantee.
  • Client IPs can be blocked. Server-side IP blocks can cause failed translation requests.

Quickstart

From README.rst
$ pip install googletrans
import asyncio
from googletrans import Translator
async def translate_text():
    async with Translator() as translator:
        result = await translator.translate('안녕하세요.', dest='en')
        print(result.text)
asyncio.run(translate_text())

Googletrans examples

From open-source projects on GitHub

deep-translator

Provides translator classes and helpers for several remote translation services.

Downloads / mo
1.8M
Stars
2.0K
Last release
1.11.4
License
MIT

Strengths

  • Uses several translation services. Choose translator classes behind a similar Python interface.
  • Supports text-list translation. Call translate_batch() to translate a list of input strings.

Limitations

  • File translation returns a string. translate_file() returns translated text; writing a document is a separate step.
  • Separate detection needs credentials. Supply an API key when calling the standalone language-detection helpers.

Quickstart

From usage.html
$ pip install deep-translator
from deep_translator import GoogleTranslator
translated = GoogleTranslator(source='auto', target='de').translate('Hello world!')
print(translated)

deep-translator examples

From open-source projects on GitHub

DeepL Python

Translates text and document files through the DeepL API.

Downloads / mo
1.3M
Stars
1.3K
Last release
1.33.0
License
MIT

Strengths

  • Translates document files. Translate files through input and output paths or file objects.
  • Applies custom terminology. Supply glossary entries to customize translations of selected terms.

Limitations

  • Translation requires API credentials. Create an API account and supply an authentication key.

Quickstart

From README.md
$ pip install deepl
import deepl

auth_key = "f63c02c5-f056-..."  # Replace with your key
deepl_client = deepl.DeepLClient(auth_key)

result = deepl_client.translate_text("Hello, world!", target_lang="FR")
print(result.text)  # "Bonjour, le monde !"

Argos Translate

Translates locally using installed language-pair model packages.

Downloads / mo
489.6K
Stars
6.6K
Last release
1.11.0
License
MIT OR CC0

Strengths

  • Runs translation locally. Run translation locally after the required models are installed.
  • Connects indirect language pairs. Use intermediate-language models when a direct translation pair is missing.

Limitations

  • Models must be installed first. Install the requested language-pair package before translating text locally.
  • Indirect translations can lose quality. Translating through an intermediate language can reduce output quality.
  • Document translation needs an add-on. Install argos-translate-files to read and write translated document files.

Quickstart

From README.md
$ pip install argostranslate
import argostranslate.package
import argostranslate.translate

from_code = "en"
to_code = "es"

# Download and install Argos Translate package
argostranslate.package.update_package_index()
available_packages = argostranslate.package.get_available_packages()
package_to_install = next(
    filter(
        lambda x: x.from_code == from_code and x.to_code == to_code, available_packages
    )
)
argostranslate.package.install_from_path(package_to_install.download())

# Translate
translatedText = argostranslate.translate.translate("Hello World", from_code, to_code)
print(translatedText)
# '¡Hola Mundo!'

Argos Translate examples

From open-source projects on GitHub

Translates text from the command line or as a Python module, with Google Translate behind it.

Downloads / mo
287.5K
Stars
760
Last release
3.8.1
License
MIT

Quickstart

From README.rst
$ pip install translate
from translate import Translator
translator = Translator(to_lang='de')
translation = translator.translate('Hello world!')
print(translation)

LibreTranslate-py

Provides Python bindings for the LibreTranslate API.

Downloads / mo
287.1K
Stars
131
Last release
2.1.4
License
MIT

Quickstart

From README.md
$ pip install libretranslatepy
from libretranslatepy import LibreTranslateAPI
client = LibreTranslateAPI('http://localhost:5000')
print(client.translate('Hello world!', 'en', 'es'))

Azure Text Translation

Provides the Azure AI Translation Text client library for Python.

Downloads / mo
245.5K
Stars
5.6K
Last release
2.0.0
License
MIT

Quickstart

From README.md
$ pip install azure-ai-translation-text
from azure.ai.translation.text import TextTranslationClient
from azure.core.credentials import AzureKeyCredential
client = TextTranslationClient(endpoint='YOUR_TRANSLATOR_ENDPOINT', credential=AzureKeyCredential('YOUR_API_KEY'), region='YOUR_REGION')
response = client.translate(body=['Hello world!'], to_language=['es'])
print(response[0].translations[0].text)

FAQ

DeepL Python suits apps with a DeepL API account that need document translation and glossaries. Argos Translate suits translation that runs locally after its models are installed. deep-translator suits code that switches between several translation services through one interface.

Argos Translate translates text locally with installed language-pair model packages. When a direct pair is missing, it translates through an intermediate language.

Googletrans relies on an unofficial web API without a stability guarantee. Server-side IP blocks can also cause failed translation requests.

google-cloud-translate is the client library for the Google Cloud Translate API. Googletrans calls the public Google Translate web interface instead.

deep-translator provides translator classes for several remote translation services behind a similar Python interface.

For coding agents

Found your translation library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official