4. How does plivo work?
• Plivo gets a call.
• Plivo needs to know what to do ?
• Plivo uses a callback like http://
customercallback.com/
Saturday, July 6, 13
12. So far so good
• Added a django based UI for our existing
customers to add and manipulate their user
related data.
• There was no current need for an api for
manipulation of these data or so we
thought.
Saturday, July 6, 13
13. New Customer Alert!!
• We had a new customer who urgently
needed a bunch of api’s ready in a week to
migrate a large number of minutes to our
platform.
• We didn’t have any API’s
• We had one week. It wasn’t a friendly mail.
It was an ultimatum
Saturday, July 6, 13
14. Tasty Pie to the rescue
• Tasty pie from toast driven is an excellent
framework to create an API from your
django models.We also did evaluate piston.
But there were basic issues there.
Saturday, July 6, 13
15. Piston is lacking
• /Account/id/Subaccount/
• /Account/subaccountid/
• The above two are apis on the same model
• Piston doesn’t let you do this.
Saturday, July 6, 13
18. Tasty Pie Best Practices
• Derive ModelResource to create a
Resource type that’s specific to your use
case. Eg: Error returning.
• Dehydrate: Use the Resource’s dehydrate
function to add data that isn’t available in
the models. Eg: cost as a sum of 2 fields
• Filters:The build_filters function allows you
specify filters based on fields of models. Be
careful using them.
Saturday, July 6, 13