libretranslatepy
Python bindings for LibreTranslate API
What it is and what it does
LibreTranslate-py is a lightweight Python wrapper around the LibreTranslate API, a free and open-source translation service. It handles the HTTP communication with a LibreTranslate endpoint and exposes three main operations: translating text between language pairs, detecting the language of input text, and retrieving the list of supported languages. The package uses only Python standard library (urllib and json), so it has zero runtime dependencies and installs quickly.
You point it at a LibreTranslate endpoint—either a public mirror or a self-hosted instance—and call methods to translate, detect, or list languages. It's useful when you want programmatic access to LibreTranslate without building HTTP requests manually. The package is stable and permissively licensed, but has not been updated in over 850 days, so compatibility with the latest LibreTranslate API versions should be verified before relying on it in production.
Use it for:
- Translate user-submitted text in a web application by calling a LibreTranslate mirror without managing HTTP requests directly.
- Detect the language of incoming messages to route them to language-specific processing pipelines.
- Query available languages from a LibreTranslate endpoint to populate UI dropdowns or validate language codes.
- Build a simple CLI tool that wraps LibreTranslate for batch text translation tasks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for the LibreTranslate API that provides text translation, language detection, and language listing across multiple translation backends.
Yes, if you are already using LibreTranslate and want a simple Python client. The package is permissively licensed, has no dependencies, and installs cleanly. However, verify that it works with your target LibreTranslate version before production use, given the 850-day gap since the last release. For new projects, consider whether calling the LibreTranslate API directly via requests or urllib is simpler than adding a dependency.
Install
libretranslatepy on PyPI
pip
pip install libretranslatepyuv
uv add libretranslatepypoetry
poetry add libretranslatepyInstalling libretranslatepy
Before you install
Low friction install with no runtime dependencies. Last release was in April 2024 and the repository remains active, though the package is aging—no updates in over 850 days.
License in practice
Licensed under MIT or Public Domain (permissive), so you can use it freely in commercial or private projects with minimal attribution requirements.
Quickstart
pip install libretranslatepy
from libretranslatepy import LibreTranslateAPI
lt = LibreTranslateAPI("https://libretranslate.com/")
print(lt.translate("Hello", "en", "es"))
print(lt.detect("Hello"))
print(lt.languages())
Requires a running LibreTranslate API endpoint (either self-hosted or a public mirror); the package itself is a client library and does not provide translation services.
Verify before relying
- Whether the package works reliably with current LibreTranslate API versions given the 850-day gap since last release.
- Support status for Python 2 (listed in classifiers but likely obsolete given modern Python ecosystem).
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=2.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 850 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 414,381/month — #6,834 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: libretranslatepy-2.1.4-py3-none-any.whl
Keywords: translation, libretranslate
Tags
More Interface Engine/Protocol Translator packages
Fetches financial and market data from Yahoo…
permissive · top 1,000 on PyPI
jsonconversionConverts arbitrary Python objects to JSON…
permissive · top 5,000 on PyPI
crcmodComputes Cyclic Redundancy Check (CRC) values…
permissive · top 5,000 on PyPI
pyusbPyUSB provides Python access to USB devices on…
permissive · top 5,000 on PyPI
PyVISAPyVISA provides Python bindings to VISA…
permissive · top 5,000 on PyPI
PyVISA-pyPyVISA-py is a pure Python backend for the VISA…
permissive · top 5,000 on PyPI
translateTranslate text between languages via command…
permissive · top 15,000 on PyPI
deep-translatorTranslates text between languages using…
permissive · top 5,000 on PyPI
translatorsTranslators provides a unified Python interface…
copyleft · top 15,000 on PyPI
azure-ai-translation-textProvides a Python client for Azure's neural…
unclear · top 15,000 on PyPI
argostranslateArgos Translate is an open-source offline…
permissive · top 15,000 on PyPI
deeplProvides a Python client to interact with the…
permissive · top 5,000 on PyPI
googletransGoogletrans translates text and detects…
permissive · top 5,000 on PyPI
google-cloud-translatePython client library for Google Cloud…
permissive · top 1,000 on PyPI
googletrans-pyProvides free Google Translate API access for…
permissive · top 15,000 on PyPI
python-lokalise-apiPython client library for the Lokalise API v2,…
permissive · top 15,000 on PyPI