Skip to main content

Free baidu Translate API for Python. Translates totally free of charge.

Project description

=============================================================== baidu_trans: Free baidu translate API for Python

|GitHub license| |travis status| |version|

python 3.4+

python 2.7+


Quickstart

You can install it from PyPI:

.. sourcecode:: bash

$ pip install baidu_trans

.. or manual install:

.. sourcecode:: bash

$ pip install pytest $ pip install flake8 $ pip install coverage $ pip install PyExecJS

$ python setup.py test $ python setup.py install

..

single sentence translation

.. code:: python

>>> from baidu_trans import Translator
>>> translator = Translator.translator(src='en', dest='fr')
>>> translator.translate('china')
'Chine'
multiple sentence translation

.. code:: python

from GoogleFreeTrans import Translator translator = Translator.translator(src='en', dest='fr') translator.translate('china. french') [[['Chine. ', 'china.', None, None, 1], ['français.', 'french.', None, None, 1]], None, 'en']


support language

.. code::

'afrikaans': 'af', 'arabic': 'ar', 'belarusian': 'be', 'bulgarian': 'bg', 'catalan': 'ca', 'czech': 'cs', 'welsh': 'cy', 'danish': 'da', 'german': 'de', 'greek': 'el', 'english': 'en', 'esperanto': 'eo', 'spanish': 'es', 'estonian': 'et', 'persian': 'fa', 'finnish': 'fi', 'french': 'fr', 'irish': 'ga', 'galician': 'gl', 'hindi': 'hi', 'croatian': 'hr', 'hungarian': 'hu', 'indonesian': 'id', 'icelandic': 'is', 'italian': 'it', 'hebrew': 'iw', 'japanese': 'ja', 'korean': 'ko', 'latin': 'la', 'lithuanian': 'lt', 'latvian': 'lv', 'macedonian': 'mk', 'malay': 'ms', 'maltese': 'mt', 'dutch': 'nl', 'norwegian': 'no', 'polish': 'pl', 'portuguese': 'pt', 'romanian': 'ro', 'russian': 'ru', 'slovak': 'sk', 'slovenian': 'sl', 'albanian': 'sq', 'serbian': 'sr', 'swedish': 'sv', 'swahili': 'sw', 'thai': 'th', 'filipino': 'tl', 'turkish': 'tr', 'ukrainian': 'uk', 'vietnamese': 'vi', 'yiddish': 'yi', 'chinese_simplified': 'zh-CN', 'chinese_traditional': 'zh-TW', 'auto': 'auto'

.. |GitHub license| image:: https://img.shields.io/github/license/mashape/apistatus.svg :target: http://opensource.org/licenses/MIT .. |travis status| image:: https://travis-ci.org/ziliwang/GoogleFreeTrans.svg?branch=master :target: https://travis-ci.org/ziliwang/GoogleFreeTrans .. |version| image:: https://img.shields.io/github/release/ziliwang/GoogleFreeTrans.svg :target: https://github.com/ziliwang/GoogleFreeTrans/releases

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

baidu_trans-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file baidu_trans-0.1.3.tar.gz.

File metadata

  • Download URL: baidu_trans-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.12

File hashes

Hashes for baidu_trans-0.1.3.tar.gz
Algorithm Hash digest
SHA256 de691feadc15ef6626ad546978e94c2c06fd73d1cab3c434750461499ec8701f
MD5 3db3db9747931a63cf272ad9f343c7db
BLAKE2b-256 5e171e6d6a2c6b6fd463188be445da6ce01b0677a889f531b38e7389d37a51bf

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