devil aims to be a simple to use REST framework for Django. It is influenced by piston.
Example
myresources.py:
from drest.resource import Resource
from drest.http import Response
class MyTestResource(Resource):
def get(self, request, *args, **kw):
return {'jedi': 'luke'}
urls.py:
from django.conf.urls.defaults import patterns, include, url
from drest.resource import Resource
import myresources
mytestresource = myresources.MyTestResource()
urlpatterns = patterns('',
url(r'^test', mytestresource),
)
Product's homepage
Here are some key features of "devil":
· `Resource` is the key concept, everything builds around it.
· Builtin content negotiation (parsers / formatters).
· Gets out of your way
· You can use additional features but you don't need to.
· Everything is optional and works with default values.
· Simple to get started.
· Flexible access control based on Django's users, groups and permissions.
· Ability to assign CRUD operations per resource for each user (or group)
· dRest will auto-generate necessary permissions into the DB
· You can use Django's admin interface to assign permissions to users and groups
· After this dRest automatically picks up `request.user` and performs authorization
· Intentionally doesn't give you CRUD for free as piston does
We can add this option later if it's concidered useful, but:
· This rarely works for legacy systems anyway
· For anything bigger, it's usually a good idea to decouple model and representation
· Ability to define representation using Django's forms
· Automatic validation of incoming/outgoing data
· Automatic documentation generation (_Not implemented yet_)
Requirements:
· Python
· Django