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.1.2.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for gpytranslate-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96457a77072fe9da3d5aed7a633d121d25f0e5728ba49f9d2b91a861e3d036e8 |
|
MD5 | 65b156b59bcb329c1a2c3a60d9fdb117 |
|
BLAKE2b-256 | 23e8a054cbbd3c56950b76392ba2bf92b0fa18e472cebe799598c136b5f5cbf5 |