Note: The comercial DeepL API has been released. You should use it instead subscribing to DeepL Pro.
A Python API wrapper for the DeepL translation service.
pip install pydeeplPydeepl was written for both Python 2 and Python 3.
import pydeepl
sentence = 'I like turtles.'
from_language = 'EN'
to_language = 'ES'
translation = pydeepl.translate(sentence, to_language, from_lang=from_language)
print(translation)
# Using auto-detection
translation = pydeepl.translate(sentence, to_language)
print(translation)Pydeepl supports these languages:
| Code | Language |
|---|---|
| auto | Auto detect |
| DE | German |
| EN | English |
| FR | French |
| ES | Spanish |
| IT | Italian |
| NL | Dutch |
| PL | Polish |
| JA | Japanese |
Note that auto detection is only possible for the source language.
DeepL is a product from DeepL GmbH. More info: deepl.com/publisher.html
This package has been heavily inspired by node-deepls and DeepLy.
This project is licensed under the MIT License - see the LICENSE file for details