pywidevine
Widevine CDM (Content Decryption Module) implementation in Python.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- 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.
- 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 · maintenance · safety
GPL-3.0-only (copyleft) — 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.
last release 2025-10-27 (291 days) · last repo commit 2025-10-27 · 911 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 128,405 downloads/mo, #11,709 on PyPI
Alternatives
Verify before relying
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)- 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.
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 on this page. Verify before relying on it.
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
pywidevine on PyPI
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.
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.
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)
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 the current Python release <4.0,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesprotobufpymp4pycryptodomeclickrequestsUnidecodePyYAML |
| Maintenance | Aging 291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,405 / month, #11,709 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Multimedia :: VideoTopic :: Security :: CryptographyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: pywidevine-1.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “widevine cdm python”
- pywidevineImplements Widevine Content Decryption Module (CDM) functionality in…
- eightEight provides a compatibility layer that lets you write Python 3…
- futureProvides Python 3 syntax and semantics on Python 2, allowing a single…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pyaes · kasa-crypt · python-gnupg · pysequoia · gmssl · pyAesCrypt · PGPy13 · pyrage · xxtea · twofish