Skip to main content

Send requests to Apple Push Notification service (APNs) to push notifications to users.

Project description

pyAPNsKit

Send requests to Apple Push Notification service (APNs) to push notifications to users via HTTP/2, token-based

pip install pyAPNsKit

Get Started

Quickly push information to devices

from pyAPNsKit import apns

p8key=""
with open('AuthKey_KeyID.p8','r') as p8file:
    p8key=p8file.read()
client=apns.Client("teamID","App_BundleID","KeyID",p8key)
isSuccess=server.sendAlert('deviceID','title','subtitle','message',sound=True)

[!NOTE]

For parameters, their acquisition methods, and instructions, please refer to the Apple Developer Document

Customized

from pyAPNsKit import apns,APNsHeader,APNsBody,types

p8key=""
with open('AuthKey_KeyID.p8','r') as p8file:
    p8key=p8file.read()

apnsHeader=APNsHeader.APNsHeader("teamID","topic","KeyID",p8key,types.PushType.alert)
isSuccess=apns.pushByDeviceToken('deviceID',
               apnsHeader
                .withAPNsCollapse('Collapse')
               ,
               APNsBody.APNsBody()
                .withAlert("title","sub","message")
                .withSound()
             # ,isSandbox=True
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyapnskit-0.1.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyapnskit-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file pyapnskit-0.1.1.tar.gz.

File metadata

  • Download URL: pyapnskit-0.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyapnskit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 540bfe958b44a2d73372f8110c737fa370d9abdddd97332233bb030a02729ac4
MD5 ab6218534877c47c6a38b4ce5abe8cf4
BLAKE2b-256 7dec2948d4856dce334d23306a28688cad397d37ad1699dae9b5665823b2de2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyapnskit-0.1.1.tar.gz:

Publisher: python-publish.yml on guoPhineas/pyAPNsKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyapnskit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyapnskit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyapnskit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94dac6a981abf4d9a0b1f1e3e777821e97f0baf8ba3ddd3e656c000b04a964e0
MD5 7f28f9cd5905e5ee9b3614ab4469bfaf
BLAKE2b-256 f42de0a610e055eb25b2e2e3bab9b25b18b7a044bbaa625195c6dd94b02d6198

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyapnskit-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on guoPhineas/pyAPNsKit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page