I'm currently working on a real time app for one of our projects. So I
thought why not make it an open source package until DRF has native real
time support (which is not included in the DRF 3.8 milestone due 31-03-18).
The idea is to pass an APIView (or a subclass there of) to a RealTime
instance which takes (almost) everything from the view it needs to provide
a WebSockets API endpoint. It works quite well so far but I think it's
quite a hack. Python 3.5+, Channels 2.0 and Redis are required. By the way
this was my first public Django app and advice from experienced programmers
is highly appreciated.
So what are your thoughts on this?
Some limitations in the current implementation:
- Supported are creation, updates and deletion. You can receive updates
via subscription. Listing is not implemented so far.
- Out of the box support for authentication (authenication_classes) is
quite limited because it makes quite use of the Request instance (which
I have to simulate).
- Several (Generic)APIView methods are not used. (I'd give a detailed
list which are and which are not.)
Aims for the future:
- I'd like to just use a project's API routing to additionally support
WebSockets. As a result you had equal URIs for HTTPS and WSS requests and
you had to write just a few lines of backend code to get real time running
(except you want the real time API to be different, which is also possible
I'd be happy to get some feedback.
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.