Skip to main content

Weasyprint plugin for wsgirouter3

Usage

Configure application to use plugin

def _generator(html_id: str, context: Any) -> str:
    # your choice of template engine


application = wsgirouter3.WsgiApp(router)
wsgirouter3_weasyprint.install(
    application,
    wsgirouter3_weasyprint.PdfConfig(html_generator=_generator)
)

Return instance of Pdf from endpoint

@router.get('/get', produces='application/pdf')
def get() -> Pdf:
    html_generation_ctx = {'context': 'variable'}
    return Pdf('html_template_id', html_generation_ctx)

Installation

$ pip install wsgirouter3_weasyprint

Metadata

Release files for wsgirouter3-weasyprint 0.1.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 wsgirouter3-weasyprint 0.1.2
File Size Uploaded Provenance Actions
wsgirouter3_weasyprint-0.1.2.tar.gz 3.2 kB Without provenance Details for wsgirouter3_weasyprint-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wsgirouter3-weasyprint 0.1.2
File Interpreter ABI Platform Actions
wsgirouter3_weasyprint-0.1.2-py3-none-any.whl Python 3 none any Details for wsgirouter3_weasyprint-0.1.2-py3-none-any.whl

Total release size: 6.7 kB

Release files / wsgirouter3_weasyprint-0.1.2.tar.gz

Download URL wsgirouter3_weasyprint-0.1.2.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
871963ee676816417d97651e9bba6d1e81c4bb3220bdadb585b19d14104f925d
BLAKE2b-256 checksum
How to use checksums
4219cfcde0d2de2c167425eb2226eb0f89d027affb29bfec9a2121e319e41b6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Release files / wsgirouter3_weasyprint-0.1.2-py3-none-any.whl

Download URL wsgirouter3_weasyprint-0.1.2-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ffbc8481185023eec8819109fc93c512858917882b39afae738be596618b1ad
BLAKE2b-256 checksum
How to use checksums
61bd7c1925582d0434de8142cf27eb3abf3a3bbdf1f3429f1d7b05ca89e890c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Security for wsgirouter3-weasyprint 0.1.2

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.

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