django-tastypiefor RESTful API
Tuesday, July 1, 14
What we’re talking about
Web Services and REST
Tastypie is so tasty!
django-tastypie in action
Tuesday, July 1, 14
@winnuayi
founder. software engineer.
based in bandung
5+ years loving python!
Tuesday, July 1, 14
Web Services
Tuesday, July 1, 14
REpresentational State Transfer
Software architecture style. Not protocol.
HTTP Methods to access resources.
Serialization: XML, JSON, YAML, and so on.
Learning curve is easier than... hmm... SOAP
GET. POST. PUT. DELETE
Tuesday, July 1, 14
API Example
GET /statuses/home_timelinePOST /statuses/retweet/[tweet_id]
GET /users/[user_id]/checkinsPOST /venues/add
# Twitter API
# Foursquare API
Tuesday, July 1, 14
django-tastypie
Supports Django ORM and non-ORM
http://tastypieapi.org
A REST framework for Django.
Tuesday, July 1, 14
Advanced FeaturesSerialization
Authentication
Authorization
Caching
Throttling
Validation
GeoDjango
Tuesday, July 1, 14
Installation
$ pip install django-tastypie
# settings.py
INSTALLED_APPS = (
...
‘tastypie’,
)
Tuesday, July 1, 14
django-tastypiein action
Tuesday, July 1, 14
another prototypeusing django-tastypie
(half-baked!)
Tuesday, July 1, 14
Thanks! :)
Q & A
Tuesday, July 1, 14