DeepL Translate
An unofficial python package to translate text using DeepL.
Installation
pip install deepl-translate
Usage
Supported languages
Currently the following languages are supported:
| Abbreviation | Language | Writing in own language |
|---|---|---|
| BG | Bulgarian | Български |
| ZH | Chinese | 中文 |
| CS | Czech | Česky |
| DA | Danish | Dansk |
| NL | Dutch | Nederlands |
| EN | English | English |
| ET | Estonian | Eesti |
| FI | Finnish | Suomi |
| FR | French | Français |
| DE | German | Deutsch |
| EL | Greek | Ελληνικά |
| HU | Hungarian | Magyar |
| IT | Italian | Italiano |
| JA | Japanese | 日本語 |
| LV | Latvian | Latviešu |
| LT | Lithuanian | Lietuvių |
| PL | Polish | Polski |
| PT | Portuguese | Português |
| RO | Romanian | Română |
| RU | Russian | Русский |
| SK | Slovak | Slovenčina |
| SL | Slovenian | Slovenščina |
| ES | Spanish | Español |
| SV | Swedish | Svenska |
You can either input the abbreviation or the language written in english.
Command line tool
Help
deepl --help
usage: deepl [-h] [--version] [--formal | --informal] [-t TEXT | -f FILE] source_language target_language
Python client to translate texts using deepl.com
positional arguments:
source_language Source language of your text
target_language Target language of your desired text
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--formal Use formal tone in translation
--informal Use informal tone in translation
-t TEXT, --text TEXT Text to be translated
-f FILE, --file FILE File to be translated
Example 1
This will translate a Spanish (ES) text into Russian (RU):
deepl spanish russian -t "¡Buenos días!"
Доброе утро!
Example 2
This will translate the file (test.txt) text from Italian (IT) into Portuguese (PT):
deepl IT PT --file test.txt
Example 3
This will translate a Spanish (ES) text into Russian (RU) in formal tone:
deepl ES RU --text "¿Cómo te llamas?" --formal
Как Вас зовут?
Note: informal would be "Как тебя зовут?"
Example 4
This will translate a Japanese (JP) text into German (DE) in informal tone:
deepl JP DE --text "お元気ですか?" --informal
Wie geht es dir?
Note: formal would be "Wie geht es Ihnen?"
Python library
Example 1
This will translate a Chinese (ZH) text into Dutch (NL):
import deepl
deepl.translate(source_language="ZH", target_language="NL", text="你好")
'Hallo'
Example 2
This will translate a danish text into german in informal tone:
import deepl
deepl.translate(source_language="danish", target_language="german", text="Ring til mig!", formality_tone="informal")
'Ruf mich an!'
Metadata
Release files for deepl-translate 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepl-translate-1.2.0.tar.gz | 6.7 kB | Without provenance | Details for deepl-translate-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepl_translate-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for deepl_translate-1.2.0-py3-none-any.whl |
Total release size: 14.8 kB
Release files / deepl-translate-1.2.0.tar.gz
| Download URL | deepl-translate-1.2.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24622d3a9af26f6dc401eefbc536c19bd5fc11d4c2cdfe235c403a8575eff992
|
|
BLAKE2b-256 checksum How to use checksums |
5f3532a32d8dbb51dc34f5ffdbb8019e4bd638e08cbe84a43560607d793c4561
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / deepl_translate-1.2.0-py3-none-any.whl
| Download URL | deepl_translate-1.2.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c61586dfbad1a00beb7a9dba7560b2c1e1b8d7bd7899df6b3710cce56605528
|
|
BLAKE2b-256 checksum How to use checksums |
587ca1a0d7519fa0a898f21ea21507a53c343f87b6c8a312f860374f8fc0b877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for deepl-translate 1.2.0
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.