Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Use the same api to call the third party translator apis, such as google, tencent, baidu.
Use the same api to call the third party translator apis, such as google, tencent, baidu.
Python 3.7 or more latest version
pip install cloud-translator
The library support GoogleTranslator, TencentTranslator, BaiduTranslator, where GoogleTranslator depends on py-googletrans which not needs appid and appkey, but is not stable and probably blocked by google.
TencentTranslator and BaiduTranslator are rewritted with reference to the offical demo script to support python 3.7 version
from translator import *
# use google
translator = GoogleTranslator()
print(translator.translate('我是中国人', dest='en'))
# use baidu api
translator = BaiduTranslator(appid, appkey)
print(translator.translate('我是中国人', dest='en'))
# use tencent api
translator = TencentTranslator(appid, appkey)
print(translator.translate('我是中国人', dest='en'))
# throttle api call frequency.
translate_func = throttle(seconds=1)(translator.translate) # call api every second
for i in range(100):
translate_func('我是中国人', dest='en')
FAQs
Use the same api to call the third party translator apis, such as google, tencent, baidu.
We found that cloud-translator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.