Skip to main content

Google Translate Client with `deep-translator`

Project description

Google Translate Client with deep-translator

Install

python3 -m pip install googletranslate-python

Usage

Python

from googletranslatepy import Translator

# use a http proxies
translator = Translator(proxies='http://127.0.0.1:10809')

# use a socks5 proxies
translator = Translator(proxies='socks5://127.0.0.1:10808')

translator.translate('Life is short, you need Python!')
# '人生苦短,你需要 Python!'

CMD

googletranslate --help

# translate a string text
googletranslate -p http://127.0.0.1:10809 'Life is short, you need Python!'

# translate a file
googletranslate -p http://127.0.0.1:10809 README.md

# set proxies to env
GOOGLE_PROXIES=http://127.0.0.1:10809 googletranslate 'hello world'

# or add to: ~/.bash_profile
export GOOGLE_PROXIES=http://127.0.0.1:10809
# and then use it directly
googletranslate 'hello world'

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

googletranslate-python-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

googletranslate_python-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file googletranslate-python-1.0.0.tar.gz.

File metadata

File hashes

Hashes for googletranslate-python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1f8059c03e276e615c054a3ce84809293f1c3f8267a4205a394312d0cfd2c90a
MD5 bd70e89aae5e4458388fbd3f2a9f54e0
BLAKE2b-256 d0428c3b5c1e645148d8277dab8eda3c354ea3395b3f73ae8ff0df2dc7ae309b

See more details on using hashes here.

File details

Details for the file googletranslate_python-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for googletranslate_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbf1ea60837476b50fc99c3790b205b3af17d124cdffdb13acbd4a1aa50619c8
MD5 d1286622ddea3db181b0795b1f5c8144
BLAKE2b-256 da3d94273613a5df1ca415627c3bd6156dc3851628cd221b1a91331eea90c6b4

See more details on using hashes here.

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