Registry / devops / pyplayready

pyplayready

JSON →
library0.8.4pypypi✓ verified 86d ago

A pure-Python implementation of the PlayReady Content Decryption Module (CDM), used for decrypting PlayReady-protected content in streaming applications. Current version: 0.8.4, supports Python 3.8–3.11. Active development with periodic releases.

pip install pyplayready
INSTALL
IMPORT
SIG · PYPLAYREADY
P
pyplayready
devopspythonv0.8.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Device
from pyplayready import Device
from pyplayready.device import Device
Device is a top-level class; previous beta versions required a submodule import.
Cenc
from pyplayready import Cenc
from pyplayready.cenc import Cenc
Cenc is also exported from the top-level package.

Load a PlayReady device file (.wvd), generate a license challenge, and prepare for decryption.

from pyplayready import Device, Cenc import os # Load a .wvd device file (path from environment variable for security) device_path = os.environ.get('DEVICE_PATH', 'device.wvd') device = Device.load(device_path) # Example: decrypt a CENC-encrypted stream using a license challenge cenc = Cenc() challenge = cenc.get_challenge(device) print("Challenge:", challenge.hex()) # Send challenge to license server, parse response, then decrypt
Debug
Known issues
gotchaDevice files must be in the .wvd format specific to pyplayready; other formats (e.g., from pywidevine) are incompatible.
fix
Convert device files using the official conversion tool or re-dump from a valid PlayReady device.
affects: <0.8.0
breakingThe Device class moved from pyplayready.device to pyplayready in v0.8.0. Old imports fail.
fix
Use 'from pyplayready import Device' instead of 'from pyplayready.device import Device'.
affects: <0.8.0
gotchaLicense server URLs and keys must be provided externally; pyplayready does not include any default server.
fix
Always set your own license URL and authentication tokens; see the official README for examples.
affects: all
deprecatedThe method Device.from_file() is deprecated in favor of Device.load().
fix
Replace Device.from_file(path) with Device.load(path).
affects: >=0.8.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyplayready.device'
Import path changed in v0.8.0; Device is now a top-level export.
fix
Use 'from pyplayready import Device'.
ValueError: Unsupported device file format
The provided .wvd file is not in valid pyplayready format (e.g., from a different CDM).
fix
Use only device files generated specifically for pyplayready, or convert using the utility in the repository.
TypeError: get_challenge() missing 1 required positional argument: 'device'
Cenc.get_challenge() expects a Device object; the argument may have been omitted.
fix
Ensure the call is cenc.get_challenge(device).
Upgrade
Version history
0.8.4latest on PyPI · released Mar 12, 2026
Audit
Dependencies
pycryptodomerequiredCryptographic operations for key decryption and AES handling.
requestsrequiredHTTP requests for license acquisition from PlayReady servers.
Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

pyplayready — pip install pyplayready · libregistry