Handles the authorization flow to obtain tokens from Plex.tv via external redirection.
Project description
python-plexauth
Handles the authorization flow to obtain tokens from Plex.tv via external redirection.
Example usage:
import asyncio
from plexauth import PlexAuth
PAYLOAD = {
'X-Plex-Product': 'Test Product',
'X-Plex-Version': '0.0.1',
'X-Plex-Device': 'Test Device',
'X-Plex-Platform': 'Test Platform',
'X-Plex-Device-Name': 'Test Device Name',
'X-Plex-Device-Vendor': 'Test Vendor',
'X-Plex-Model': 'Test Model',
'X-Plex-Client-Platform': 'Test Client Platform'
}
async def main():
async with PlexAuth(PAYLOAD) as plexauth:
await plexauth.initiate_auth()
print("Complete auth at URL: {}".format(plexauth.auth_url()))
token = await plexauth.token()
if token:
print("Token: {}".format(token))
else:
print("No token returned.")
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plexauth-0.0.5.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plexauth-0.0.5.tar.gz.
File metadata
- Download URL: plexauth-0.0.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
289fb9b25cc9786ed1442c172e9f35119511d76291d9e810e844dcf2032fee3f
|
|
| MD5 |
f84137b476e12e0958aa55306fffe7ba
|
|
| BLAKE2b-256 |
589d621dfa0e5a1694c057c65369473110fe891a2c1946c81ae9b3300d8360aa
|
File details
Details for the file plexauth-0.0.5-py3-none-any.whl.
File metadata
- Download URL: plexauth-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec1a8d83e5efc8f82145955fdb16aae282156a2ba3adfca2fbbf8c3faeb6a0f
|
|
| MD5 |
36fde308257c7b41ef194a722d32fe39
|
|
| BLAKE2b-256 |
70748155c6394c8e7d9651fd048f9bc23f3b66e94c90145899dc7f1f8bb715b0
|