--- id: pywidevine version: "1.9.0" license: GPL-3.0-only license_treatment: copyleft maintenance: aging --- # pywidevine — Widevine CDM (Content Decryption Module) implementation in Python. License: copyleft · Maintenance: aging · Downloads: 128.4K/mo ## What it is and what it does pywidevine is a Python implementation of Google's Widevine Content Decryption Module (CDM), a DRM system used to protect streaming video. It handles the cryptographic handshake required to acquire decryption licenses from Widevine-protected services: you provide a PSSH header (Protection System Specific Header), a device provision, and a license server URL, and the library generates a license challenge, parses the server's response, and extracts the content keys. It exposes both a programmatic API (Cdm, Device, PSSH classes) and a command-line interface. The package depends on protobuf, pymp4, pycryptodome, click, requests, Unidecode, and PyYAML. It is designed for license acquisition only, not for the full CDM lifecycle (downloading, decrypting, and decoding content). The documentation explicitly warns that content keys and decrypted data are not secure in this Python implementation and that the package requires a valid Google-provisioned device provision to operate. Use it for: - Acquire Widevine licenses programmatically for testing or research on DRM-protected streaming services. - Parse and convert PSSH headers to understand or debug DRM protection metadata in video files. - Build a custom license server or proxy that intercepts and logs Widevine license requests. - Automate license acquisition in a headless environment where a browser CDM is unavailable. - Create or manage WVD provision files for testing or device emulation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements Widevine Content Decryption Module (CDM) functionality in Python, enabling license acquisition and key retrieval for DRM-protected content. Yes, if you need Widevine license acquisition in Python and have a valid device provision. The package is stable, actively maintained (despite aging status), has no known vulnerabilities, and low install friction. However, the GPL-3.0 copyleft license is a hard blocker for proprietary projects, and you must obtain a Google-provisioned device provision separately—the package itself does not provide one. Evaluate your legal and licensing obligations before use. ## Install pip install pywidevine uv add pywidevine poetry add pywidevine ## Installing pywidevine Before you install: Low friction install via pip with a pure Python wheel. Maintenance status is aging—last commit was 291 days ago—but the repository remains active and not archived, with a stable production classifier and support for current Python versions. License in practice: Licensed under GPL-3.0-only (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary or closed-source projects cannot incorporate this package without legal risk. Quickstart: pip install pywidevine from pywidevine.cdm import Cdm from pywidevine.device import Device from pywidevine.pssh import PSSH device = Device.load("path/to/provision.wvd") cdm = Cdm.from_device(device) session_id = cdm.open() pssh = PSSH("encoded_pssh_string") challenge = cdm.get_license_challenge(session_id, pssh) Requires a valid Google-provisioned Private Key and Client Identification blob (provision file) to function; public test provisions exist but may be blocked by production license servers. Verify before relying: - Whether test provisions are reliably available or documented for evaluation without a production device. - Performance characteristics when handling large-scale license requests or multiple concurrent sessions. - Compatibility with specific DRM-protected streaming services beyond examples shown. ## Package facts - License: GPL-3.0-only (copyleft) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 128.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags widevine cdm python, drm license acquisition, content decryption module, widevine key extraction, pssh parsing drm, license challenge handling, drm protected video, drm, widevine, cryptography [View on SkillFed](https://skillfed.io/packages/pywidevine) · [View on PyPI](https://pypi.org/project/pywidevine/)