Skip to main content

python-plexwebsocket

Async library to react to events issued over Plex websockets.

Example use

import asyncio
import logging
from plexapi.server import PlexServer
from plexwebsocket import PlexWebsocket, SIGNAL_CONNECTION_STATE

logging.basicConfig(level=logging.DEBUG)

baseurl = 'http://<PLEX_SERVER_IP>:32400'
token = '<YOUR_TOKEN_HERE>'
plex = PlexServer(baseurl, token)

def print_info(msgtype, data, error):
    if msgtype == SIGNAL_CONNECTION_STATE:
        print(f"State: {data} / Error: {error}")
    else:
        print(f"Data: {data}")

async def main():
    ws = PlexWebsocket(plex, print_info, subscriptions=["playing", "status"])
    await ws.listen()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Metadata

Release files for plexwebsocket 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plexwebsocket 0.0.14
File Size Uploaded
plexwebsocket-0.0.14.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plexwebsocket 0.0.14
File Interpreter ABI Platform
plexwebsocket-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / plexwebsocket-0.0.14.tar.gz

Download URL plexwebsocket-0.0.14.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f90c50c05e0cf2d824b9e3083ad77d843d8ef9d4e80c01ed34181c2ef094f80b
BLAKE2b-256 checksum
How to use checksums
dd53e37efeb5e29bc2c3036cb4b06257fd2b4699a88a7269cc2233337b93e5c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / plexwebsocket-0.0.14-py3-none-any.whl

Download URL plexwebsocket-0.0.14-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f00aa36a42908ca16a8c5a79ddbb99e9b9d98538636a41eb2666edcb85b6141c
BLAKE2b-256 checksum
How to use checksums
3d87b52611c5009f5b3d1025eec28dbcf04a5a8ddac2883a935a535986bbff09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.0.14 This release

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page