12
django-tastypie for RESTful API [email protected] Tuesday, July 1, 14

django-tastypie for RESTful

Embed Size (px)

DESCRIPTION

Presenting a talk in Indonesia Python Community (www.python.or.id).

Citation preview

Page 1: django-tastypie for RESTful

django-tastypiefor RESTful API

[email protected]

Tuesday, July 1, 14

Page 2: django-tastypie for RESTful

What we’re talking about

Web Services and REST

Tastypie is so tasty!

django-tastypie in action

Tuesday, July 1, 14

Page 3: django-tastypie for RESTful

@winnuayi

founder. software engineer.

based in bandung

5+ years loving python!

Tuesday, July 1, 14

Page 4: django-tastypie for RESTful

Web Services

Tuesday, July 1, 14

Page 5: django-tastypie for RESTful

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

Page 6: django-tastypie for RESTful

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

Page 7: django-tastypie for RESTful

django-tastypie

Supports Django ORM and non-ORM

http://tastypieapi.org

A REST framework for Django.

Tuesday, July 1, 14

Page 8: django-tastypie for RESTful

Advanced FeaturesSerialization

Authentication

Authorization

Caching

Throttling

Validation

GeoDjango

Tuesday, July 1, 14

Page 9: django-tastypie for RESTful

Installation

$ pip install django-tastypie

# settings.py

INSTALLED_APPS = (

...

‘tastypie’,

)

Tuesday, July 1, 14

Page 10: django-tastypie for RESTful

django-tastypiein action

Tuesday, July 1, 14

Page 11: django-tastypie for RESTful

another prototypeusing django-tastypie

(half-baked!)

Tuesday, July 1, 14

Page 12: django-tastypie for RESTful

Thanks! :)

Q & A

Tuesday, July 1, 14