pywidevinex


Namepywidevinex JSON
Version 1.8.3 PyPI version JSON
download
home_pageNone
SummaryWidevine CDM (Content Decryption Module) implementation in Python.
upload_time2025-10-10 12:32:32
maintainerNone
docs_urlNone
authorrlaphoenix
requires_python>=3.8
licenseGPL-3.0-only
keywords python drm widevine google
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pywidevine

## Features

- 🚀 Seamless Installation via [pip](#installation)
- 🛡️ Robust Security with message signature verification
- 🙈 Privacy Mode with Service Certificates
- 🌐 Servable CDM API Server and Client with Authentication
- 📦 Custom provision serialization format (WVD v2)
- 🧰 Create, parse, or convert PSSH headers with ease
- 🗃️ User-friendly YAML configuration
- ❤️ Forever FOSS!

## Installation

```shell
$ pip install pywidevine
```

> **Note**
If pip gives you a warning about a path not being in your PATH environment variable then promptly add that path then
close all open command prompt/terminal windows, or `pywidevine` CLI won't work as it will not be found.

Voilà 🎉 — You now have the `pywidevine` package installed!  
You can now import pywidevine in scripts ([see below](#usage)).  
A command-line interface is also available, try `pywidevine --help`.

## Usage

The following is a minimal example of using pywidevine in a script to get a License for Bitmovin's
Art of Motion Demo.

```py
from pywidevine.cdm import Cdm
from pywidevine.device import Device
from pywidevine.pssh import PSSH

import requests

# prepare pssh
pssh = PSSH("AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==")

# load device
device = Device.load("C:/Path/To/A/Provision.wvd")

# load cdm
cdm = Cdm.from_device(device)

# open cdm session
session_id = cdm.open()

# get license challenge
challenge = cdm.get_license_challenge(session_id, pssh)

# send license challenge (assuming a generic license server SDK with no API front)
licence = requests.post("https://...", data=challenge)
licence.raise_for_status()

# parse license challenge
cdm.parse_license(session_id, licence.content)

# print keys
for key in cdm.get_keys(session_id):
    print(f"[{key.type}] {key.kid.hex}:{key.key.hex()}")

# close session, disposes of session data
cdm.close(session_id)
```

> **Note**
> There are various features not shown in this specific example like:
>
> - Privacy Mode
> - Setting Service Certificates
> - Remote CDMs and Serving
> - Choosing a License Type to request
> - Creating WVD files
> - and much more!
>
> Take a look at the methods available in the [Cdm class](/pywidevine/cdm.py) and their doc-strings for
> further information. For more examples see the [CLI functions](/pywidevine/main.py) which uses a lot
> of previously mentioned features.

## Disclaimer

1. This project requires a valid Google-provisioned Private Key and Client Identification blob which are not
   provided by this project.
2. Public test provisions are available and provided by Google to use for testing projects such as this one.
3. License Servers have the ability to block requests from any provision, and are likely already blocking test
   provisions on production endpoints.
4. This project does not condone piracy or any action against the terms of the DRM systems.
5. All efforts in this project have been the result of Reverse-Engineering, Publicly available research, and Trial
   & Error.

## Licensing

This software is licensed under the terms of [GNU General Public License, Version 3.0](LICENSE).  
You can find a copy of the license in the LICENSE file in the root folder.

- Widevine Icon © Google.
- Props to the awesome community for their shared research and insight into the Widevine Protocol and Key Derivation.

* * *

© rlaphoenix 2022-2023
DevLARLEY 2025-2025


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pywidevinex",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python, drm, widevine, google",
    "author": "rlaphoenix",
    "author_email": "rlaphoenix@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/d8/67/a23bf01770f0d392e4dbe8624543234cebef6c794042085f92e9ef5a56c4/pywidevinex-1.8.3.tar.gz",
    "platform": null,
    "description": "# pywidevine\n\n## Features\n\n- \ud83d\ude80 Seamless Installation via [pip](#installation)\n- \ud83d\udee1\ufe0f Robust Security with message signature verification\n- \ud83d\ude48 Privacy Mode with Service Certificates\n- \ud83c\udf10 Servable CDM API Server and Client with Authentication\n- \ud83d\udce6 Custom provision serialization format (WVD v2)\n- \ud83e\uddf0 Create, parse, or convert PSSH headers with ease\n- \ud83d\uddc3\ufe0f User-friendly YAML configuration\n- \u2764\ufe0f Forever FOSS!\n\n## Installation\n\n```shell\n$ pip install pywidevine\n```\n\n> **Note**\nIf pip gives you a warning about a path not being in your PATH environment variable then promptly add that path then\nclose all open command prompt/terminal windows, or `pywidevine` CLI won't work as it will not be found.\n\nVoil\u00e0 \ud83c\udf89 \u2014 You now have the `pywidevine` package installed!  \nYou can now import pywidevine in scripts ([see below](#usage)).  \nA command-line interface is also available, try `pywidevine --help`.\n\n## Usage\n\nThe following is a minimal example of using pywidevine in a script to get a License for Bitmovin's\nArt of Motion Demo.\n\n```py\nfrom pywidevine.cdm import Cdm\nfrom pywidevine.device import Device\nfrom pywidevine.pssh import PSSH\n\nimport requests\n\n# prepare pssh\npssh = PSSH(\"AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==\")\n\n# load device\ndevice = Device.load(\"C:/Path/To/A/Provision.wvd\")\n\n# load cdm\ncdm = Cdm.from_device(device)\n\n# open cdm session\nsession_id = cdm.open()\n\n# get license challenge\nchallenge = cdm.get_license_challenge(session_id, pssh)\n\n# send license challenge (assuming a generic license server SDK with no API front)\nlicence = requests.post(\"https://...\", data=challenge)\nlicence.raise_for_status()\n\n# parse license challenge\ncdm.parse_license(session_id, licence.content)\n\n# print keys\nfor key in cdm.get_keys(session_id):\n    print(f\"[{key.type}] {key.kid.hex}:{key.key.hex()}\")\n\n# close session, disposes of session data\ncdm.close(session_id)\n```\n\n> **Note**\n> There are various features not shown in this specific example like:\n>\n> - Privacy Mode\n> - Setting Service Certificates\n> - Remote CDMs and Serving\n> - Choosing a License Type to request\n> - Creating WVD files\n> - and much more!\n>\n> Take a look at the methods available in the [Cdm class](/pywidevine/cdm.py) and their doc-strings for\n> further information. For more examples see the [CLI functions](/pywidevine/main.py) which uses a lot\n> of previously mentioned features.\n\n## Disclaimer\n\n1. This project requires a valid Google-provisioned Private Key and Client Identification blob which are not\n   provided by this project.\n2. Public test provisions are available and provided by Google to use for testing projects such as this one.\n3. License Servers have the ability to block requests from any provision, and are likely already blocking test\n   provisions on production endpoints.\n4. This project does not condone piracy or any action against the terms of the DRM systems.\n5. All efforts in this project have been the result of Reverse-Engineering, Publicly available research, and Trial\n   & Error.\n\n## Licensing\n\nThis software is licensed under the terms of [GNU General Public License, Version 3.0](LICENSE).  \nYou can find a copy of the license in the LICENSE file in the root folder.\n\n- Widevine Icon © Google.\n- Props to the awesome community for their shared research and insight into the Widevine Protocol and Key Derivation.\n\n* * *\n\n\u00a9 rlaphoenix 2022-2023\nDevLARLEY 2025-2025\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "Widevine CDM (Content Decryption Module) implementation in Python.",
    "version": "1.8.3",
    "project_urls": {
        "Issues": "https://git.gay/ready-dl/pywidevine/issues",
        "Repository": "https://git.gay/ready-dl/pywidevine"
    },
    "split_keywords": [
        "python",
        " drm",
        " widevine",
        " google"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "162dc3b1867e173a7464498168058d3530d584858d91e1b21c887bbb0f5c4d5d",
                "md5": "d2e58ad1e2daef564900dd9a2b4961e1",
                "sha256": "ed559a24ce6ed92bb0d8be7c64354ad7cc031240ed4007710cbd324a4a5e9a91"
            },
            "downloads": -1,
            "filename": "pywidevinex-1.8.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d2e58ad1e2daef564900dd9a2b4961e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 70156,
            "upload_time": "2025-10-10T12:32:30",
            "upload_time_iso_8601": "2025-10-10T12:32:30.546236Z",
            "url": "https://files.pythonhosted.org/packages/16/2d/c3b1867e173a7464498168058d3530d584858d91e1b21c887bbb0f5c4d5d/pywidevinex-1.8.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d867a23bf01770f0d392e4dbe8624543234cebef6c794042085f92e9ef5a56c4",
                "md5": "6d0df470e9da459732f3d128c34bdb4b",
                "sha256": "7e299873b2197c6ffb6c65ea35cd3087e7c3d71d65bbf14040ec2e2166d4bcda"
            },
            "downloads": -1,
            "filename": "pywidevinex-1.8.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6d0df470e9da459732f3d128c34bdb4b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 63084,
            "upload_time": "2025-10-10T12:32:32",
            "upload_time_iso_8601": "2025-10-10T12:32:32.041422Z",
            "url": "https://files.pythonhosted.org/packages/d8/67/a23bf01770f0d392e4dbe8624543234cebef6c794042085f92e9ef5a56c4/pywidevinex-1.8.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 12:32:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pywidevinex"
}
        
Elapsed time: 2.13756s