{"id":15297396,"url":"https://github.com/pusher/push-notifications-python","last_synced_at":"2025-04-05T19:11:01.839Z","repository":{"id":30300662,"uuid":"116310014","full_name":"pusher/push-notifications-python","owner":"pusher","description":"Pusher Beams Python Server SDK","archived":false,"fork":false,"pushed_at":"2025-01-06T16:58:47.000Z","size":87,"stargazers_count":31,"open_issues_count":0,"forks_count":8,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-29T18:08:22.983Z","etag":null,"topics":["push-notifications","pusher","python","python2","python3"],"latest_commit_sha":null,"homepage":"https://pusher.com/beams","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pusher.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2018-01-04T21:36:39.000Z","updated_at":"2025-01-06T16:58:44.000Z","dependencies_parsed_at":"2024-06-18T21:06:11.624Z","dependency_job_id":"747d3222-05c3-4619-b54a-011a26120e73","html_url":"https://github.com/pusher/push-notifications-python","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fpush-notifications-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fpush-notifications-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fpush-notifications-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pusher%2Fpush-notifications-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pusher","download_url":"https://codeload.github.com/pusher/push-notifications-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386262,"owners_count":20930619,"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":["push-notifications","pusher","python","python2","python3"],"created_at":"2024-09-30T19:17:05.061Z","updated_at":"2025-04-05T19:11:01.811Z","avatar_url":"https://github.com/pusher.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://github.com/pusher/push-notifications-python/workflows/CI/badge.svg\n   :target: https://github.com/pusher/push-notifications-python/actions?query=branch%3Amaster\n.. image:: https://codecov.io/gh/pusher/push-notifications-python/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/pusher/push-notifications-python\n\nPusher Beams Python server SDK\n==============================\nFull documentation for this SDK can be found `here \u003chttps://docs.pusher.com/beams/reference/server-sdk-python\u003e`__\n\nInstallation\n------------\nThe Pusher Beams Python server SDK is available on PyPi\n`here \u003chttps://pypi.python.org/pypi/pusher_push_notifications/\u003e`__.\n\nYou can install this SDK by using\n`pip \u003chttps://pip.pypa.io/en/stable/installing/\u003e`__:\n\n.. code::\n\n    $ pip install pusher_push_notifications\n\n\nUsage\n-----\n\nConfiguring the SDK for Your Instance\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nUse your instance id and secret (you can get these from the\n`dashboard \u003chttps://dash.pusher.com/beams\u003e`__) to create a Beams PushNotifications instance:\n\n.. code::\n\n  from pusher_push_notifications import PushNotifications\n\n  beams_client = PushNotifications(\n      instance_id='YOUR_INSTANCE_ID_HERE',\n      secret_key='YOUR_SECRET_KEY_HERE',\n  )\n\nPublishing to Device Interests\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can broadcast notifications to groups of subscribed devices using `Device Interests \u003chttps://docs.pusher.com/beams/concepts/device-interests\u003e`__:\n\n.. code::\n\n  response = beams_client.publish_to_interests(\n      interests=['hello'],\n      publish_body={\n          'apns': {\n              'aps': {\n                  'alert': 'Hello!'\n              }\n          },\n          'fcm': {\n              'notification': {\n                  'title': 'Hello',\n                  'body': 'Hello, World!'\n              }\n          }\n      }\n  )\n\n  print(response['publishId'])\n\nPublishing to Authenticated Users\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSecurely send notifications to individual users of your application using `Authenticated Users \u003chttps://docs.pusher.com/beams/concepts/authenticated-users\u003e`__:\n\n.. code::\n\n  response = beams_client.publish_to_users(\n      user_ids=['user-0001'],\n      publish_body={\n          'apns': {\n              'aps': {\n                  'alert': 'Hello!'\n              }\n          },\n          'fcm': {\n              'notification': {\n                  'title': 'Hello',\n                  'body': 'Hello, World!'\n              }\n          }\n      }\n  )\n\n  print(response['publishId'])\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fpush-notifications-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpusher%2Fpush-notifications-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpusher%2Fpush-notifications-python/lists"}