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
Built Distribution
File details
Details for the file googletranslate-python-1.0.1.tar.gz
.
File metadata
- Download URL: googletranslate-python-1.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6084beccb88031c4e83a44f8666ec9befc6a81900a43c2d1c996badf618c7a40 |
|
MD5 | c6eabf6ca51e1dc1374061c7866e5b75 |
|
BLAKE2b-256 | e66dfd37b4cdc6c8d231d75b23dcc0fe78e0c790271ce54525d47e4ceacff994 |
File details
Details for the file googletranslate_python-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: googletranslate_python-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28f1deaf5afb1fae48927c6a2c2eee63e2823f3a1f4b3e0aac798484fdb01ab2 |
|
MD5 | 01680d85b0d8ee935c2be264a6203e27 |
|
BLAKE2b-256 | 5ac6f101ca6a96ee59c3cabb6c0250b8d88d1294fd3ad626f9039c5a3dded5eb |