hedron-jinja
Explicit standards-first .hdj templates over Jinja, HTML, and HTMX for Hedron.
HDJ lets advanced applications write ordinary HTML, CSS, JavaScript, Web
Components, Jinja, and HTMX directly while preserving Hedron components and
render metadata. Install as hedron-jinja or via the flagship extra hedron[jinja].
Package maturity: Beta · Package line: 1.0.x · pin >=1.0.0,<2.0
Install
pip install "hedron-jinja>=1.0.0,<2.0"
# or
uv add "hedron-jinja>=1.0.0,<2.0"
# via flagship:
pip install "hedron[jinja]>=1.0.0"
Requires Python 3.10–3.14, hedron-core, and Jinja2.
Quick start
from jinja2 import Environment, FileSystemLoader
from hedron_jinja import HedronJinja, TemplateSpec
templates = HedronJinja(Environment(loader=FileSystemLoader("templates")))
result = templates.render(
TemplateSpec("dashboard.hdj"),
{"heading": "Operations"},
)
print(result.html)
For registered interaction handles and registry facts, use a frozen app binding:
from hedron_jinja import HedronJinja, JinjaBinding
binding = JinjaBinding.from_registry(
app_id=app.hedron_app_id,
handles={orders.logical_id: orders},
asset_hrefs={"application:css": "/static/application.css"},
)
templates = HedronJinja(environment, binding=binding)
This adds app-scoped h_view, h_command_form, catalog, TypeSchema, feature-bundle, provider,
theme, application-style, and portable HTMX request facts without exposing registry source paths or
raw framework requests.
Example templates/dashboard.hdj:
---hdj
version = 1
kind = "fragment"
profile = "standard"
regions = ["main"]
---
<main id="main" hx-history-elt>{{ view.heading }}</main>
Trust model
Templates are trusted application code, not a sandbox for hostile authors.
Strict mode checks a finite dynamic sink matrix with purpose-specific URL
filters. Deployment capability declarations and application policy remain
separate and authoritative. Format v1 accepts static .hdj dependencies only;
every source must render through HedronJinja.
Links
- Package docs
- HDJ authoring guide
- Jinja / HDJ API
- Changelog
- Source
- Issues
- HDJ progressive examples
hedron-core·hedron
License
MIT. See the repository license.
Release files for hedron-jinja 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hedron_jinja-1.0.3.tar.gz | 49.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hedron_jinja-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 102.0 kB
Release files / hedron_jinja-1.0.3.tar.gz
| Download URL | hedron_jinja-1.0.3.tar.gz |
|---|---|
| Size | 49.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c766ae2b77ec8d4f4511d7f6aad70d2e42e8e4ceff8142be2b27fd4bd200ef7
|
|
BLAKE2b-256 checksum How to use checksums |
6d24b257467588c6de2caf8397a65f8f8aa81961ceaf13fd5dc92e27f89a805d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hedron_jinja-1.0.3-py3-none-any.whl
| Download URL | hedron_jinja-1.0.3-py3-none-any.whl |
|---|---|
| Size | 52.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fbb61d272d55c6bcf4ead1b37dcfe56ec289b01288779e3f1c41d393bc948a7
|
|
BLAKE2b-256 checksum How to use checksums |
d59dcc895cf23ed6c6eb21d0144c3be3b8e6ea96c4d829e7297f66397252941e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|