--- id: plexauth version: "0.0.6" license: MIT license_treatment: permissive maintenance: dormant --- # plexauth — Handles the authorization flow to obtain tokens from Plex.tv via external redirection. License: permissive · Maintenance: dormant · Downloads: 111.4K/mo ## 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 above — 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 pip install plexauth uv add plexauth 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 111.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags plex authentication token, plex oauth flow, plex.tv authorization, async plex login, plex api auth, plex device auth, plex token exchange, plex-integration, oauth-flow, async-auth [View on SkillFed](https://skillfed.io/packages/plexauth) · [View on PyPI](https://pypi.org/project/plexauth/)