Skip to main content

easygoogletranslate

Unofficial Google Translate API.

This library does not need an api key or something else to use, it's free and simple. You can either use a string or a file to translate but the text must be equal to or less than 5000 character. You can split your text into 5000 characters to translate more.

Google Translate supports 108 different languages. You can use any of them as source and target language in this application. If source language is not specified, it will detect source language automatically. This application supports multi thread translation, you can use it to translate multiple languages at once. Detailed language list can be found here: https://cloud.google.com/translate/docs/languages

Installation:

The easiest way to install easygoogletranslateis to download it from PyPI. Then you will be able to use the library.

pip install easygoogletranslate

Examples:

  1. Specify default source and target language at beginning and use it any time.
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate(
    source_language='en',
    target_language='de',
    timeout=10
)
result = translator.translate('This is an example.')

print(result) 
# Output: Dies ist ein Beispiel.
  1. Don't specify default parameters.
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate('This is an example.', target_language='tr')

print(result)
# Output: Bu bir örnektir.
  1. Override default parameters.
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate(target_language='tr')
result = translator.translate('This is an example.', target_language='fr')

print(result)
# Output: Ceci est un exemple.
  1. Translate a text in multiple languages at once via multi-threading.
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate(text='This is an example.', target_language=['tr', 'fr', 'de'])

print(result)
# Output: ['Bu bir örnektir.', 'Ceci est un exemple.', 'Dies ist ein Beispiel.']
  1. Translate a file in multiple languages at once via multi-threading.
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate_file(file_path='text.txt', target_language=['tr', 'fr', 'de'])

print(result)
# Output: ['Nasılsın?', 'Comment ca va?', 'Wie geht es Ihnen?']
# Text inside file: How are you?

Metadata

Release files for easygoogletranslate 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easygoogletranslate 0.0.4
File Size Uploaded Provenance Actions
easygoogletranslate-0.0.4.tar.gz 3.2 kB Without provenance Details for easygoogletranslate-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easygoogletranslate 0.0.4
File Interpreter ABI Platform Actions
easygoogletranslate-0.0.4-py3-none-any.whl Python 3 none any Details for easygoogletranslate-0.0.4-py3-none-any.whl

Total release size: 7.0 kB

Release files / easygoogletranslate-0.0.4.tar.gz

Download URL easygoogletranslate-0.0.4.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c906e3d055aec0b1892ef47f52cc6b345bf23c9add1cbf47a29229dcfcd7aa06
BLAKE2b-256 checksum
How to use checksums
25005b1b9049aa320c0fe2529dc1f8f9df01af78a91667fec51521e9464754f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / easygoogletranslate-0.0.4-py3-none-any.whl

Download URL easygoogletranslate-0.0.4-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7fb9f1529bbef83e80c770d0f813e99f485d6f1f32870dd53b6d0f2455c15bc
BLAKE2b-256 checksum
How to use checksums
bd87f80c32aa6afa4ccc0d88b540cad783f274b0a5a034fddb14987f030628c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Security for easygoogletranslate 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page