bobtail-jinja2
Bobtail middleware for Jinja2 templating
Install
pip install bobtail-jinja2
Usage
from bobtail_jinja2 import BobtailJinja2, Response
app = Bobtail(routes=routes)
app.use(BobtailJinja2(template_dir="templates"))
Render the template in a Bobtail handler. BobtailJinja2 provides a Bobtail handler
Response type that also include the Jinja2 template attribute for IntelliSense etc.
from bobtail import AbstractRoute, Request
from bobtail_jinja2 import BobtailJinja2, Response
class HomeRoute(AbstractRoute):
def get(self, req: Request, res: Response) -> None:
res.set_headers({
"Content-Type": "text/plain",
})
res.jinja2.render(res, "routes/home.jinja2", data={"title": "Welcome to Lanka Note"})
Metadata
Release files for bobtail-jinja2 0.0.2
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 |
|---|---|---|---|---|
| bobtail_jinja2-0.0.2.tar.gz | 3.0 kB | Without provenance | Details for bobtail_jinja2-0.0.2.tar.gz |
Release files / bobtail_jinja2-0.0.2.tar.gz
| Download URL | bobtail_jinja2-0.0.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa1726016be5051e779c74a5e24f562be4504679583f4b526e31de3b87750516
|
|
BLAKE2b-256 checksum How to use checksums |
e9ef566b6a73720b0f0ebdc709aa0ea88696766600e1c1c5dc1ec441741fc141
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Security for bobtail-jinja2 0.0.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.