Socket
Socket
Sign inDemoInstall

baidufanyi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baidufanyi

A simple SDK for the Baidu Translation API (unofficial)


Maintainers
1

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

  1. 支持多行,自动合并

  2. 简单易用,立即上手

  3. 支持多种语言的设置

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc