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=client.sendAlert('deviceToken','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('deviceToken',
               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.3.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.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyapnskit-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f061b019143575b3e2240dc3f0c8d3411dcd915daf011f10cffa820cf4d290cb
MD5 fce5493ee97ff127c87b1aec27fee805
BLAKE2b-256 ca236dbc8ddfb350a0c8f186742a0462c4e82be171ffe4be83db0378edaf2ebc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyapnskit-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pyapnskit-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 516387fadb628138872d8939c050ca5ef81473e9665bf892c6219b46a6a882b1
MD5 cd9bb9ba24bf999db0859a3b77586878
BLAKE2b-256 17c9beb3e74e8086f55b5d43cc088bdc0329abaf367c4e8ef838955a7e69a462

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyapnskit-0.1.3-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