Skip to main content

baidu translate for free with async and proxy support

Project description

freemt-utils Python3.6|3.7 packageCodecovPyPI version

various utils for freemt

Update v.0.0.7

langcode_to_tmxcode: need (marisa-trie) and langcodes.

If you don't have VC in the system, you'll need to install a whl version of marisa-trie that can be downloaded from


pip install freemt-utils

Validate installation

python -c "import freemt_utils; print(freemt_utils.__version__)"


from pathlib import Path
import asyncio
from freemt_utils import save_tempfile, switch_to, httpx_get, make_url, arun, fetch_proxies, logger_level

with switch_to():
  print(Path.cwd())  # home dir
print(Path.cwd())  # back to the current work directory

except Exception as exc:
  print(exc)  # InvalidURL: No scheme included in URL.

res = arun(httpx_get(make_url('')))
# Headers([('bdpagetype', '1'), ('bdqid',...


res.encoding = 'UTF-8'
save_tempfile(res.text)  # display res.text in the default browser

Project details

Download files

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

Files for freemt-utils, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size freemt_utils-0.1.1-py3-none-any.whl (13.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size freemt-utils-0.1.1.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page