1- # PyAPNs2
1+ # MoPyAPNs
22
3- [ ![ PyPI version] ( https://img.shields.io/pypi/v/apns2 .svg )] ( https://pypi.python. org/pypi/apns2 )
4- [ ![ PyPI version] ( https://img.shields.io/pypi/pyversions/apns2 .svg )] ( https://pypi.python. org/pypi/apns2 )
3+ [ ![ PyPI version] ( https://img.shields.io/pypi/v/pyapns .svg )] ( https://pypi.org/project/pyapns/ )
4+ [ ![ PyPI version] ( https://img.shields.io/pypi/pyversions/pyapns .svg )] ( https://pypi.org/project/pyapns/ )
55[ ![ Build Status] ( https://drone.pr0ger.dev/api/badges/Pr0Ger/PyAPNs2/status.svg )] ( https://drone.pr0ger.dev/Pr0Ger/PyAPNs2 )
66
77Python library for interacting with the Apple Push Notification service (APNs) via HTTP/2 protocol using httpx
@@ -10,7 +10,7 @@ Python library for interacting with the Apple Push Notification service (APNs) v
1010
1111Either download the source from GitHub or use pip:
1212
13- pip install apns2
13+ pip install mopyapns
1414
1515## Sample usage
1616
@@ -25,6 +25,10 @@ topic = 'com.example.App'
2525client = APNsClient(' key.pem' , use_sandbox = False , use_alternative_port = False )
2626client.send_notification(token_hex, payload, topic)
2727
28+ # To send a notification with a specific interruption level (iOS 15+)
29+ payload = Payload(alert = " Hello World!" , sound = " default" , interruption_level = ' time-sensitive' )
30+ client.send_notification(token_hex, payload, topic)
31+
2832# To send multiple notifications in a batch
2933Notification = collections.namedtuple(' Notification' , [' token' , ' payload' ])
3034notifications = [Notification(payload = payload, token = token_hex)]
@@ -43,7 +47,7 @@ client.send_notification_batch(notifications=notifications, topic=topic)
4347
4448## Requirements
4549
46- - Python 3.9 or later
50+ - Python 3.10 or later
4751- httpx 0.28.1 or later (with http2 support)
4852- cryptography 45.0.4 or later
4953- PyJWT 2.10.1 or later
@@ -54,12 +58,12 @@ client.send_notification_batch(notifications=notifications, topic=topic)
5458
5559## Contributing
5660
57- To develop PyAPNs2 , check out the code and install dependencies using PDM:
61+ To develop mopyapns , check out the code and install dependencies using PDM:
5862
5963``` shell
6064# Clone the source code.
61- git clone https://github.com/Pr0Ger/PyAPNs2 .git
62- cd PyAPNs2
65+ git clone https://github.com/magnuslo/mopyapns .git
66+ cd mopyapns
6367# Create a virtualenv and install dependencies.
6468pdm install
6569```
@@ -78,7 +82,7 @@ pdm run pylint --reports=n apns2 test
7882
7983## License
8084
81- PyAPNs2 is distributed under the terms of the MIT license.
85+ mopyapns is distributed under the terms of the MIT license.
8286
8387See [ LICENSE] ( LICENSE ) file for the complete license details.
8488
0 commit comments