baidufanyi
v1.0.0
A simple SDK for the Baidu Translation API (unofficial)
A simple package for calling Baidu translation API.
pip3 install baidufanyi
from baidufanyi import BaiduFanyi # Pay attention to the capitalization APPID = "your appid"APPKEY = "your appkey"# APPID and APKEY can be obtained from Baidu Translation Open Platform, and the standard version can be used for free fanyi = BaiduFanyi(APPID, APPKEY)print(fanyi.translate ("hello world", fromLang="auto", toLang="zh")) #For fromLang and toLang formats, please refer to Baidu Translation API documentation
Support multiple lines and automatically merge
Easy to use, get started immediately
Supports multiple language settings