A Python3 library for translating text using Google Translate API.
Reason this release was yanked:
Not production ready, major bug
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
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
Release history Release notifications | RSS feed
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.1.tar.gz
(16.4 kB
view details)
Built Distribution
File details
Details for the file gpytranslate-1.0.1.tar.gz
.
File metadata
- Download URL: gpytranslate-1.0.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | aef1cd2d2b064f82e198e3ae2495c5961acf975bf54d68771daa7013fcdd494c |
|
MD5 | 5b0b39c2cdc7d1474ad1ca0f24d5ee7c |
|
BLAKE2b-256 | ef8d039f2766b68c643577177f02e9540c56bfd8645111d331662e07aa62b251 |
File details
Details for the file gpytranslate-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: gpytranslate-1.0.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d07c3725fec95424ad6982f46dd38efa42b741cf4889d1bfa410ce915f167866 |
|
MD5 | 52509ebb338573fa884cf4859a31b38d |
|
BLAKE2b-256 | 3010e4145d6032e336e72133be9374471b06d9fbbc333f483ee4e4cddbbccd60 |