Demo project for a django SSE feature implementation from
github.com/NiyazNz/django.git@serverSentEvent
which extends ASGIHandler
to handle async data streaming and adds
ServerSentEventsResponse
.
See views.py for ServerSentEventsResponse
usage examples.
Install requirements
pip install -r requirements.txt
Start server:
uvicorn sse_demo.asgi:application
Open browser on http://localhost:8000. Open dev tools console/network tab to see messages.
Open http://localhost:8000/message/ in a new tab to send messages.