Django for IoT: From hackathon to production

Anna Schneider

Monday 11:30 a.m.–noon
Audience level: Intermediate or Advanced


Want to control your wifi-connected, API-enabled stuff? Good news—Django can be just as good at Internet of Things as it is at blogs and polls. This talk will kickstart your IoT fun by showing a case study of a quick-and-dirty app, and a cleaner version using Celery.


It’s Friday night of hackathon weekend. The latest snazzy Internet-connected thingy is sitting on the table next to your beverage of choice, the device’s API docs are open in a browser tab, and your fingers are itching to write some Django. What’s the fastest way to get started? And next month when you come back to it, what will you want to upgrade?

This talk will walk through a common IoT use case, sending HTTP requests to turn on and off a device in response to some external data. I do this all the time at WattTime and I'll share some of the tricks I've picked up over the last couple years.

We’ll focus on two big differences from your typical blog or polls app: the data model abstractions that fit the problem, and the need to run frequent periodic tasks to hit the device’s API. I'll share a data model that's worked well for me across a bunch of IoT apps. And I'll show you two ways to run those periodic background tasks in Django: a hackathon-friendly version, and a production-friendly version using Celery. You'll walk away with a complete demo template that you can use in your own projects!

Buy your conference and tutorial tickets here! Tutorials are $150 per session.