aiotranslate-0.0.1
توضیحات
Free Google translate module that uses async/await syntax.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | aiotranslate-0.0.1 |
| نام | aiotranslate |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | 5elenay |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/5elenay/aiotranslate/ |
| آدرس اینترنتی | https://pypi.org/project/aiotranslate/ |
| مجوز | GNU General Public License v3 (GPLv3) |
# aiotranslate
Free google translate module that uses async/await syntax.
# Example
```py
from aiotranslate import Translator
import asyncio
async def main():
translator = Translator()
# you can add aiohttp session if you want like -> Translator(session=aiohttp.ClientSession())
# also you can save the translates like -> Translator(save_translates=True)
translated = await translator.translate("hello", "tr", "en")
# first argument: the text will be translated
# second argument: the language will converted
# last argument: the language that text
print(translated) # -> Merhaba
print(translator.history()) # shows all translates that saved.
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```
نحوه نصب
نصب پکیج whl aiotranslate-0.0.1:
pip install aiotranslate-0.0.1.whl
نصب پکیج tar.gz aiotranslate-0.0.1:
pip install aiotranslate-0.0.1.tar.gz