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
from gpytranslate import Translator
import asyncio
async def main():
tr = Translator()
translation = await tr("Ciao come stai? Io bene ahah.", targetlang='en')
language = await tr.detect("Ciao come stai? Io bene ahah.")
print(f"Translation: {translation.text}\nDetected language: {language}")
if __name__ == "__main__":
asyncio.run(main())
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-0.3.1.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file gpytranslate-0.3.1.tar.gz
.
File metadata
- Download URL: gpytranslate-0.3.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0334d5f742341f46e5b7fc5fdf5480a9aa26984b9cecfc6c0bf43c7a452ea769 |
|
MD5 | 952fb1add89fd80dd55dffddf81b15c2 |
|
BLAKE2b-256 | fc12c52791de695ff19c9c7e449a8bd2601d52f1c77c39e38288d70f617c1b30 |
File details
Details for the file gpytranslate-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: gpytranslate-0.3.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae587549671dcaca3c15d31608f99386e5626de099185eda5332bbeda96c2107 |
|
MD5 | 979c536a15db401cc2816420e8f7142e |
|
BLAKE2b-256 | 485b6fdfd0acee985c6088137d1e3f68eda2e7956871fab02b28f43748a74e56 |