Skip to main content

hedron-jinja

PyPI Python CI License: MIT

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.11–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.

License

MIT. See the repository license.

Metadata

Release files for hedron-jinja 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hedron-jinja 1.3.0
File Size Uploaded Provenance Actions
hedron_jinja-1.3.0.tar.gz 50.5 kB Without provenance Details for hedron_jinja-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hedron-jinja 1.3.0
File Interpreter ABI Platform Actions
hedron_jinja-1.3.0-py3-none-any.whl Python 3 none any Details for hedron_jinja-1.3.0-py3-none-any.whl

Total release size: 103.1 kB

Release files / hedron_jinja-1.3.0.tar.gz

Download URL hedron_jinja-1.3.0.tar.gz
Size 50.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1ab431d85f22d4a3df85d8c947d14602edd85c624cf40c41cab23deae014eefa
BLAKE2b-256 checksum
How to use checksums
cc5948df1dc5a7a1d1d762856bb87d7406d8990288d26c4208db256758a28423
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.3.0-py3-none-any.whl

Download URL hedron_jinja-1.3.0-py3-none-any.whl
Size 52.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48a264b84852bc1913420c968aed5730b28d03476e140b08e5bfad1067bf96bb
BLAKE2b-256 checksum
How to use checksums
e8f9d841928d9c2a2f7f006e8fd019b0e7f3634ace02573576fd14ec4d1d6285
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}

Security for hedron-jinja 1.3.0

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.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files No provenance

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