{"repo":"pennlabs/django-rest-live","free":true,"listed":false,"github":"https://github.com/pennlabs/django-rest-live","clone":"git clone https://github.com/pennlabs/django-rest-live.git","description":"Subscribe to updates from Django REST Framework over Websockets.","language":"Python","stars":59,"topics":["django","django-rest-framework","django-channels","realtime","websockets"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Django REST Live Django REST Live enables clients which use an API built with Django REST Framework to receive a stream of updates for querysets and model instances over a websocket connection managed by Django Channels. There had been plans for real-time websocket support in REST Framework on a few occasions (2016, 2018), but at the time, async support in Django was in the early planning stages and Channels was being rewritten with breaking API changes. This plugin aims to bridge that gap between Channels and REST Framework while being as generic and boilerplate-free as possible. Clients are be able to subscribe to real-time updates for any queryset that's exposed through a Generic API View or any of its subclasses, including Model ViewSet, with just one mixin! Check out the full tutorial and reference documentation for specifics. Dependencies - Django (3.1 and up) - Django Channels (2.x and 3.x both supported) - Django REST Framework (3.11 and up) - channels redis for channel layer support in production. Channel layers is what allows a Django signal to broadcast an update to all websocket clients. Installation and Setup Make sure to install and properly set up Django Channels before installing django-rest-live . Add rest live to your INSTALLED APPS : Create a RealtimeRouter in your ASGI routing file (generally asgi.py ) and add the router's consumer to the websocket routing you set up with Django Channels. Feel free to choose any URL endpoint for the websocket, here we've c","default_branch":null,"files":null,"tree":[],"storefront":"/r/pennlabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pennlabs/django-rest-live/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}