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 typed Hedron components and render metadata. Install as hedron-jinja or via the flagship extra hedron[jinja].

Package maturity: Beta · Train: 0.41.x (published v0.41.0) · pin >=0.41.0,<0.42

Install

pip install "hedron-jinja>=0.41.0,<0.42"
# or
uv add "hedron-jinja>=0.41.0,<0.42"
# via flagship:
pip install "hedron[jinja]>=0.41.0,<0.42"

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)

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

License

MIT. See the repository license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hedron_jinja-0.41.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hedron_jinja-0.41.0-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file hedron_jinja-0.41.0.tar.gz.

File metadata

  • Download URL: hedron_jinja-0.41.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for hedron_jinja-0.41.0.tar.gz
Algorithm Hash digest
SHA256 924606af8b349befdc93ff05081d3a982705a1e5c61da53892911b5ff5d0fbad
MD5 808d2db3aadcf871d385721c3bb97236
BLAKE2b-256 6ba400e79972a7086c0d6e641b7e88f414ce7dd0ed4d4b64be6689450b97bd40

See more details on using hashes here.

File details

Details for the file hedron_jinja-0.41.0-py3-none-any.whl.

File metadata

  • Download URL: hedron_jinja-0.41.0-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for hedron_jinja-0.41.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46a41dec99216a5c5515c3d3567f6c0fa6b4ca6f924fa11b8707e626c07fcc8c
MD5 de5a1add8a9a1a8bfea9b371f4bde0ee
BLAKE2b-256 67325ea35e4b90ec2f2ca9cf07eedc2d4d3f102911e70fd5a604eb4e59ad0963

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page