Skip to main content

A Python3 library for translating text using Google Translate API.

Project description

gpytranslate

A Python3 library for translating text using Google Translate API.


Features

  • Dot accessible values
  • Supports emoji
  • Asynchronous
  • Type hinted
  • Free to use
  • Easy

Quick Start

Installation

Requirements:

  • Python 3.6 or higher.
$ python -m pip install gpytranslate

Usage

Example:

from gpytranslate import Translator
import asyncio


async def main():
    t = Translator()
    translation = await t.translate("Ciao come stai? Io bene ahah.", targetlang="en")
    language = await t.detect("Ciao come stai? Io bene ahah.")
    print(f"Translation: {translation.text}\nDetected language: {language}")


if __name__ == "__main__":
    asyncio.run(main())

Note: you could also check tests folder for extra examples

Output:

Translation: Hello how are you? I'm fine, haha.
Detected language: it

Development

Want to contribute? Pull requests are accepted!


License

GNU GPLv3

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

gpytranslate-1.0.2.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

gpytranslate-1.0.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file gpytranslate-1.0.2.tar.gz.

File metadata

  • Download URL: gpytranslate-1.0.2.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for gpytranslate-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f1239c05a325c6032ffd3b6c2a217454f4f9538b0f91fd9af7653b3ec4109aa4
MD5 edda421a42e206ffadc3080dd8519a76
BLAKE2b-256 037147762a20c0991c90161051214a42cb9b06ef277d417bb330b4014af2c332

See more details on using hashes here.

File details

Details for the file gpytranslate-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gpytranslate-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for gpytranslate-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 24d3831fa6ea02ea5125abbf949cccd7c1e02429a90b6ea7b660621950515264
MD5 8de9edc402ca56cf8eeae9d40338980c
BLAKE2b-256 7108885fa00e99a82f7a3c50c500e931da3581dac5159d14ba88030018fdd083

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