skillfed

plexauth

Handles the authorization flow to obtain tokens from Plex.tv via external redirection.

plexauth v0.0.6 111.4K downloads/30d#12,420 on PyPI6
Permissive license MIT DORMANT released

What it is and what it does

PlexAuth is a small async library that manages the authorization handshake with Plex.tv. It initiates an authentication request, generates a URL for the user to complete login in a browser, then polls Plex.tv for the resulting access token. The library wraps this flow in an async context manager, making it suitable for integration into async applications that need to authenticate with Plex without blocking.

The package depends only on aiohttp and is designed to be lightweight. However, it has been dormant since its last release on 2020-11-11, with the most recent commit on 2023-12-30. While no vulnerabilities are known, the lack of active maintenance means it may not track changes to Plex.tv's authentication API or support newer Python versions.

Use it for:

  • Integrate Plex authentication into an async Python application that needs user tokens.
  • Build a Plex client or media server integration that requires device authorization.
  • Automate token acquisition for Plex API calls in a background service or bot.
  • Handle multi-device authentication flows where users authorize via browser redirection.

Worth the install?

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

Handles authorization flow to obtain tokens from Plex.tv via external redirection using async/await.

Yes, if you need Plex.tv authentication in an async context and are willing to accept dormant maintenance. The package is simple, has low install friction, and carries no known vulnerabilities. However, verify that Plex.tv's current API still matches the implementation before deploying to production, and be prepared to fork or patch if the authentication flow changes.

Install

plexauth on PyPI

pip

pip install plexauth

uv

uv add plexauth

poetry

poetry add plexauth

Installing plexauth

Before you install

Low install friction with a single runtime dependency (aiohttp). Maintenance is dormant—last release was 2020-11-11 and last commit 2023-12-30, so expect no active bug fixes or feature updates.

License in practice

MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, though you must include the license notice.

Quickstart

pip install plexauth

import asyncio
from plexauth import PlexAuth

PAYLOAD = {
    'X-Plex-Product': 'MyApp',
    'X-Plex-Version': '1.0',
    'X-Plex-Device': 'PC',
    'X-Plex-Platform': 'Linux',
    'X-Plex-Device-Name': 'MyDevice',
    'X-Plex-Device-Vendor': 'Vendor',
    'X-Plex-Model': 'Model',
    'X-Plex-Client-Platform': 'Web'
}

async def main():
    async with PlexAuth(PAYLOAD) as plexauth:
        await plexauth.initiate_auth()
        print(plexauth.auth_url())
        token = await plexauth.token()
        print(token)

asyncio.run(main())

Requires aiohttp for async HTTP requests.

Verify before relying

  • Whether the package works with Plex.tv's current authentication endpoints.
  • Compatibility with Python versions beyond those listed in classifiers (3.5, 3.6, 3.7).
  • Whether aiohttp's version constraints are compatible with modern releases.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — aiohttp
Maintenance dormant — 2,102 days since the last release
Last repo commit
First released
Downloads 111,375/month — #12,420 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: plexauth-0.0.6-py3-none-any.whl

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

Tags

plex authentication tokenplex oauth flowplex.tv authorizationasync plex loginplex api authplex device authplex token exchange
plex-integrationoauth-flowasync-auth

More Internet packages