free-deepl-translator
Unofficial free DeepL translator client for Python — this package lets you translate text using DeepL without requiring an API key by or an Auth token.
⚠️ Unofficial: this project reverse-engineers DeepL's web protocol. It may break if DeepL changes their site and may violate DeepL's Terms of Service. Use at your own risk.
Installation
Install from PyPI:
pip install free-deepl-translator
Quick example
import free_deepl_translator as deepl
# Create the client
deepl_instance = deepl.DeeplTranslator()
# Create a session (returns True on success and False on failure)
d = deepl_instance.Session() # use *.SessionAsync() for async version
if d != True:
print(f"Error")
exit(1)
print("Session created")
# Simple translate to French
translated = deepl_instance.Translate("H-h-how are you ?\nPlease answer me", target_lang="fr") # use *.TranslateAsync() for async version
if translated["status"] == 0:
print(f"Translated text: {translated['text']}")
#time.sleep(5)
# Translate from French to English
translated = deepl_instance.Translate("Je vais bien, merci", target_lang="en", source_lang="fr")
if translated["status"] == 0:
print(f"Translated text: {translated['text']}")
# Advanced call: specify model, glossary and formality
translated = deepl_instance.Translate(
"Can you please send me the report?",
target_lang="ja",
source_lang="en",
target_model="next-gen",
glossary=[{"source": "report", "target": "動画"}],
formality="formal",
)
if translated["status"] == 0:
print(f"Translated text: {translated['text']}")
# Close the Session
deepl_instance.Close() # use *.CloseAsync() for async version
To use it with Async you can use SessionAsync(), TranslateAsync() and CloseAsync().
Return format
Translate() and TranslateAsync() return a dictionary like:
{
"status": 0, # 0 = success, non-zero = error
"text": "...", # translated text when successful
"msg": "...", # error message (when status != 0)
}
Features
- Translate text without an API key (no auth).
- Supports explicit
source_lang. target_modelselection (e.g.next-genorclassic).- Glossary entries (list of
{source, target}mappings). formality | tonecontrol.
Metadata
Release files for free-deepl-translator 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| free_deepl_translator-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for free_deepl_translator-1.3.1-py3-none-any.whl |
Release files / free_deepl_translator-1.3.1-py3-none-any.whl
| Download URL | free_deepl_translator-1.3.1-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f258e3b8aacf098ccd2976f90d4793d56a7a3c7a46eb50b5d5bbd519fc681b7
|
|
BLAKE2b-256 checksum How to use checksums |
967f6d45fca9e7b64680af8b23ef6f24bd8df16061d6861ecdc44feae0ac27f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for free-deepl-translator 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.