{ "info": { "author": "Jakub Kle\u0148", "author_email": "kukosk@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Communications", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "*************\npyapns_client\n*************\n\n|version| |license|\n\nSimple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the HTTP/2 Push provider API.\n\n\nFeatures\n========\n\n- Uses the new Apple APNs HTTP/2 protocol\n- Supports the new iOS 10 features such as Collapse IDs, Subtitles and Mutable Notifications\n- Supports persistent connections to APNS\n\n\nCautions\n========\n\n- Works only with Python 3.5 and higher\n\n\nInstallation\n============\n\nInstall using pip:\n\n.. code-block:: bash\n\n pip install pyapns_client\n\n\nUsage\n=====\n\n.. code-block:: python\n\n from pyapns_client import APNSClient, IOSPayloadAlert, IOSPayload, IOSNotification, APNSException, UnregisteredException\n\n\n cli = APNSClient(mode=APNSClient.MODE_DEV, client_cert='/your/path.pem')\n alert = IOSPayloadAlert(body='body!', title='title!')\n payload = IOSPayload(alert=alert)\n notification = IOSNotification(payload=payload, priority=IOSNotification.PRIORITY_LOW)\n\n try:\n cli.push(notification=notification, device_token='your_token')\n except APNSException as e:\n if e.is_device_error:\n if isinstance(e, UnregisteredException):\n # device is unregistered, compare timestamp (e.timestamp_datetime) and remove from db\n pass\n else:\n # flag the device as potentially invalid\n pass\n elif e.is_apns_error:\n # try again later\n pass\n elif e.is_programming_error:\n # check your code\n # try again later\n pass\n else:\n # everything is ok\n pass\n\n\n.. |version| image:: https://img.shields.io/pypi/v/pyapns_client.svg?style=flat-square\n :target: https://pypi.python.org/pypi/pyapns_client/\n\n.. |license| image:: https://img.shields.io/pypi/l/pyapns_client.svg?style=flat-square\n :target: https://pypi.python.org/pypi/pyapns_client/", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kukosk/pyapns_client", "keywords": "apns apple ios osx safari push notifications", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "pyapns-client", "package_url": "https://pypi.org/project/pyapns-client/", "platform": "any", "project_url": "https://pypi.org/project/pyapns-client/", "project_urls": { "Homepage": "https://github.com/kukosk/pyapns_client" }, "release_url": "https://pypi.org/project/pyapns-client/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "Simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the HTTP/2 Push provider API.", "version": "1.0.3" }, "last_serial": 4963968, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "c40611fe9762e16893a648b5ced7a569", "sha256": "82b62089aa954491f639c92e3feeb362387da28c3ff3a3a2d75907a2eb856dc9" }, "downloads": -1, "filename": "pyapns_client-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c40611fe9762e16893a648b5ced7a569", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7099, "upload_time": "2019-03-20T12:55:02", "url": "https://files.pythonhosted.org/packages/16/4e/469016d19d2088571c4e835f162635b1ce0b79eb52a198c2568cf33f2bfe/pyapns_client-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "14dfef540b01c0dea578a687c0932f1e", "sha256": "03b5d53097911e22e9a32188e544646c26e5e0fc1309ff4e8e76af614497e0e0" }, "downloads": -1, "filename": "pyapns_client-1.0.2.tar.gz", "has_sig": false, "md5_digest": "14dfef540b01c0dea578a687c0932f1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7186, "upload_time": "2019-03-20T13:11:45", "url": "https://files.pythonhosted.org/packages/4f/26/7ecbd7f682cd89ddca85567b5f767b8eb00ad81588c8612267275e44e116/pyapns_client-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "5ec801ef0ec4c83dc0c0221b09eaf408", "sha256": "d43fa22c9b99b2ad62a5c8ddb7dcd909618d98e556bb3aefc9b7e6617c4821d5" }, "downloads": -1, "filename": "pyapns_client-1.0.3.tar.gz", "has_sig": false, "md5_digest": "5ec801ef0ec4c83dc0c0221b09eaf408", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7816, "upload_time": "2019-03-20T14:27:08", "url": "https://files.pythonhosted.org/packages/d1/52/236411102005aa95027484105a6731b329d451b1d6b977912321c1a6209a/pyapns_client-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ec801ef0ec4c83dc0c0221b09eaf408", "sha256": "d43fa22c9b99b2ad62a5c8ddb7dcd909618d98e556bb3aefc9b7e6617c4821d5" }, "downloads": -1, "filename": "pyapns_client-1.0.3.tar.gz", "has_sig": false, "md5_digest": "5ec801ef0ec4c83dc0c0221b09eaf408", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7816, "upload_time": "2019-03-20T14:27:08", "url": "https://files.pythonhosted.org/packages/d1/52/236411102005aa95027484105a6731b329d451b1d6b977912321c1a6209a/pyapns_client-1.0.3.tar.gz" } ] }