aapns


Nameaapns JSON
Version 23.7 PyPI version JSON
download
home_pagehttps://github.com/HENNGE/aapns
SummaryAsynchronous Apple Push Notification Service Client
upload_time2023-07-07 03:27:07
maintainer
docs_urlNone
authorJonas Obrist
requires_python>=3.8,<4.0
licenseApache-2.0
keywords push-notification apple ios asyncio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AAPNS

[![CircleCI](https://circleci.com/gh/HENNGE/aapns.svg?style=svg)](https://circleci.com/gh/HENNGE/aapns)
[![Documentation Status](https://readthedocs.org/projects/aapns/badge/?version=latest)](http://aapns.readthedocs.io/en/latest/?badge=latest)

Asynchronous Apple Push Notification Service client.

* Requires TLS 1.2 or better
* Requires Python 3.8 or better

## Quickstart

```python
from aapns.api import Server
from aapns.config import Priority
from aapns.models import Notification, Alert, Localized

async def send_hello_world():
    client = await Server.production('/path/to/push/cert.pem').create_client()
    apns_id = await client.send_notification(
        'my-device-token',
        Notification(
            alert=Alert(
                body=Localized(
                    key='Hello World!',
                    args=['foo', 'bar']
                ),
            ),
            badge=42
        ),
        priority=Priority.immediately
    )
    print(f'Sent push notification with ID {apns_id}')
    await client.close()
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HENNGE/aapns",
    "name": "aapns",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "push-notification,apple,ios,asyncio",
    "author": "Jonas Obrist",
    "author_email": "jonas.obrist@hennge.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/e0/b0828a1ac432ea8254f8fd8c61baf80747abe65248a075e8ecae0c843487/aapns-23.7.tar.gz",
    "platform": null,
    "description": "# AAPNS\n\n[![CircleCI](https://circleci.com/gh/HENNGE/aapns.svg?style=svg)](https://circleci.com/gh/HENNGE/aapns)\n[![Documentation Status](https://readthedocs.org/projects/aapns/badge/?version=latest)](http://aapns.readthedocs.io/en/latest/?badge=latest)\n\nAsynchronous Apple Push Notification Service client.\n\n* Requires TLS 1.2 or better\n* Requires Python 3.8 or better\n\n## Quickstart\n\n```python\nfrom aapns.api import Server\nfrom aapns.config import Priority\nfrom aapns.models import Notification, Alert, Localized\n\nasync def send_hello_world():\n    client = await Server.production('/path/to/push/cert.pem').create_client()\n    apns_id = await client.send_notification(\n        'my-device-token',\n        Notification(\n            alert=Alert(\n                body=Localized(\n                    key='Hello World!',\n                    args=['foo', 'bar']\n                ),\n            ),\n            badge=42\n        ),\n        priority=Priority.immediately\n    )\n    print(f'Sent push notification with ID {apns_id}')\n    await client.close()\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Asynchronous Apple Push Notification Service Client",
    "version": "23.7",
    "project_urls": {
        "Documentation": "https://aapns.readthedocs.io",
        "Homepage": "https://github.com/HENNGE/aapns",
        "Repository": "https://github.com/hennge/aapns"
    },
    "split_keywords": [
        "push-notification",
        "apple",
        "ios",
        "asyncio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a759a7c64e1411d356026f385c0035c7dcf9de118e9acdf3a637efec6af9549a",
                "md5": "55470ba8238f506158ca59a242646c67",
                "sha256": "70929f9a619b1cb53f04868b90a537e342ad659f4b7506850a6a38b1c38ff05a"
            },
            "downloads": -1,
            "filename": "aapns-23.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55470ba8238f506158ca59a242646c67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 16747,
            "upload_time": "2023-07-07T03:27:06",
            "upload_time_iso_8601": "2023-07-07T03:27:06.340849Z",
            "url": "https://files.pythonhosted.org/packages/a7/59/a7c64e1411d356026f385c0035c7dcf9de118e9acdf3a637efec6af9549a/aapns-23.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ae0b0828a1ac432ea8254f8fd8c61baf80747abe65248a075e8ecae0c843487",
                "md5": "c5b255ea306c3885a299f227bf706335",
                "sha256": "e0ae15db36b35dc76b07b588259068fafdcd38be8684d5d3807dddd6b450de1f"
            },
            "downloads": -1,
            "filename": "aapns-23.7.tar.gz",
            "has_sig": false,
            "md5_digest": "c5b255ea306c3885a299f227bf706335",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 14348,
            "upload_time": "2023-07-07T03:27:07",
            "upload_time_iso_8601": "2023-07-07T03:27:07.976416Z",
            "url": "https://files.pythonhosted.org/packages/3a/e0/b0828a1ac432ea8254f8fd8c61baf80747abe65248a075e8ecae0c843487/aapns-23.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-07 03:27:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HENNGE",
    "github_project": "aapns",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aapns"
}
        
Elapsed time: 0.10165s