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

Get Started

Quickly push information to devices

from pyAPNsKit import apns

p8key=""
with open('AuthKey_KeyID.p8','r') as p8file:
    p8key=p8file.read()
server=apns.Server("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.sendAPNsByDeviceID('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.0.tar.gz (8.1 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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyapnskit-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pyapnskit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 13c0de17e7c5db1ed1413c6b28add2725d94693535a3481818b36e633ac0b1c4
MD5 7b6c629ed233a23743c5d3765c4d19b4
BLAKE2b-256 60a8d2ae9de5106217bb2e2b6b580fdf8709da544a86de72f5ada80a994613f1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyapnskit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 088a1273a69a7f13c53c50745c75410629e1ab25d36cbebbdcdb4a88b591a007
MD5 be04fdf458c89febdb6e4e775b08423e
BLAKE2b-256 920c320c8db888c95a9dbd31a7131d951f8c9e2d9c6c5b41cb2f5d0228559aa2

See more details on using hashes here.

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