PyCon Australia 2013

El estado del arte de las librerías REST para Django

Curtis Maloney  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

so the last hope for this session is by Curtis Maloney he fell in love with poison back at version 1.5 and apparently never looked back and he's on freenode in the django channel apparently not just as a single person but rumors say a bunch of people spread

across the whole world so he's doing good there and he will tell us about the current state of the Django rest framework ecosystem give him a warm welcome please I'm going to start by apologizing for the very rough format of this so I was kind of pour

it in as a gap filler but I did have more notice in some people it seems can I have a quick show of hands of anyone here who actually does hang out on the Django channel on freenode you're all missing out you really are no lot lots of the core developers

hang out there lots of really experienced people and it's a great part of the community that just loves to help out all right first truth about restroom MOOCs we don't really have any everybody knows about tasty pie I'm sure you've heard of

Django rest framework but when it comes down to pure rest they're not but they are really useful and they do really save you a lot of time so oops this is me yep I started using Django pretty much about the time it came out it completely blew away a project

I was working on at the time which is kind of developing an integrated RM and web app construction framework and we saw Django and just went we've been wasting our time so we switched over and started using it more recently I've given back to the community

a couple of tools one is Django nap which is my own API tool so full disclosure here that's mine I'm putting it in here because I think it's worthwhile for the comparison more than anything else I've also recently released Django rated which

is a rate-limiting tool could be very handy and that's actually part of the talk as well probably the most important thing I do most of my time I've spent most of my work through common code working on the Kogan website has anyone been to the Kogan

website that's our fault did anybody hear about the ie7 tax we we enjoyed writing that a lot more than you enjoyed reading about it we got to do that they came in they said please do this and we went you bet we'll stay late night doesn't matter

we'll do it come on let's go and there was a bug in that that Microsoft found ironically so we fixed it did another release and started taxing people that's the bit I always found strangest people actually paid the tax I'm going to be comparing

three of the major API frameworks not rest frame works although they'll all call themselves that their API frameworks because really they're building RPC very mugs there's tasty pie which is version 90 point 9 1 16 now that's been around for

quite a while it's the oldest one that's still being developed and there's about two thousand one hundred people following it on github so it's pretty popular and how many people here use tasty pie there's quite a few of you not surprising

why because it works you drop it in bang you've got an API doesn't take much and it has everything all the features you think about all the features that your manager is going to ask you to tick the boxes on it's got its got some lurking Horrors

as well Django rest framework not well not long ago went and overhauled themselves version 2 point 0 and that was a big change now they've got 2.3 and they're based on the idea of a big more of a here's a serializer class for turning my data to

and from a flattened format that i can actually hand off over the wire and here's a bunch of class based views that you can build your api from very different to tasty pie and then there's my own little nap which was basically built on the idea of

tasty pie was too big and slow and clumsy for what we were doing it really was slow as it's the last person said the serializer takes a lot of time we found it took too much time and I had this sort of half-assed lightweight mini serializer for cases where

we needed to serialize but not do a whole API and sort of I built that up plugged in the publisher model that I had sitting around from a project few years ago and now we've completely removed tasty pie and supplanted it with nap and we're not looking

back as you can see from the little numbers on the end it doesn't quite rate as much interest as the other two projects but its young times these are the bane features most people are really going to be interested in when looking at one of these api frameworks

I think it's all pretty obvious what they are except for maybe shapes shapes is basically sending your data different formats different number of fields different shapes of data depending on which part of the API you're calling rate limiting obviously

we all know we need that filtering API versioning use in views at the bottom there is when you want to try and use the serialization formats and all the rest of the wonderful things of the api's giving you in your own views not in the API views so I'm

[ ... ]

Nota: se han omitido las otras 2.600 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.