{"id":31214984,"url":"https://github.com/eskildsf/fastapi_webpush_endpoint","last_synced_at":"2026-04-07T15:31:09.446Z","repository":{"id":297937774,"uuid":"997862179","full_name":"eskildsf/fastapi_webpush_endpoint","owner":"eskildsf","description":"Subscribe to Web Push notifications and receive them in FastAPI.","archived":false,"fork":false,"pushed_at":"2025-06-10T13:48:55.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-21T10:27:01.536Z","etag":null,"topics":["fastapi","notifications","web-push","webpush"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eskildsf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-07T10:55:31.000Z","updated_at":"2025-06-10T05:44:41.000Z","dependencies_parsed_at":"2025-06-08T13:33:37.640Z","dependency_job_id":"0d441441-deac-496a-9ed4-b254abbd658e","html_url":"https://github.com/eskildsf/fastapi_webpush_endpoint","commit_stats":null,"previous_names":["eskildsf/fastapi_webpush_endpoint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eskildsf/fastapi_webpush_endpoint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eskildsf%2Ffastapi_webpush_endpoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eskildsf%2Ffastapi_webpush_endpoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eskildsf%2Ffastapi_webpush_endpoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eskildsf%2Ffastapi_webpush_endpoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eskildsf","download_url":"https://codeload.github.com/eskildsf/fastapi_webpush_endpoint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eskildsf%2Ffastapi_webpush_endpoint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31518394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fastapi","notifications","web-push","webpush"],"created_at":"2025-09-21T10:03:41.240Z","updated_at":"2026-04-07T15:31:09.419Z","avatar_url":"https://github.com/eskildsf.png","language":"Python","readme":"# 🫸💬📲⚡ FastAPI Web Push Endpoint\nSubscribe to Web Push notifications and receive them in FastAPI.\n\nSupports Python \u003e= 3.11\n\n## Installation 🛠️\n```console\npip install fastapi_webpush_endpoint\n```\n\nTo run examples, install with dependencies:\n```console\npip install fastapi_webpush_endpoint[development]\n```\n\n## Intro to Web Push\nWeb Push allows an end user to give permission to a website, allowing it to send push notifications to the end user's device mediated by a Web Push Endpoint.\n\nThe flow is illustrated below. Javascript code triggers an \"Allow notifications\" dialogue which the user accepts. As a result, a Web Push Endpoint operated by the end user's web browser vendor is provided. Javascsript code can share the endpoint with the website backend. The website backend can then publish notifications to the endpoint and these will be delivered to the end user's device.\n```mermaid\nsequenceDiagram\n    participant Backend\n    participant Frontend Javascript\n    participant User/Device\n    participant Web Push Endpoint\n\n    Frontend Javascript-\u003e\u003eUser/Device: Permission to send Web Push notifications?\n    User/Device-\u003e\u003eFrontend Javascript: Permission granted\n    Web Push Endpoint--\u003e\u003eFrontend Javascript: Subscription endpoint URL, secret and public key\n    Frontend Javascript--\u003e\u003eBackend: Subscription endpoint URL, secret and public key\n    Backend--\u003e\u003eWeb Push Endpoint: Publish notification\n    Web Push Endpoint-\u003e\u003eUser/Device: Show notification\n    Backend--\u003e\u003eWeb Push Endpoint: Publish notification\n    Web Push Endpoint-\u003e\u003eUser/Device: Show notification\n```\n\n## What `fastapi_webpush_endpoint` does\n`fastapi_webpush_endpoint` implements a Web Push Endpoint that backends can send notifications to. The flow is illustrated below. A `WebPushSubscription` object created by `fastapi_webpush_endpoint` is sent to the backend via HTTP request (typically `POST` method). The backend publishes notifications to the endpoint just as it would if it were a \"real\" service passing messages on to an end user device.\n```mermaid\nsequenceDiagram\n    participant Backend\n    participant fastapi_webpush_endpoint\n\n    fastapi_webpush_endpoint--\u003e\u003eBackend: Subscription endpoint URL, secret and public key\n    Backend--\u003e\u003efastapi_webpush_endpoint: Publish notification\n    Backend--\u003e\u003efastapi_webpush_endpoint: Publish notification\n```\n\n## Examples\nSee `examples/` directory for an example using either the [`pywebpush`](https://github.com/web-push-libs/pywebpush) or the [`webpush`](https://github.com/delvinru/webpush-py) library. There's also `endpoint_example.py` that only showcases the endpoint.\n\n## What can I do with this?\n* Integration tests of Web Push backends\n* Use Web Push notifications as a regular webhook in downstream web services\n\n## Foundations\n* [FastAPI](https://github.com/tiangolo/fastapi)\n* [Pydantic](https://github.com/pydantic/pydantic) for data validation\n* [PyJWT](https://github.com/jpadilla/pyjwt) for validation of Web Push header JWT\n* [http_ece](https://github.com/web-push-libs/encrypted-content-encoding) for decryption of Web Push message content","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feskildsf%2Ffastapi_webpush_endpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feskildsf%2Ffastapi_webpush_endpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feskildsf%2Ffastapi_webpush_endpoint/lists"}