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.4.tar.gz
(2.4 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.4.tar.gz.
File metadata
- Download URL: plexauth-0.0.4.tar.gz
- Upload date:
- Size: 2.4 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.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a9f7c55fd8b8c179d9fe4fd9a4e5b3e19dad181ac100b01f429ca0cb8f8a0f5
|
|
| MD5 |
4894e92b5842b6624d6c2c387ca7c73d
|
|
| BLAKE2b-256 |
6045c93792bc949c6e4cb559a4dd2ba248a91df9aa8856e83de648f0860398f9
|
File details
Details for the file plexauth-0.0.4-py3-none-any.whl.
File metadata
- Download URL: plexauth-0.0.4-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.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
004d8210568dfdd837019d3228567d63de41f80b952d676b042c44e9659a5643
|
|
| MD5 |
1a3df98f464b6bf352d9b0e9aa117b72
|
|
| BLAKE2b-256 |
de2ed2e2f9094a9afd1d47496dcd3f209f3ca18377b0ac42cc529c1f0c1dd8d6
|