Skip to main content

hedron-django

PyPI Python CI License: MIT

Django adapter for Hedron component rendering and HTMX interactions.

Render components as HttpResponse, map portable InteractionResult values, reverse URLs via Django’s resolver, and integrate CSRF/session through native middleware. Shares the hedron-core renderer with FastAPI and Flask. Does not install FastAPI.

Also ships a first-party bounded QuerySet DataSource and Django forms bridge — supply an already-authorized base QuerySet; omitted sort/filter allowlists deny client refinements.

Package maturity: Beta · Package line: 1.0.x · pin >=1.0.0,<2.0

Adapter capability readiness is Supported when pinned — see What’s ready.

Install

pip install "hedron-django>=1.0.0,<2.0"
# or
uv add "hedron-django>=1.0.0,<2.0"

Requires Python 3.11–3.14, hedron-core, and Django >=5.2,<6.

Install the AppConfig for system checks:

INSTALLED_APPS = [
    # ...
    "hedron_django.apps.HedronDjangoConfig",
]

Scaffold a new Django project:

uvx --from "hedron>=1.0.0" hedron new --django my-django-app

Quick start

from django.http import HttpRequest
from hedron_core import Heading, Page, Text
from hedron_django import HedronDjango, hedron_view

hedron = HedronDjango()


@hedron_view
def home(request: HttpRequest):
    return hedron.respond(
        Page(
            Heading("Hello Django", level=1),
            Text("Native Django URLconf with Hedron components."),
            title="Home",
        ),
        request,
    )

Wire the view into your URLconf as usual. For HTMX fragments, declare fragment_regions on @hedron_view and return an InteractionResult.

What this package includes

  • HedronDjango / respond rendering facade
  • @hedron_view decorator with fragment-region policy
  • HedronDjangoConfig system checks
  • HedronSecurityHeadersMiddleware for portable SecurityPolicy headers
  • Forms bridge and bounded QuerySet DataSource
  • Job status polling helpers

License

MIT. See the repository license.

Metadata

Release files for hedron-django 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-django 1.3.0
File Size Uploaded Provenance Actions
hedron_django-1.3.0.tar.gz 26.7 kB Without provenance Details for hedron_django-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 54.4 kB

Release files / hedron_django-1.3.0.tar.gz

Download URL hedron_django-1.3.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0b4246895b9f07d3a97679f11821062b1bc3628eaea9b3b9b3d402b4cfae49c2
BLAKE2b-256 checksum
How to use checksums
c1e09845bb645c7b66054c274ec696e2a5a02cc9f17b63c0b113b60bd5109211
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_django-1.3.0-py3-none-any.whl

Download URL hedron_django-1.3.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e58a0da99d46ef6766fe6542cadf8897d6aa01011f13e4787258d59dd5bd893
BLAKE2b-256 checksum
How to use checksums
6bbc48f5c6882d59605e3644b795384ad55dbc289ad91b854bcb0d27a7e4f27b
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-django 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