skillfed

PlexAPI

Python bindings for the Plex API.

plexapi v4.18.2 408.6K downloads/30d#6,876 on PyPI1,289
Permissive license BSD-3-Clause Active released

What it is and what it does

PlexAPI is an unofficial Python wrapper around the Plex media server API, letting you automate interactions with Plex servers from Python code. It depends only on requests and works with Python 3.10 and later. You can use it to navigate and search libraries, perform server maintenance tasks like scanning and analyzing, remotely control playback on connected clients (including Sonos speakers with appropriate setup), and subscribe to server notifications.

The library is designed to match the capabilities of the official Plex Web Client. It reads XML documents from the Plex server and exposes them as Python objects with camelCase naming to match the underlying API structure. The project has been maintained since 2014, is actively developed, and has no known security vulnerabilities.

Use it for:

  • Automatically find and list unwatched content in your Plex library for batch operations or reporting.
  • Build a custom remote control interface to play media on specific Plex clients from a Python application.
  • Automate library maintenance tasks like scanning for new media, analyzing metadata, or emptying trash.
  • Create integrations that respond to Plex server events by listening to notifications.
  • Query and manage playlists, ratings, and playback state across your Plex server programmatically.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Unofficial Python bindings for the Plex API that let you programmatically control Plex servers, search libraries, manage playback on connected clients, and listen to server notifications.

Yes. PlexAPI is actively maintained, has no known vulnerabilities, installs cleanly with minimal dependencies, and supports current Python versions. It's well-suited for anyone needing to automate Plex server operations or build custom integrations. The BSD-3-Clause license is permissive. The only gotcha is that you need network access to a running Plex Server and a valid auth token to use it.

Install

plexapi on PyPI

pip

pip install plexapi

uv

uv add plexapi

poetry

poetry add plexapi

Installing PlexAPI

Before you install

Low install friction with a single runtime dependency (requests). Active maintenance: last commit 2026-08-04, 1289 repository stars, and release within 35 days. Requires Python 3.10 or later.

License in practice

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, provided you retain the license notice.

Quickstart

pip install plexapi

from plexapi.server import PlexServer
baseurl = 'http://plexserver:32400'
token = 'your_auth_token'
plex = PlexServer(baseurl, token)
movies = plex.library.section('Movies')
for video in movies.search(unwatched=True):
    print(video.title)

Requires Python 3.10 or later; you must have network access to a running Plex Server instance and a valid authentication token.

Verify before relying

  • Whether optional dependencies for alert and JWT features are stable and well-maintained.
  • Compatibility with all current Plex Server versions and whether breaking changes are documented.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance actively maintained — 35 days since the last release
Last repo commit
First released
Downloads 408,596/month — #6,876 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: plexapi-4.18.2-py3-none-any.whl

Keywords: plex, api

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

plex server control pythonplex api bindingsplex library automationplex media playback remoteplex client controlplex notification listenerplex server management
media-serverautomationapi-wrapper

More Internet packages