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.2.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.2.0
File Size Uploaded Provenance Actions
hedron_django-1.2.0.tar.gz 26.7 kB Without provenance Details for hedron_django-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 54.4 kB

Release files / hedron_django-1.2.0.tar.gz

Download URL hedron_django-1.2.0.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d2e6b4649d4b980418145085e1095ce337564af366e2be6ba46d83869fa5cb3a
BLAKE2b-256 checksum
How to use checksums
215a5fc18ce01e8021c73d9895146b72514eda4553d17689d689db709281de8d
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.2.0-py3-none-any.whl

Download URL hedron_django-1.2.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5939e4789c14126155937103e6c83fee5b961581cbf28bd923697c4ae5f62d4
BLAKE2b-256 checksum
How to use checksums
1b2e94c3ee9f7a80fb9859bf1cd7a8821740b5eb000f3357415c481e2af61721
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.2.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.2.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