Skip to main content

offprint for Python

The offprint package captures rendered pages through the native Offprint service and returns canonical capture records as dictionaries.

It supports Python 3.10 through 3.14 on Linux x86-64 with glibc, macOS arm64 and x86-64, and Windows x86-64.

Linux hosts also need Chromium's shared runtime libraries.

Capture from the command line

Run with uvx, uv's Python command runner:

uvx offprint capture https://example.com --output example.html --quiet

Use in an application

Install version 0.0.1:

python -m pip install offprint==0.0.1
import asyncio

from offprint import Offprint


async def main() -> None:
    async with Offprint() as offprint:
        receipt = await offprint.capture(
            "https://example.com",
            output="example.html",
        )
        artifact = receipt["artifact"]
        assert artifact["kind"] == "file"
        print(artifact["path"])


asyncio.run(main())

The first capture discovers a compatible Chrome, Chromium, or Microsoft Edge installation. When discovery and the managed cache are empty, Offprint downloads and verifies its pinned Chrome for Testing build.

Requests and jobs

Inside the service context, create a request with native defaults, choose memory output, and start a job:

request = offprint.captures.request("https://example.com")
request["output"] = {"kind": "memory", "maxBytes": 16 * 1024 * 1024}
job = await offprint.captures.start(request)
receipt = await job.result()

Use job.events() for progress and job.cancel() to request cancellation. Use async with for a bounded lifetime, or await close() during shutdown. offprint.artifacts inspects, verifies, and exports saved captures. offprint.browsers manages browser discovery and installations.

Methods and keyword arguments use snake_case. Request and result dictionaries use camelCase. Failures raise OffprintError subclasses with a stable code, stage, and retryable flag.

Read the complete Python integration guide, record reference, and troubleshooting guide.

src/offprint/__init__.pyi owns exact host signatures. src/offprint/contracts.py owns importable generated canonical dictionary shapes.

Source contributors can follow the contributor setup.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

offprint-0.0.1.tar.gz (654.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

offprint-0.0.1-cp310-abi3-win_amd64.whl (9.9 MB view details)

Uploaded CPython 3.10+Windows x86-64

offprint-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

offprint-0.0.1-cp310-abi3-macosx_11_0_arm64.whl (9.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

offprint-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl (10.2 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file offprint-0.0.1.tar.gz.

File metadata

  • Download URL: offprint-0.0.1.tar.gz
  • Upload date:
  • Size: 654.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for offprint-0.0.1.tar.gz
Algorithm Hash digest
SHA256 13f64bc5f468b671697c5625921786a888c27116b245133f04718de65a4b1d0f
MD5 37c7310e59938fb7c42e18358b5771fa
BLAKE2b-256 2b08339b3614076ccd07c5d15ae6484c36116a129aad1d8b348216e3cd8c04c3

See more details on using hashes here.

File details

Details for the file offprint-0.0.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: offprint-0.0.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 9.9 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for offprint-0.0.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5c488d62e1e391565f519e48e5e03583edae9c30904399f8c1ac3db4e8791d45
MD5 6258c7702ff3d7aed9d99ffe0cc2d67d
BLAKE2b-256 555087995cd4b2f47609d0693e1c200fa859cb671a4110b284eef34ac1ab5ae4

See more details on using hashes here.

File details

Details for the file offprint-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: offprint-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 28.5 MB
  • Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for offprint-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c47b2529e4440ab5766653d4154f83299059d4b31cabfd997f447240cf613c3e
MD5 45e796b1a514f5e3ab20ae8fbae5bc2e
BLAKE2b-256 94b1398beb3cbcdf71ff0fa215f32991923d9fed857c0e352226608eecc0f0c4

See more details on using hashes here.

File details

Details for the file offprint-0.0.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: offprint-0.0.1-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 9.8 MB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for offprint-0.0.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 20fba0acca82e8e0b6a674e381483ef6724b5c73a2fb9813853958c5aec588a3
MD5 9395e727f326a294e02700ed1a59a589
BLAKE2b-256 2d7a9a0e53963b398509d4898362b1028cc90db28b9f23814fe1c99920cb39db

See more details on using hashes here.

File details

Details for the file offprint-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: offprint-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 10.2 MB
  • Tags: CPython 3.10+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for offprint-0.0.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d1c648bbed0b1f5d57cabf98ea78f26ac90829979511b089e97944bdfb83cbb9
MD5 b6e0e85aec365fae6644db9e6438c67c
BLAKE2b-256 c543269dfc569c4aee2bef0c4177d1e55217548a90765bdfd8babcd89800b7d5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.3

5 files

This release

0.0.1 This release

5 files

0.0.0

2 files

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