异步Apple推送通知服务客户端
项目描述
AAPNS
异步苹果推送通知服务客户端。
- 需要 TLS 1.2 或更高版本
- 需要 Python 3.8 或更高版本
快速入门
from aapns.api import Server
from aapns.config import Priority
from aapns.models import Notification, Alert, Localized
async def send_hello_world():
client = await Server.production('/path/to/push/cert.pem').create_client()
apns_id = await client.send_notification(
'my-device-token',
Notification(
alert=Alert(
body=Localized(
key='Hello World!',
args=['foo', 'bar']
),
),
badge=42
),
priority=Priority.immediately
)
print(f'Sent push notification with ID {apns_id}')
await client.close()
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分布
aapns-23.7.tar.gz (14.3 kB 查看哈希值)
构建分布
aapns-23.7-py3-none-any.whl (16.7 kB 查看哈希值)
关闭
aapns-23.7.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e0ae15db36b35dc76b07b588259068fafdcd38be8684d5d3807dddd6b450de1f |
|
MD5 | c5b255ea306c3885a299f227bf706335 |
|
BLAKE2b-256 | 3ae0b0828a1ac432ea8254f8fd8c61baf80747abe65248a075e8ecae0c843487 |
关闭
aapns-23.7-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 70929f9a619b1cb53f04868b90a537e342ad659f4b7506850a6a38b1c38ff05a |
|
MD5 | 55470ba8238f506158ca59a242646c67 |
|
BLAKE2b-256 | a759a7c64e1411d356026f385c0035c7dcf9de118e9acdf3a637efec6af9549a |