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():
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.3.tar.gz
(16.4 kB
view hashes)
Built Distribution
Close
Hashes for gpytranslate-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 970e2c180ab1bfb54cf268853ead19729e175ad6b3796bb827bb925a968c0318 |
|
MD5 | 4d3ba4d5e5402b89086ec00fd0c2fa87 |
|
BLAKE2b-256 | 763d82951ed42ef1d4b9763e532183f9f1f525a77ca8fb52a9193cae037959f2 |