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
File details
Details for the file wsgirouter3_weasyprint-0.1.0.tar.gz
.
File metadata
- Download URL: wsgirouter3_weasyprint-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9caeacf27a38ef872fbe7c2ee35a0bcc0375f0151211877417b3cc5424a598a4 |
|
MD5 | ed007975005f5823d04c8e4c596ee57a |
|
BLAKE2b-256 | 38388a9ab50e95df360114f86359507c912d636ae1e8fffebc076990880c05d7 |
File details
Details for the file wsgirouter3_weasyprint-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: wsgirouter3_weasyprint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afbe1a0331bd60c39563eb084d12974b9d34921a58d64a06993cc6f3da44774d |
|
MD5 | ecad3316e841ce40bd09d33ef02baa89 |
|
BLAKE2b-256 | c9dc0c3096ddb837380cdab2fd57ed0617934c9eb62016dbf43f07ae961c2045 |