● easy to learn, simple to use ● clean syntax ● huge range of libraries ● rapid prototyping ● vast documentation ● friendly community ● named after Monty Python Why Python?
What can a pony do for you? Some sweeties for mobile developers ● data backends exposing REST api ● backoffice systems and CRUDs ● servers talking to cloud messaging services
The pony into the wild Build a REST web service in minutes ● design the business model ● provide a REST api ● authenticate users with the OAuth2 framework
The API URL style HTTP Method Action URL Name / GET show API infos api-root /tasks/[.format] GET list tasks tasks-list POST create a new task /tasks/{id}/[.format] GET retrieve task tasks-detail PUT update task PATCH partially update task DELETE destroy task Data serialized in dozen of formats out of the box: JSON, JSONP, XML, Yaml and others, plus you can write your very own. Bonus: api browser
Django OAuth Toolkit (third party application providing oauth goodies) Let’s do OAuth2 (seriously, that’s all folks!) Now the system acts as an OAuth2 provider and the api endpoints grant access to clients providing valid tokens
Well, not quite. There are a lot of pros running Django on App Engine ● one-click deploy, app versioning ● scale as you want ● Google infrastructure But some of the cons could be blocking ● Google Cloud SQL is the only backend supported by the Django ORM ● Google Cloud SQL has no free tiers (at the moment) ● Google Cloud SQL is MySql
Thanks for your attention! Questions? (in the meantime, take a look at the code) https://github.com/masci/toodo http://django-rest-framework.org https://github.com/evonove/django-oauth-toolkit Massimiliano Pippi @maxpippi http://github.com/masci http://dev.pippi.im