pywebpush
WebPush publication library
Decision gist · record as of 2026-08-14
Yes, if you need to send web push notifications from a Python backend. The library is actively maintained, has no known vulnerabilities, and handles the complex encryption and VAPID protocol correctly. Install friction is low. The MPL-2.0 copyleft license is standard for server-side use but requires disclosure of modifications. Single-person maintenance is a long-term risk; evaluate your tolerance for potential delays in bug fixes or updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10 and a VAPID EC2 private key (generated via openssl ecparam or py-vapid).
- Low install friction with a pure-Python wheel.
- Maintained actively as of August 2026, though the maintainer notes single-person stewardship.
License · maintenance · safety
MPL-2.0 (copyleft) — Licensed under MPL-2.0 (copyleft). You must disclose source modifications and license derivative works under the same terms; suitable for server-side use but review required if bundling or redistributing.
last release 2026-08-06 (8 days) · last repo commit 2026-08-11 · 375 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,794,972 downloads/mo, #2,035 on PyPI
Alternatives
Verify before relying
from pywebpush import webpush
webpush(
subscription_info={"endpoint": "https://push.example.com/v1/12345",
"keys": {"p256dh": "...", "auth": "..."}},
data="Your message",
vapid_private_key="path/to/private.pem",
vapid_claims={"sub": "mailto:you@example.org"}
)- Whether the library handles connection pooling or rate-limiting for bulk sends to many recipients.
- Performance characteristics when sending to thousands of subscriptions in a single session.
- Support status for alternative push services beyond Mozilla and Google Cloud Messaging.
What it is and what it does
Pywebpush is a Python library for sending encrypted web push notifications to browsers via the Web Push Protocol. It handles the cryptographic encryption (aes128gcm or aesgcm), VAPID authentication headers, and HTTP delivery to push service endpoints. The library accepts browser PushSubscription objects (converted to JSON), encrypts your message payload, and sends it to the appropriate push service.
You can use it either as a one-call function for simple sends or instantiate a WebPusher object for repeated sends to the same recipient. It depends on aiohttp, cryptography, http-ece, requests, and py-vapid to handle encryption, HTTP transport, and VAPID key management. The library includes a command-line tool for testing and supports platform-specific headers (notably for Windows notifications).
Use it for
- Send encrypted notifications from a web backend to subscribed browser clients without exposing message content to the push service.
- Implement a notification system for a web app where users grant push permission and you store their subscription info server-side.
- Batch-send the same message to many users by iterating over stored subscriptions and calling webpush() for each.
- Test push notification integration during development using the command-line tool with subscription and message files.
- Handle platform-specific push requirements (e.g., Windows) by passing custom headers to the send() method.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to send web push notifications from a Python backend.
The library is actively maintained, has no known vulnerabilities, and handles the complex encryption and VAPID protocol correctly. Install friction is low. The MPL-2.0 copyleft license is standard for server-side use but requires disclosure of modifications. Single-person maintenance is a long-term risk; evaluate your tolerance for potential delays in bug fixes or updates.
Install
pywebpush on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintained actively as of August 2026, though the maintainer notes single-person stewardship. No known vulnerabilities.
Requires Python >= 3.10 and a VAPID EC2 private key (generated via openssl ecparam or py-vapid).
License in practice
Licensed under MPL-2.0 (copyleft). You must disclose source modifications and license derivative works under the same terms; suitable for server-side use but review required if bundling or redistributing.
Quickstart
from pywebpush import webpush
webpush(
subscription_info={"endpoint": "https://push.example.com/v1/12345",
"keys": {"p256dh": "...", "auth": "..."}},
data="Your message",
vapid_private_key="path/to/private.pem",
vapid_claims={"sub": "mailto:you@example.org"}
)
Verify before relying
- Whether the library handles connection pooling or rate-limiting for bulk sends to many recipients.
- Performance characteristics when sending to thousands of subscriptions in a single session.
- Support status for alternative push services beyond Mozilla and Google Cloud Messaging.
Package facts
| License | MPL-2.0 copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesaiohttpcryptographyhttp-ecerequestspy-vapid |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,794,972 / month, #2,035 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP |
Evidence: pywebpush-2.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “web push notifications”
- pywebpushEncrypts and sends web push notifications to browser push services…
- pyfcmPyFCM is a Python client for Firebase Cloud Messaging (FCM) that…
- django-push-notificationsA Django app that manages device registrations and sends push…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also py-vapid · django-push-notifications · http-ece · pyfcm · fcm-django · aioapns · pushbullet.py · firebase-messaging · pyapns-client · apns2-up