用于deepl翻译服务的python api包装器。
pydeepl的Python项目详细描述
注:商业DeepL API已经发布。您应该使用它而不是订阅Deepl Pro。
Pydepl
用于DeepL翻译服务的python api包装器。
安装
pipinstallpydeepl
开始
python版本
pydeepl是为python 2和python 3编写的。
将pydeepl添加到应用程序中
importpydeeplsentence='I like turtles.'from_language='EN'to_language='ES'translation=pydeepl.translate(sentence,to_language,from_lang=from_language)print(translation)# Using auto-detectiontranslation=pydeepl.translate(sentence,to_language)print(translation)
支持的语言
Pydepl支持以下语言:
Code | Language |
---|---|
auto | Auto detect |
DE | German |
EN | English |
FR | French |
ES | Spanish |
IT | Italian |
NL | Dutch |
PL | Polish |
Note that auto detection is only possible for the source language.
许可证
这个项目是根据麻省理工学院的许可证授权的-参见 LICENSE有关详细信息的文件