Yandex translate async api wrapper
Project description
aioyatr
Async yandex.translate api wrapper for python
Example of usage
import asyncio
from aio_yandex_translate.translator import Translator
key = "TOKEN"
async def main():
text = 'Hello world'
print(text)
t = Translator(key)
r = await t.translate(text, to_language='ru')
print(r)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Explaining some details
To get to exceptions that module can throw you may go
to Translator.exc and see classes of exceptions (TranslatorError is base)
The code is really short but i hope it will help you!
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
Built Distribution
Close
Hashes for aio_yandex_translate-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84995c19747ff2307a488d97a20fb91ed84a73bfe2bb187dfa234dd598ec2ad0 |
|
MD5 | a184ce3bfaec9a94939bead162c809ab |
|
BLAKE2b-256 | 263fb04ab13ebde3234ad74c5a4c358553b13ee8fdb1702f5ac790c59357a950 |