Baidu Fanyi
Description
A simple SDK for the Baidu Translation API (unofficial)
一个简单的用于调用百度翻译api的包。
Install
pip3 install baidufanyi
Usage
from baidufanyi import BaiduFanyi # 注意大小写
APPID = "your appid"
APPKEY = "your appkey"
# APPID 与 APPKEY 可在百度翻译开放平台获取,标准版可免费使用
fanyi = BaiduFanyi(APPID, APPKEY)
print(fanyi.translate("hello world", fromLang="auto", toLang="zh"))
# fromLang 和 toLang 格式请查阅百度翻译api文档
Features
-
支持多行,自动合并
-
简单易用,立即上手
-
支持多种语言的设置
Release files for baidufanyi 0.3.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 | |
|---|---|---|---|
| baidufanyi-0.3.0.tar.gz | 14.7 kB | Details |
Release files / baidufanyi-0.3.0.tar.gz
| Download URL | baidufanyi-0.3.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cff141b65b3bebdf7fd196bc15d1d51b5e9ae913ed777f24bf0f3088f60b4a4e
|
|
BLAKE2b-256 checksum How to use checksums |
9c01f1e6a9c99a39f329e7ce1c546735e583d2945e740f51cc029dc8860c5d84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.9
|