This release is a pre-release and may not be stable for production use.
weblitz
HTML, URLs, RDLC reports and Markdown to PDF, Word, Excel and PowerPoint, as Chrome prints them, with no browser.
import weblitz
weblitz.render_html("<h1>Hello</h1>", format="A4", margin={"top": "2cm"}).save("hello.pdf")
weblitz.render_url("https://example.com", print_background=True, path="example.pdf")
weblitz.render_html(page, output="xlsx").save("page.xlsx")
weblitz.render_url("https://example.com", output="png", viewport={"width": 1280, "device_scale_factor": 2}, path="example.png")
The options of render_html and render_url are Playwright's page.pdf() options by their Python names. Every call
answers a Result (file, content_type, extension, pages, notes, trial) or raises WeblitzError, whose
code says why.
output="png" (or "jpeg", "webp", "tiff") draws the page instead of printing it, with Playwright's screenshot
names: by default the whole page as a screen shows it, in one image, laid out in an 800 by 600 window in screen media;
capture="viewport" (or full_page=False) the window alone; capture="pages" each printed page as the PDF prints it
(paper, margins, page_ranges), answered as a ZIP of page-1.png, page-2.png... (a TIFF holds every page in one
file). viewport={"width": ..., "height": ..., "device_scale_factor": 2} sets the window and the image's pixels per
CSS pixel, quality a JPEG's or WebP's (0 to 100).
Calls go to a pool of worker processes kept warm, started on first use. weblitz.configure(...) sets its options
(workers, concurrency, license, timeout in milliseconds...); weblitz.Engine is a pool of your own and
weblitz.AsyncEngine the same for asyncio (cancelling the awaiting task cancels the render).
The wheel's worker is not compiled ahead of time, which keeps the wheel within PyPI's size limit: a new worker's first
render takes longer than with the npm package, and the renders after it are as fast. Render from one long-running
process rather than a process per document, and call weblitz.info() at start-up when the first request should not
wait for a worker to start.
Without a licence key (license= or the environment's SSRS2_LICENSE) PDF and image pages carry a trial watermark.
Wheels exist for Linux with glibc (x64, arm64) and macOS on Apple silicon; Alpine and other musl systems are not supported yet.
Metadata
Release files for weblitz 2.0.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weblitz-2.0.0rc2.tar.gz | 23.2 kB | Without provenance | Details for weblitz-2.0.0rc2.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| weblitz-2.0.0rc2-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details for weblitz-2.0.0rc2-py3-none-win_arm64.whl |
| weblitz-2.0.0rc2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for weblitz-2.0.0rc2-py3-none-win_amd64.whl |
| weblitz-2.0.0rc2-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details for weblitz-2.0.0rc2-py3-none-manylinux_2_27_x86_64.whl |
| weblitz-2.0.0rc2-py3-none-manylinux_2_27_aarch64.whl | Python 3 | none | Linux glibc 2.27+ ARM64 | Details for weblitz-2.0.0rc2-py3-none-manylinux_2_27_aarch64.whl |
| weblitz-2.0.0rc2-py3-none-macosx_13_0_x86_64.whl | Python 3 | none | macOS 13.0+ x86-64 | Details for weblitz-2.0.0rc2-py3-none-macosx_13_0_x86_64.whl |
| weblitz-2.0.0rc2-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details for weblitz-2.0.0rc2-py3-none-macosx_13_0_arm64.whl |
Total release size: 530.5 MB
Release files / weblitz-2.0.0rc2.tar.gz
| Download URL | weblitz-2.0.0rc2.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0c0e19f8c1a2220d4ca7e73161b0564d3fb93a8d43c9813354a29d5929f36dc
|
|
BLAKE2b-256 checksum How to use checksums |
14a2760757e69754308c35d853c81eb546a5543b0b9d73326516602fcf4123e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-win_arm64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-win_arm64.whl |
|---|---|
| Size | 84.3 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
5f7dcf45f861a004fadfed0bf439b5b08f3a8658ee42e6f6a53080c36aa9f5c6
|
|
BLAKE2b-256 checksum How to use checksums |
c0e8bcad1ff52b3c1090134fae123424e7d4b9bdd4c217aa93d65ef9e681cf7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-win_amd64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-win_amd64.whl |
|---|---|
| Size | 87.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
13a5ea6b84ee5465147b07de1f21d4228d8712c368818857bb9d76dd663ced59
|
|
BLAKE2b-256 checksum How to use checksums |
dbf103d3e3a54b5eceb044f503e27533e8836d2e0dd83161b5776a2b2018babf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-manylinux_2_27_x86_64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 89.7 MB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c64d9418088e8ae16af48ec1b4a9f9322a9ee515e44346b9216848bf194985e8
|
|
BLAKE2b-256 checksum How to use checksums |
4c8f1fe1a11d2addc0f4ea1b6bdf8179eb04d2b37ffcf777d0defface5e27ae3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-manylinux_2_27_aarch64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-manylinux_2_27_aarch64.whl |
|---|---|
| Size | 86.5 MB |
| Tags | Linux glibc 2.27+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
bab0c2d0cf07c9577fd3998a938ccf0186bb63f61b8db41b3fa61e5118711c3f
|
|
BLAKE2b-256 checksum How to use checksums |
41d351ce3e9fd65fb5de517fd8f3667a00a1709a469be5930d28ee7c43cc81b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-macosx_13_0_x86_64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-macosx_13_0_x86_64.whl |
|---|---|
| Size | 93.2 MB |
| Tags | Python 3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
4fca7d9c01bbcf965c55a550661e6d9dc7e474f33224a7eeb110c1759a7bb961
|
|
BLAKE2b-256 checksum How to use checksums |
c32d9e8e8060d8f76d66d3ae9ae203e66a0461d4628e1b4375ced2afa6fc565c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / weblitz-2.0.0rc2-py3-none-macosx_13_0_arm64.whl
| Download URL | weblitz-2.0.0rc2-py3-none-macosx_13_0_arm64.whl |
|---|---|
| Size | 89.3 MB |
| Tags | Python 3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
65058065f9dd15fa733fb2da84d9fd7923937c3aa5cd969919da247bc754fad4
|
|
BLAKE2b-256 checksum How to use checksums |
8ca96047901f72fb72384df2292ffd798515994693431e2600ee13736af703af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for weblitz 2.0.0rc2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.