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.2.2.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file gpytranslate-0.2.2.tar.gz
.
File metadata
- Download URL: gpytranslate-0.2.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30454ed7433e5f5a2dfd5df42d8f749510345f90686675a14f595a45d15f2094 |
|
MD5 | 0a6e568e3858561c6d5e03894a44ec97 |
|
BLAKE2b-256 | 3c4bbfecc95c05a97b969f722b361c9af5b93c56747c8a341032bdb8a4cec84b |
File details
Details for the file gpytranslate-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: gpytranslate-0.2.2-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56ec1c7cd8a68f58e0935e8dbd08a09258941843f831ca55d5496ca4cd018af |
|
MD5 | 1ae3febc03f325fb103f4980b30baa03 |
|
BLAKE2b-256 | 6ac4a3bf1e26c5f3cb9b8a6a2df319fb4a4f5d99fec78f210619c12d7e807746 |