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.6:

python -m pip install offprint==0.0.6
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.

Metadata

Release files for offprint 0.0.6

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

Source distribution (sdist)

Source distribution for offprint 0.0.6
File Size Uploaded
offprint-0.0.6.tar.gz 523.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for offprint 0.0.6
File
offprint-0.0.6-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
offprint-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
offprint-0.0.6-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
offprint-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 59.0 MB

Release files / offprint-0.0.6.tar.gz

Download URL offprint-0.0.6.tar.gz
Size 523.3 kB
Tags Source
SHA-256 checksum
How to use checksums
51d6b2198f302a112c523aa852b1029b875256645a0ee7627fc2db7b35f26dbc
BLAKE2b-256 checksum
How to use checksums
4e0fc45888d9b550e8b52da755447c5609e63acd840cfe81a834b6e856af63a9
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / offprint-0.0.6-cp310-abi3-win_amd64.whl

Download URL offprint-0.0.6-cp310-abi3-win_amd64.whl
Size 9.9 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f5f7a6978f15af48130103c7d4a3aad7ac9a889196ce06989e905314ae8b8820
BLAKE2b-256 checksum
How to use checksums
0973b6f520a7990d7384f9a4d0cab454285512e377d67399794f1702c1c39be5
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / offprint-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL offprint-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 28.6 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
cfc798975aad83a4209e5f424aad0192774fcc5c68d85a0cc5cc3816224a7c15
BLAKE2b-256 checksum
How to use checksums
959cf9861df9b54fa75384b39c886ffb174f5fbf7973ed5489392c76fdb675d1
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / offprint-0.0.6-cp310-abi3-macosx_11_0_arm64.whl

Download URL offprint-0.0.6-cp310-abi3-macosx_11_0_arm64.whl
Size 9.8 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
30f04810e84a717540d6832f5c3a8e79f972190c8985be1787829b7f5f68ed11
BLAKE2b-256 checksum
How to use checksums
7506e57d6e0a16c75e1279075e927e17a960fc89db412d3f54995d4903d6ad4d
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / offprint-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl

Download URL offprint-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl
Size 10.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f6dec70d779233a7986b32949a231b0c1add2eb992da65802b72c0d8bbd192e2
BLAKE2b-256 checksum
How to use checksums
d19593c6f23e4f3c6821335cc913a3e73d102cb7c72c7bd57db2a92f785846a7
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.0.6 This release

5 release files

0.0.3

5 release files

0.0.1

5 release files

0.0.0

2 release 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