Skip to main content

sure_trans

Project description

sure-trans

pytestpythonCode style: blackLicense: MITPyPI version

Wrap translators with tenacity, auto-adapt

Install it

pip install sure-trans

# pip install git+https://github.com/ffreemt/sure-trans
# poetry add git+https://github.com/ffreemt/sure-trans
# git clone https://github.com/ffreemt/sure-trans && cd sure-trans

Use it

from sure_trans import sure_trans

print(sure_trans("书山有路勤为径", from_language="zh", to_language="en"))
# api used: iciba_api, took 4.57s
# only the diligent will be rewarded by God in their pursuit for knowledge

print(sure_trans("书中自有黄金屋", from_language="zh", to_language="en"))
# api used: caiyun_api, took 1.32s
# The book has its own house of gold

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sure_trans-0.1.0.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

sure_trans-0.1.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page