WSGI routing library weasyprint plugin
Project description
weasyprint plugin for wsgirouter3
Usage
Configure application to use plugin
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for wsgirouter3_weasyprint-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9caeacf27a38ef872fbe7c2ee35a0bcc0375f0151211877417b3cc5424a598a4 |
|
MD5 | ed007975005f5823d04c8e4c596ee57a |
|
BLAKE2b-256 | 38388a9ab50e95df360114f86359507c912d636ae1e8fffebc076990880c05d7 |
Close
Hashes for wsgirouter3_weasyprint-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afbe1a0331bd60c39563eb084d12974b9d34921a58d64a06993cc6f3da44774d |
|
MD5 | ecad3316e841ce40bd09d33ef02baa89 |
|
BLAKE2b-256 | c9dc0c3096ddb837380cdab2fd57ed0617934c9eb62016dbf43f07ae961c2045 |