Framework for Implementing REST web service in Django Framework for Implementing REST web service in Django python python

Framework for Implementing REST web service in Django


NOTE: Since this post was written, django-piston is no longer actively maintained. As others have mentioned, look into tastypie or django-rest-framework.

Indeed, you can roll your own, but there's a lot of boilerplate involved.

django-piston is an exceptionally easy to use, and extensible, micro-framework. In addition to mocking up all the necessary views and url patterns, it supports directly mapping models to a REST interface, which is nice if you have a simple use case. I'd suggest looking into it.


And since this question still rated pretty highly in my searches on Google, I'll add this alternative to the mix: http://django-rest-framework.org/

My initial impression is that it does a very good job of embodying the RESTful API design principles described here: http://readthedocs.org/docs/restful-api-design/en/latest/


Using django-rest-interface

Still true.

It's quite trivial to roll your own. Each REST URI maps to a view function. Each REST method (GET, POST, PUT, DELETE) is a simple condition in the view function.

Done.