{"id":13494885,"url":"https://github.com/Fatal1ty/aioapns","last_synced_at":"2025-03-28T15:32:03.442Z","repository":{"id":38865300,"uuid":"90959572","full_name":"Fatal1ty/aioapns","owner":"Fatal1ty","description":"An efficient APNs Client Library for Python/asyncio","archived":false,"fork":false,"pushed_at":"2024-08-12T07:27:34.000Z","size":120,"stargazers_count":131,"open_issues_count":17,"forks_count":54,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T09:09:22.824Z","etag":null,"topics":["apns","apple-push-notifications","asyncio","push-notifications","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fatal1ty.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://coindrop.to/tikhonov_a"]}},"created_at":"2017-05-11T09:05:19.000Z","updated_at":"2025-03-23T15:28:18.000Z","dependencies_parsed_at":"2024-01-16T09:52:26.328Z","dependency_job_id":"3ed66d70-9907-417e-b1c1-c220de163daa","html_url":"https://github.com/Fatal1ty/aioapns","commit_stats":{"total_commits":112,"total_committers":14,"mean_commits":8.0,"dds":0.2857142857142857,"last_synced_commit":"77ac313131f720366e656956677017c81407c962"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatal1ty%2Faioapns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatal1ty%2Faioapns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatal1ty%2Faioapns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatal1ty%2Faioapns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fatal1ty","download_url":"https://codeload.github.com/Fatal1ty/aioapns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999538,"owners_count":20707562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apns","apple-push-notifications","asyncio","push-notifications","python"],"created_at":"2024-07-31T19:01:29.124Z","updated_at":"2025-03-28T15:32:03.414Z","avatar_url":"https://github.com/Fatal1ty.png","language":"Python","readme":"aioapns - An efficient APNs Client Library for Python/asyncio\n=================================================================================\n\n.. image:: https://github.com/Fatal1ty/aioapns/workflows/tests/badge.svg\n   :target: https://github.com/Fatal1ty/aioapns/actions\n\n.. image:: https://img.shields.io/pypi/v/aioapns.svg\n    :target: https://pypi.python.org/pypi/aioapns\n\n.. image:: https://img.shields.io/pypi/pyversions/aioapns.svg\n    :target: https://pypi.python.org/pypi/aioapns/\n\n.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n    :target: https://opensource.org/licenses/Apache-2.0\n\n**aioapns** is a library designed specifically for sending push-notifications to iOS devices\nvia Apple Push Notification Service. aioapns provides an efficient client through\nasynchronous HTTP2 protocol for use with Python's ``asyncio``\nframework.\n\naioapns requires Python 3.8 or later.\n\n\nPerformance\n-----------\n\nIn my testing aioapns allows you to send on average 1.3k notifications per second on a single core.\n\n\nFeatures\n--------\n\n* Internal connection pool which adapts to the current load\n* Support for certificate and token based connections\n* Ability to set TTL (time to live) for notifications\n* Ability to set priority for notifications\n* Ability to set collapse-key for notifications\n* Ability to use production or development APNs server\n* Support for basic HTTP-Proxies\n\n\nInstallation\n------------\n\nUse pip to install::\n\n    $ pip install aioapns\n\n\nBasic Usage\n-----------\n\n.. code-block:: python\n\n    import asyncio\n    from uuid import uuid4\n    from aioapns import APNs, NotificationRequest, PushType\n\n\n    async def run():\n        apns_cert_client = APNs(\n            client_cert='/path/to/apns-cert.pem',\n            use_sandbox=False,\n        )\n        apns_key_client = APNs(\n            key='/path/to/apns-key.p8',\n            key_id='\u003cKEY_ID\u003e',\n            team_id='\u003cTEAM_ID\u003e',\n            topic='\u003cAPNS_TOPIC\u003e',  # Bundle ID\n            use_sandbox=False,\n        )\n        request = NotificationRequest(\n            device_token='\u003cDEVICE_TOKEN\u003e',\n            message = {\n                \"aps\": {\n                    \"alert\": \"Hello from APNs\",\n                    \"badge\": \"1\",\n                }\n            },\n            notification_id=str(uuid4()),  # optional\n            time_to_live=3,                # optional\n            push_type=PushType.ALERT,      # optional\n        )\n        await apns_cert_client.send_notification(request)\n        await apns_key_client.send_notification(request)\n\n    loop = asyncio.get_event_loop()\n    loop.run_until_complete(run())\n\n\nLicense\n-------\n\naioapns is developed and distributed under the Apache 2.0 license.\n","funding_links":["https://coindrop.to/tikhonov_a"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFatal1ty%2Faioapns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFatal1ty%2Faioapns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFatal1ty%2Faioapns/lists"}