Skip to main content

The Python wrapper for Sogou Translate API

Project description

The Python wrapper for Sogou Translate API. Only Python 3.6 is supported.

sogou_translate_logo

sogou_translate_logo

Get started

You could install this library using pip:

pip install sogou-translate

Note: You might have to apply for the keys in order to use the service. If you wish to have a brief demo of this service, you could use the demo keys mentioned in the related web pages.

Example usage

from sogou_translate import SogouTranslate, SogouLanguages

trans = SogouTranslate('[Your pid]', '[Your secret key]')

en_text = 'Hello, world!'
zh_text = trans.translate(en_text, from_language=SogouLanguages.EN, to_language=SogouLanguages.ZH_CHS)
print(zh_text) # '你好,世界!'

License

The code is licensed under DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE. For more details, read the LICENSE file.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sogou_translate-1.0.1-py2.py3-none-any.whl (6.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sogou_translate-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sogou_translate-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 046333773235e4c86fd638aae87f62ed5e19d7980e850e3a0948101cce5c3f98
MD5 4709ee322df340ae00b838472c188b0e
BLAKE2b-256 c00a4124857a273041a5a2d10553ac8d86a472646962de29a7aba46d381e662f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page