pusher
A Python library to interract with the Pusher Channels API
What it is and what it does
Pusher is a Python HTTP client for the Pusher Channels real-time messaging service. It lets you send events from your server to connected clients over WebSocket channels, query the state of those channels (user counts, subscriber lists), and manage authentication for private and presence channels. The library handles webhook validation, signature generation for socket subscriptions, and supports multiple HTTP backends (requests, urlfetch, aiohttp, tornado) to fit different deployment environments.
You instantiate a Pusher client with your app credentials, then call methods like trigger() to broadcast events, channels_info() to inspect channel state, or authenticate_subscription() to validate client channel joins. The library manages HTTP communication, JSON serialization, and cryptographic signing internally. It requires a free Pusher account and valid application credentials to function.
Use it for:
- Broadcast real-time notifications to web or mobile clients when server-side events occur (e.g., order status updates, chat messages).
- Query active channel subscriptions and user presence to display live user counts or online status in your application.
- Validate webhook payloads from Pusher to ensure they originated from your account and process them securely.
- Authenticate private or presence channel subscriptions from clients, controlling who can join which channels.
- Send targeted messages to specific users by user ID rather than broadcasting to a channel.
- Batch multiple events in a single HTTP request to reduce overhead when triggering many events at once.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pusher is a Python client library for the Pusher Channels API, enabling you to trigger real-time events to clients, query channel state, validate webhooks, and authenticate private or presence channels from a server.
Yes. Pusher is actively maintained, has no known vulnerabilities, and offers low install friction with a pure-Python wheel. It is well-suited for any Python backend that needs to integrate with Pusher Channels for real-time messaging. The main condition is that you have a Pusher account and are willing to depend on the Pusher service; it is not a standalone real-time library but a client for a hosted platform.
Install
pusher on PyPI
pip
pip install pusheruv
uv add pusherpoetry
poetry add pusherInstalling pusher
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Seven runtime dependencies (six, requests, urllib3, pyopenssl, ndg-httpsclient, pyasn1, pynacl) are all well-established libraries, though the cryptography stack adds some complexity.
License in practice
MIT license is permissive and imposes minimal restrictions. You can use, modify, and distribute this package freely in commercial and private projects with only attribution required.
Quickstart
pip install pusher
import pusher
pusher_client = pusher.Pusher(app_id=u'4', key=u'key', secret=u'secret', cluster=u'cluster')
pusher_client.trigger(u'a_channel', u'an_event', {u'some': u'data'})
Requires a Pusher Channels account with valid app credentials (app_id, key, secret, cluster). Python 3.6 or above is required.
Verify before relying
- Whether the aiohttp and tornado adapters mentioned in the description are fully functional or require additional setup beyond the base install.
- Performance characteristics and rate limits when triggering events to many channels or with large payloads.
- End-to-end encryption support stability and whether encryption_master_key_base64 is production-ready.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — six, requests, urllib3, pyopenssl, ndg-httpsclient, pyasn1, pynacl |
| Maintenance | actively maintained — 148 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,297,984/month — #2,668 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pusher-3.3.4-py2.py3-none-any.whl
Keywords: pusher, rest, realtime, websockets, service
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
PysherPysher is a Python client library for consuming…
permissive · top 5,000 on PyPI
channels-redisProvides Redis-backed channel layers for Django…
permissive · top 5,000 on PyPI
django-eventstreamAdds Server-Sent Events (SSE) streaming to…
permissive · top 15,000 on PyPI
pubnubPubNub Python SDK provides real-time…
unclear · top 15,000 on PyPI
twitchAPIA Python client library for the Twitch Helix…
permissive · top 15,000 on PyPI
realtimeA Python client for Supabase Realtime that…
permissive · top 1,000 on PyPI
ablyAbly is a Python client library for connecting…
permissive · top 5,000 on PyPI
aiochannelProvides asyncio-compatible channels (closable…
permissive · top 15,000 on PyPI
apns2-upSends push notifications to iOS devices through…
permissive · top 15,000 on PyPI
standardwebhooksProvides webhook payload verification and…
permissive · top 5,000 on PyPI