Django RESTful API - django-piston vs. django-tastypie

后端 未结 4 1175
梦毁少年i
梦毁少年i 2021-01-30 04:45

We\'re looking for a general RESTful API solution for our Django project. We would use the API at first for Ajax calls on the web site and later for mobile apps, external apps a

4条回答
  •  孤城傲影
    2021-01-30 05:01

    Having implemented API's with django Piston, tastypie and django webmachine Django tastypie rocks! Having said that, I think that while tastypie is really good when your API is modelled close to your models, it's a little bit more complicated to do things once you want to move out of the box. There are workarounds to some issues, with others you have to do more bending than building. It will, probably, still cover 90% of django use cases.

    Afaik Webmachine was modelled after the popular erlang webmachine, but hasn't been very active lately. So that leaves piston, which is picking up some activity, and tastypie, that has a lot of momentum and activity. Piston is a bit more flexible, but tastypie is moving very fast and in my opinion has a really easy API.

    My recommendation would be to quicky implement a prototype of the API in tastypie, and see if it covers what you want to do.

提交回复
热议问题