skillfed

plexwebsocket

Support for issuing callbacks in response to Plex websocket updates.

plexwebsocket v0.0.14 112.1K downloads/30d#12,382 on PyPI5
Permissive license MIT DORMANT released

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 plexwebsocket

uv

uv add plexwebsocket

poetry

poetry add plexwebsocket

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

plex websocket eventsplex server notificationsasync plex listenerplex playback callbacksplex real-time updatesplex event streamingplex status monitoring
plex-integrationwebsocket-eventsasync-io

More Internet packages