aiogetui-0.4
توضیحات
Python SDK for Getui push service based on asyncio(aiohttp).
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiogetui-0.4 |
| نام | aiogetui |
| نسخه کتابخانه | 0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Darren Char |
| ایمیل نویسنده | i@charact3.com |
| آدرس صفحه اصلی | https://github.com/charact3/aiogetui |
| آدرس اینترنتی | https://pypi.org/project/aiogetui/ |
| مجوز | MIT |
# aiogetui
Python SDK for Getui push service based on asyncio(aiohttp).
Based on [GeTui rest api](http://docs.getui.com/getui/server/rest/push/).
## Installation
```bash
$ pip install aiogetui
```
## Basic Usage
```python
import asyncio
import uuid
from aiogetui import IGeTui, ToSingleMessage, NotificationTemplate
APP_ID = ''
APP_KEY = ''
MASTER_SECRET = ''
CLIENT_ID = ''
async def run():
client = IGeTui(APP_ID, APP_KEY, MASTER_SECRET)
await client.auth_sign()
message = ToSingleMessage(
client_id=CLIENT_ID,
template=NotificationTemplate({'title': 'my title', 'text': 'My text.'}),
is_offline=True, # optional, default to False
message_id=uuid.uuid4().hex, # optional, length 10~32
)
result = await client.push(message)
print(result)
await client.close()
asyncio.get_event_loop().run_until_complete(run())
```
نیازمندی
| مقدار | نام |
|---|---|
| - | six |
| <4.0,>3.0 | aiohttp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.0 | Python |
نحوه نصب
نصب پکیج whl aiogetui-0.4:
pip install aiogetui-0.4.whl
نصب پکیج tar.gz aiogetui-0.4:
pip install aiogetui-0.4.tar.gz