plexwebsocket
Support for issuing callbacks in response to Plex websocket updates.
What it is and what it does
PlexWebsocket is an async Python library that establishes a persistent websocket connection to a Plex Media Server and emits callbacks when server events occur—such as playback state changes, status updates, or other monitored events. It wraps the underlying websocket protocol and event subscription logic, allowing developers to react to Plex activity in real time without polling.
The library depends on aiohttp for its async HTTP and websocket transport. It is designed for event-driven applications that need to monitor or respond to Plex server activity, such as home automation, media dashboards, or integration layers.
Use it for:
- Monitor Plex playback state in real time to trigger home automation routines when media starts or stops.
- Build a dashboard that updates live when Plex server status changes or playback events occur.
- Integrate Plex server events into a larger application that needs to react to media activity.
- Log or audit Plex server activity by subscribing to status and playing events.
- Synchronize external systems with Plex playback state without polling the server.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Async library that connects to Plex media servers over websockets and triggers callbacks when server events occur, such as playback state changes or status updates.
Yes, if you need real-time Plex server event callbacks and can accept dormant maintenance. The library is simple, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. However, no active development has occurred since 2023-10-09, so compatibility with newer Plex server versions or Python releases is unverified—test thoroughly in your environment before relying on it in production.
Install
plexwebsocket on PyPI
pip
pip install plexwebsocketuv
uv add plexwebsocketpoetry
poetry add plexwebsocketInstalling plexwebsocket
Before you install
Low install friction with a single runtime dependency on aiohttp. Maintenance is dormant—last commit was 2023-10-09 and no updates since the initial release—so expect no active bug fixes or feature work, though the repository remains public and unarchived.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions, making it safe to integrate into most projects.
Quickstart
pip install plexwebsocket
from plexwebsocket import PlexWebsocket, SIGNAL_CONNECTION_STATE
import asyncio
def callback(msgtype, data, error):
print(f"Event: {msgtype}, Data: {data}")
async def main():
ws = PlexWebsocket(plex_server, callback, subscriptions=["playing"])
await ws.listen()
asyncio.run(main())
Requires a running Plex Media Server instance and valid authentication token; aiohttp must be installed as a runtime dependency.
Verify before relying
- Whether the library works with current Plex server versions released after 2023-10-09.
- Compatibility with Python versions beyond 3.8 (classifiers list only up to 3.8).
- Whether dormancy indicates known issues or simply stable, maintenance-free code.
- How to properly instantiate PlexWebsocket with a server object in current usage patterns.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — aiohttp |
| Maintenance | dormant — 1,040 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 112,090/month — #12,382 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: plexwebsocket-0.0.14-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
PlexAPIUnofficial Python bindings for the Plex API…
permissive · top 15,000 on PyPI
moonraker-apiFully async Python client for connecting to and…
copyleft · top 15,000 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
aiopyarrAsync Python client library for Lidarr, Radarr,…
permissive · top 15,000 on PyPI
plexauthHandles authorization flow to obtain tokens…
permissive · top 15,000 on PyPI
lomondLomond is a WebSocket client library that…
permissive · top 5,000 on PyPI
roonapiPython client library for the Roon music server…
permissive · top 15,000 on PyPI
directvAsynchronous Python client for controlling and…
permissive · top 15,000 on PyPI
websocketswebsockets is a library for building WebSocket…
permissive · top 100 on PyPI
rokuecpAn asynchronous Python client for controlling…
permissive · top 15,000 on PyPI