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

python -m pip install offprint==0.0.3
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.3.tar.gz (548.1 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.3-cp310-abi3-win_amd64.whl (9.9 MB view details)

Uploaded CPython 3.10+Windows x86-64

offprint-0.0.3-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.3-cp310-abi3-macosx_11_0_arm64.whl (9.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

offprint-0.0.3-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.3.tar.gz.

File metadata

  • Download URL: offprint-0.0.3.tar.gz
  • Upload date:
  • Size: 548.1 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.3.tar.gz
Algorithm Hash digest
SHA256 0f0acf653d437ccba28ee1c084011ef37918d8107f1455236a90980ddcc22a90
MD5 2c6014a484a403f06925953df50011df
BLAKE2b-256 922c240e9b9a1da2f9a1dfea9f9bb2d779f55a8664d7ce3acffdddf62114bfaa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: offprint-0.0.3-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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e705879029529e1d87cd9866532e7181c7acb6023c0428da10ece6bf68be0664
MD5 60ded23ee8296ec970228faaade996c9
BLAKE2b-256 1f01439d9133945cf4a488707ca2775646bc8573491dea98d78c8878b3a05bc7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: offprint-0.0.3-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.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e25dd0f58a65773b99b93979ed76db0eb9fafa7e4df197f34c81b90f11b6b110
MD5 4f12fed28da0bc7b7a690f8afa730488
BLAKE2b-256 b3ed95ded3168aea9107f5fbd1e80df59059aedc78960602e00744ebd78e8f03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: offprint-0.0.3-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.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5720a0b869dd0b5fc5a136f1d6d708af7078fb87e03019e94ee0521c04762cbd
MD5 dc5315e525164cdd71c4dec67504ecc3
BLAKE2b-256 40fcd0aa3f81fbbba6276f390dd8ef71fd3157e14e5e59c2326e77fce091cd5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: offprint-0.0.3-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.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c529e3f7f5274d0bed98727a595bd5acb6ce3de4bfad9b7a40eaad1b0c7cc90c
MD5 872d9d720b6598042eeb3932dd9f4750
BLAKE2b-256 cdc9842a071954e776856b3b85c96e0685e8eaa0fcbdd8968f19ecf0be677e11

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

5 files

0.0.1

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