Official package · Frameworks
Live Django pages without Django Channels
Your WSGI Django app renders HTML fragments as it already does and broadcasts them: every open page appends, replaces or removes them as they happen. No Django Channels, ASGI server or Redis to run.
- One @broadcasts decorator makes a list live on every page, whether the row was saved by a view, the admin, a Celery task or the shell.
- Broadcasts wait for the transaction to commit, and work with htmx and Turbo 8.
- Signs your own private and presence channels, verifies webhooks and serves push notification tokens. Django 4.2 to 6.1 on Python 3.10 and later.
Sign in to see these snippets with your own cluster host. Sign in
Install
pip install django-hibira # INSTALLED_APPS += ["django_hibira"] # urlpatterns += [path("hibira/", include("django_hibira.urls"))] HIBIRA_APP_ID=YOUR_APP_ID HIBIRA_APP_KEY=YOUR_APP_KEY HIBIRA_APP_SECRET=YOUR_APP_SECRET HIBIRA_HOST=ws.hibira.io python manage.py hibira_checkSet it up
# chat/models.py from django.db import models from django_hibira import broadcasts class Message(models.Model): room = models.ForeignKey(Room, on_delete=models.CASCADE, related_name="messages") body = models.TextField()Use it
{# base.html, in <head> #} {% load hibira %} {% hibira_scripts %} {# chat/room.html #} {% hibira_stream room %} <ul id="messages"> {% for message in room.messages.all %}{% include "chat/_message.html" %}{% endfor %} </ul>
Before you start
- The app secret is shown only once, when you create the app or rotate its secret. Keep it on your server, never in a browser or game build.
- On the Free plan, list every origin your pages load from in the app’s allowed origins (http://localhost:8000 while developing, then your domain). "*" needs a paid plan.
Use the app key from your dashboard; the secret stays on your server. Channels, events and authorization endpoints work exactly as they do with Pusher. Create your free account →