Skip to main content

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

Metadata

Release files for sure-trans 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sure-trans 0.1.0
File Size Uploaded
sure_trans-0.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sure-trans 0.1.0
File Interpreter ABI Platform
sure_trans-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / sure_trans-0.1.0.tar.gz

Download URL sure_trans-0.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4e86d787d7b3609ea9824da5a980090de018ee8656dd3b84f8b11f8930e55d05
BLAKE2b-256 checksum
How to use checksums
175032b5d4c4f05266d1cef27f4e95dafd81732750987b07c26f6dfba1c13a34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.5 Windows/10

Release files / sure_trans-0.1.0-py3-none-any.whl

Download URL sure_trans-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d278211938749e4a3405428712776aaf8ba25c1fae90da31ba48e538ebf54d2d
BLAKE2b-256 checksum
How to use checksums
4e32e7d3e0e305edead7892c18c50e37ccd391e593df63003e8074f7ed9bc16d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.5 Windows/10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page