top of page

Sam Bolgert


Author of channels-api library. Former Lead engineer at a number of startups.

REST Websockets API with Django Channels

All things Web, Intermediate


Building REST APIs over HTTP has been discussed time and again. But could we do the same with WebSockets? What is the performance benefit? What learnings can we carry over from HTTP to WS? This talk will describe how engineers can build a REST API over WebSockets using Django and Channels. It is largely based on my experiences trying to build a REST WebSocket API.


Websockets have been around for a number of years but popular web frameworks have been slow to integrate because of their asynchronous nature. With Django Channels we’ve finally broken that frontier in a synchronous way. How will developers use this new territory? I will outline some of my explorations that I have serialized into a library I call channels-api. It takes familiar patterns from Django Rest Framework and applies them to websocket land. I will walk through a sample project to demonstrate the configuration and installation of the library. I will demonstrate using these patterns we can create a “REST like” API relatively quickly. We can also implement new features that HTTP doesn’t support like server side push.

  • Meetup_square
  • Black Facebook Icon
  • Black Twitter Icon
bottom of page