Michal Čihař - Adding API to Django application

Adding API to Django application

One of Django applications I maintain is our internal tool used at SUSE used for managing incoming L3 requests. Recently request to add some API arose (read only for now). Looking at available solutions, I came to conclusion that django-piston should be the best choice for me.

Adding simple model based API with it is indeed quite simple, all basic information you need is written in getting started part of their documentation.

On the other side, things can never go without problems, so I was hit by well known bug. Fortunately fix exists, though it is not yet merged upstream. While digging so deep into problem anyway, I've submitted a request to include this patch in devel:languages:python OBS repo.

Comments

Ewoud Kohl van Wijngaarden wrote on Jan. 6, 2012, 11:31 a.m.

At an internal project at my employer we started with django-piston, but in my experience that gets annoying very fast. I highly prefer django-rest-framework (http://django-rest-framework.org/). It has a more active upstream and the generated HTML view proves to be very useful while developing.

wrote on Jan. 6, 2012, 11:58 a.m.

Thanks for the tip, I'll look at it soon (it's still early enough to completely change implementation without much effort).

Ivo Majić wrote on Jan. 6, 2012, 1:20 p.m.

Also something you should look into is django-tastypie...it's more actively developed than Pistons...

wrote on Jan. 6, 2012, 2:09 p.m.

That one also looks interesting ... why there are so many? :-)

New Comment

You can not add new comments to old blog posts.