Skip to main content

Gecko Web Runtime Client

Python page and browser client for a versioned Firefox-derived WPR runtime. It exposes pages, contexts, navigation, DOM access, screenshots, diagnostics, Turnstile and WeChat workflow adapters.

The native runtime is installed separately:

python -m gecko_web_runtime install-runtime --version 155

The runtime is held in a private GitHub Release. Automatic download needs access to childclm/gecko-web-runtime. The Python client depends on wpr-runtime-core for Worker lifecycle and protocol compatibility. Historical HTTP imports are retained through wpr-http.

Media capture

For a browser-played Widevine page, use AsyncMediaDownloader. It starts the Worker, provisions the caller's Widevine profile, enables bounded native H.264 capture, waits for playback progress, writes a checkpoint, and verifies the final MP4 with FFmpeg.

import asyncio
from pathlib import Path

from gecko_web_runtime import AsyncMediaDownloader


async def main() -> None:
    result = await AsyncMediaDownloader(
        "https://example.test/video",
        output_dir=Path("./media-output"),
        ffmpeg=Path(r"C:\\ffmpeg\\bin\\ffmpeg.exe"),
        expected_duration=2575.32,
        max_retries=1,
    ).download()
    if not result["completed"]:
        raise RuntimeError(result["attempts"])
    print(result["package"]["output"])


asyncio.run(main())

Set WPR_RUNTIME_DIR, WPR_WORKER_EXE, WPR_PERSISTENT_PROFILE_DIR, and WPR_ENABLE_CDM=1 before creating the downloader. Widevine is installed by Firefox's official GMP installer into the persistent WPR profile; no existing Firefox profile or component is imported. This requires the Worker build with runtime.widevine_start/status support (Runtime 155.0.8 or later). For a bounded smoke test of a longer page, use sample_seconds=120 instead of expected_duration. The downloader keeps a checkpoint.json; rerunning with the same output directory returns a completed result without starting another Worker.

Metadata

Release files for gecko-web-runtime-client 1.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gecko-web-runtime-client 1.4.2
File Size Uploaded
gecko_web_runtime_client-1.4.2.tar.gz 65.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gecko-web-runtime-client 1.4.2
File Interpreter ABI Platform
gecko_web_runtime_client-1.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 129.8 kB

Release files / gecko_web_runtime_client-1.4.2.tar.gz

Download URL gecko_web_runtime_client-1.4.2.tar.gz
Size 65.0 kB
Tags Source
SHA-256 checksum
How to use checksums
686bdb6557d86cbc1235420399c077c10b644a2008ab2068038fea964d841e68
BLAKE2b-256 checksum
How to use checksums
c0d0d128ff8c68400b921304da52da4b9249d8e49c6e3423b293690404acd77c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / gecko_web_runtime_client-1.4.2-py3-none-any.whl

Download URL gecko_web_runtime_client-1.4.2-py3-none-any.whl
Size 64.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8745e6839989da8f9402da48b03f32a30b3a02ebafb5f0445e8b2d8ff2e29d12
BLAKE2b-256 checksum
How to use checksums
e6c76398c5e6ab26b12034d90682d656af1872066378f67380b4e53af5a7834b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page