Bestand wählen
Merken

Rethinking how we build HTTP APIs

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
hello everybody um so my name's for gold Shamir back and developers hippo uh where a product consultancy based in Istanbul so the title of my talk is rethinking how we build HTTP API is so I'll tell you from the very start this is not there's different types of HTTP API is like graph QL or WebSocket-based API is or asynchronous Sapienza and tonight but instead is more about how we actually build the so let's get started with a simple example OK that's even forget http best for a minute we're gonna write the most simple API in the world this is the spec so we want to an API that has a function that takes in a parameter and returns some message is what it should do in Python is pretty simple we have a function in a file that those what we want and our finest called API that PY so the namespace is API the function is low so API that OK so let's move on to making a HTTP API that does the same thing so we want to guess example . com slash API slash hello with some parameter that specifies who we want reach and this is the expected response so adjacent response so now I will say that when I talked about HTTP API is assumed the responses Jason I think we have all moved past the days of having multiple response types are preferring x amount of adjacent most of us prefer Jason uh so that's an assumption going forward so in Django we would do something like this we have our main function rich politics in a request object we extracted a promise her from the request we do a little bit of logic and then we return a Jason response specifying that the dictionary we return should be turned into Jason and then we have to register our review review from function which uh some rouge which specifies the Ural that will be used to call that functions In genderist framework we do something similar except we use an API you class on but apart from that it's basically the same for this type of
simple function of course if last we have something similar but just the request subject is a global object uh it's not passed directly into the function um and the roots are registered using decorators then this fast RESTful which again is more like the uh the API view concept using a class that methods instead and as many eruptions this pyramid which again has a slight difference for we specified the renderer as a decorator so we return we're a certain dictionaries and then the framework transitions Jason NATO it's quite different but it again it's a it's a class with matters related to the um today HTTP methods GET in this case but we write directly because we can write multiple times to the same response anyway there's a common pattern here we have some boilerplate at the top we creator AP and then we have a function which undertakes the request as a parameter for to is global request objects we do our logic sorry we extract the arguments and of our request object we do our little bit of logic and then we return a response of some kind you're common pattern is doing this inside class but apart from that it's very similar
OK so if you go back to our original function is quite a bit of extra coach just to turn this into an HTTP API so this is where people comes into it so Pico is a smaller than micro framework um yes um so I'll just show how that works so it because again relatively simple similar just the thing to notice is that we don't deal with the request object or the response object at all some so our function it takes in who parameter so who we want to say hello to and it returns a dictionary with the message so this is exactly
like the original python function and we don't have our explicitly registered the roofs but this function response to i'll explain why a minute so the peak of framework passes the data we need to a function as arguments so our function definition a specified that we need some to declare arguments so the framework knows what it knows what status has got uh in the requests process to the function we don't need to manually extract the data from the request object and kill serializes the data we returned as Jason because we are always going to return Jason is there any PI framework so we're never going to return and announce it's always going be Jason so let's not allow manually also people determines the URL from the module and the function name so in this case are URL was API slash low are module is called API copyright which you can see there obviously and the function is called a low so are you to call this function is API slash fellow so the main thing here is that we write framework ignorant function bodies so no framework code inside the functions this keep things nice and simple but makes it easy to maintain makes it easy to refactor on and we need to know very little about the framework for using but so what was the big deal well easier interactive development so we can just importers are module directly into IPython consul and beacon uh called a function by passing in arguments and get the response type so I don't know where you guys but where it whenever I'm developing and it's in Brighton I always have an iPod and consul open beside me with my code importers and that's where I do my development and then when I worked at exactly what I'm doing then i writers actually in my source or and modify the source reload IPython test something's try some things and then continue so it's a very very much sigh beside process I Biden and my editor so this is designed to make the process as seamless as possible also easy testing so this is an HTTP API yes but it's also just a simple Python module that takes an argument and returns some standard Python types so we can test it using the standard unit test library or any of the have quite interesting libraries we don't need to create a testing clients we don't need to have a peak of specific testing find but we just test like we test of any of the function so this 0 2 means that they were only test in our code we're not testing the framework code and be tests are nice and fast because there is no overhead of an overhead over a client of any kind and see that has a simple the other
advantage is that is easy to compose so this means that if if I have have multiple functions in my model I can easily call 1 from it in another even if they are endpoint functions of my API so far in this very contrived example but are Hello function is actually called by the get profile function because I don't know when we return a profile we also went into the greeting message that we used earlier so instead of extracting decision to some other function that we're going to then call that both of them well we can just call the other function that we already defined OK this is
nice but is this just another Hello World framework are you might be thinking I know that's real coach needs to access the request object what about when we need to access headers or the user's IP address renewed do authorization everything that you need to do in a real project so say for example a 1 to list the movies filtered by a user's IP address in some regions uh restricted movies online streaming service or we could do something like this so equals because together get request now we have the request dictionary we extract the IP and we get country and then we continue and we continue we can do our simple interactive development in the Council of about we can't OK we get a key error because we didn't pass the IP address but we couldn't hasn't the appeared because again from the response which is a global so we need to assess and then we request uh which contains the dictionary with the things that we might want to use mn now this is no painful this is not what we want so this was the wrong way so this is
what I started doing and this is what I did and some early versions of Pico um and I for a while said this is OK because it's not something I have to do very often duties cases much higher but I didn't like it I was not happy with this so the I
went back and we talked this and I remember
that that I said that there should be no framework code inside our functions so we shouldn't be calling people don't get requester anything like this for accessing the global request object or something like this so then I started thinking that well decorators right side the function the not technically inside the function so could we use decorators to inject some data into a function and then can we have it so that that decoration is only active when it's been called by people so if we have a decorator that extract something from the repressed positive the function but if you want to call that function in the Council or from a script we if we still need to pass in the repressed subject will we've still failed it's still the same thing so I experimented a bet on the answers to these 2 questions is yes we this so if you want to list the movies filter by country based on the user's IP address well we have we write a function that takes an IP address doubts that important isn't information and then we imported decoration and we applied the decoration so this route decorator called request odds odds because it can map multiple arguments but this maps the IP arguments of our function to the remote address attribution all of the request object but you maybe you might recognize that this is the name of the attribution that is used in uh works like so i'll explain and at the request object is exactly the request object that is created by work it is built on top works like so to this request artist decorator we pass the argument that we want to map out and this the key or the attribution from the repressed object that we want to use and then we continue as normal saw function body is still a framework ignorant it only uses the information that we need so we still have easy interactive development we pass in our IP address and we get back the results and we can still test as easy as we could before so we don't need to know and about the request object even though we're using information from the requested we can also make it a little bit more complicated so for example we have a user that is currently uh authorize reader API so in this example there using uh basic art so they have provided a username and password with the request we do some stuff inside a function which operates on the request objects but then we passed to the request odds decoration so we're saying here that username is given the results of the current user function and so this uh this is a way of basically of a not everything we want from the repressed subject is going to be easily extractable from a single key or a single attribute so we need a way to use functions so this function current user is what extracts the user that we want from the repressed object and yet so then
we continue as normal still function itself is just based on the user named not an attempt the repressed then we can do things like
say 11 an admin user to deletion movie from the database so again we get the current user rejected the user is in the oven users and we continue or else we raise an unauthorized exception but you're unnecessarily coupling Our delete function to the user even though the user is not actually used inside the main uh logic of the function really were talk in this function what we want to deal with is deletion movie's not about is the current user authorized to delete movies
so there's another decoration called protectors and its main idea is to protect a function from notarized ask access and the way it works is you pass another function to this declaration which idea uh it returns true or non but if it returns false or raises an exception than that for year decorated function is never called so this is a very simple way of uh basically doing permissions so we say are admin function or is admin function is the operating on the request object yet in the current user checking if the user is authorized if it's not then raises an unauthorized exception and that gets returned directly to the user so then I believe mirror function just focuses on the dealing with actually deletion objects so the nice thing about these
protectors and the request odds is that they have no effect outside of the request context so we can still color functions from a nondescript from the Council from anywhere else sorry yes like preferably after if you can keep it in your mind and this debate you can't understand something on the slide the OK um so yeah we can still call functions from neurons without having to pass around user objects uh so we focus our functions for focus specifically on the task how did the work well the UI simple but there's a little bit of
internal complexity and I think this is a worthwhile trade-off it's understandable if need be but for everyday users of the API they don't need to know how it works internally um I briefly
mentioned routine for just say again here that's so the relation is automatically determined module function and then uh keyword arguments if you use packages than we have package module function arguments so it's a very direct mapping of when URL is 1 function so the nice advantage of this is that given the URL we can quickly find the relevant function so this limits its mental overhead and we really resolves of having to make decisions about what should we call this URL what is the resource what is the end point what is the method that well regarded were not good but we have to do it anyway we have to name our functions in a model so let's just do it once what are the euros with multiple HTTP methods like these kind of things well we don't i we purposely don't support but because a complicates the internal code so instead we say this users add user get user update user acceptor when you're 1 function keep life simple but that's not
restful yeah it's not the great Piazza
not RESTful simple as that because I never said rest of the start I said http but API is do not have to be RESTful by not trying to be RESTful we keep things simple we prevent endless debates correctness is a really RESTful or not so instead I'm optimizing team for ease of use ease of development and so the corrective terrestrial correctness basically pragmatism so but uh briefly Pico tries to be pragmatic a simple under the functions 1 widely used response formats um slightly smarter than normal in adjacent civilization so for example if you return a pyruvate it gets returned as an array not raise an error if you return a daytime object a get serialized sample sensible simple euros self-describing which are described in a minute you can pass the arguments as pretty promises Jason or forming coders depends on the use case which you what would you want to use the works with any HTTP client includes a Python unadjusted science and it's easy to override the bits of the framework that if they don't do exactly what you want and it's built on was the standard so are you deployed like any other the applications and so this self describing this so safe you have a model with some functions like this then if you do a GET request to the module named you get back a description of the module which provides the URL the documentation for the module the functions of a contains and then for each function you get back to the function name URL for calling that function the docstring and the arguments with their default values and if a if a method is restricted to a specific type of met uh HTTP HTTP methods then that is included here also why do we have
this because it means that we can also generate clients but as altered generate finds but dynamically generate time so we can load an API from a remote URL an axis at 2 point and this is very useful if you have micro-services in year our architecture um or I mean you don't even have to call them micro-services but if you're calling some uh hey http service from another back and service then you can use this um the other nice
thing about this is that if users in the iPad IPython consul and you do the function question mark to get the docstring well it works it doesn't give you back some garbage but most libraries do but which often generated code it gives you the proper function definition with the default arguments and the docstring strength the results
jobs find fridge works and basically the same way so you know the peak of that J and you're API . js you import the module you call the function and returns a promise and then you do year John scripting 10 it so briefly I will
mention the origin story of peak 0 so this is originally developed in an academic research environments as part of a Django project leaders are not and the main idea was to ease the interaction between jobs good jobs script based data-visualization tools and heightened based analysis tools so the problem I mean if any of you work in a research environment probably you've come across this problem that all the best interactive uh visualization tools are in JavaScript for especially for things like GSM networks and stuff like tea tree is amazing in JavaScript bought all the number crunching is best on on the bright side so the main idea here was to simplify this to basically create a bridge between the 2 I use to call this a bridge frame across something like or PC but that put off people sort stopped using RPC um but yeah so it's important to remember that most of the original users of this were not web developers actually there were more interested in just getting an API in front of the num pi code and working to iterate very quickly so most approaches i be mostly single-user applications um would very fast iteration so they didn't care about creating a correct REST API didn't care about what's the URL was actually named what they cared about was having a function and being able to access that through and from the web-based visualization emanate to click on some points on a map and have that passed as a parameter to the back and analysis get the results and put back on the map something like that and was later extracted understand love framework is intended to be smaller the micro so hence pico but I can go for now because obviously detects a difficult man so yeah people at the number logic but term it was free and pipeline so that's why we're here um it's no use for a variety of production services of from single module micro-services to multimodal projects 100 plus end points that so it's not just a microfarad such as food in single file things a briefly on to mention some lessons I learned along the way this same by the way is now 7 years in development and smaller than my graphemic but when you're trying to be minimalistic it takes time to get things right so in the very 1st version you initially had 1 line code import pico to your Python entrance and Web service to me I thought it was great it was the minimal might attain that you could possibly need to do but for our absolutely everybody else it was very confusing why do import pico but not even actually use it and how do I know which functions are exposed to the world but I was using Python dimensions of if it has underscore then it's not exposed if it doesn't well then it is but yeah that was still a bit confusing and flake eaten like a so I have to change um trying to hard to be a single father framework this was obtained on Wednesday just suppose what I mean when you use spent nobody cares so don't try to put it in a single file specially JavaScript inside a white and is weird um trying too hard to have no dependencies this is relations I guess put our I implemented everything from scratch at the start request-response HDP error started file-handling just because yeah those a mistake I mean if you're making a library for the people used to use by all means learn how these things work but don't learn I don't implement them in your own frame just to learn build upon and what are the people of already done so he could see was rebuilt and upper work so it's much much nicer and when I was making pico to uh I originally had this as act of expose instead a peak about expose which is kind of more similar to the way that flask works which you're with the decorators they're attached the off enough global that this was deceptively simple but when you have multiple uh modules that becomes messy and brittle because well the order of imports became important so add some weird things were had to import the modules at the bottom of my file defined the opposite ways I would get a recursive imports that's not what have you shouldn't have to tell your users had to use your API in such a strange way so I'm actually I did need to attach but the greater to the up so it became global and made it easier to have dented perceived modules that you can import MACsetra so yeah now I would speak about expose any explicitly register your model so that just important so in conclusion I'm writing needs to the HTTP API is can be a simple as right basic mom Python modules but the framework should help us strike clean and testable code that is easy to refactor they should make it more difficult they should out they should help to minimize the mental overheads not increases so they should and in my opinion they shouldn't that added there's of uh code in between your URL on the function that actually gets called in the end which a logic the ones with the right level of minimalism minimalistic frameworks can be powerful and yet that something uh if you want the more you can look at the gates of repo or the read the docks the size or just installation try finally I would like to time well so the Giants his shoulders Pico stands upon so these are works OIG wrapped which is excellent and decoration library because writing decorations is much much much harder than it looks um so wrapped helps you to do it in the proper way the request library of obviously using the Python find and try to finally I would like to thank my company you have kindly supported the development of this project over the last year thank you it so thanks very large and any questions
yeah this is so and standard but you're not API the absorb the rest compacted but are you http compliant because an example soul was giving a for 1 where every HTTP fiber the screens for before 1 must include the that the babble then to Khadr at their and our challenge and I don't see how you put those together and why the when you see the 2 numbers were 3 and have become 1 http poorest upon writing special-purpose proxies in like because every biome show very clear right that would go on about the Committee's 6 6 there at of sequences 616 what it says is that f or 1 must so there is no all wiggle room included about Bob authenticated 1 to the raising of a bit of a set of forest it that's a good question uh um To be honest I don't remember but I do remember reading about this so I and I do remember that and work so there is something about that's for for 1 it's doesn't issued the challenge there was a reason behind that as well but you have to be honest I I don't remember exactly what the use case there was and why why a set amount for is right forbidden and I guess it depends exactly on what the clients are into the free API on so you could just as easily raise a forbidden there so all the exceptions of the reuse and Pekar imported directly from work so of so there you can raise an exception thus defined on but the exact details I don't remember to I have 2 questions 1 of them is really simple i you are able to actually suspects fight that response called in past here that's for example if you're doing great directs like to 1 you you need to specify the location from the example that we should that we be either be super helper loop will get to 0 what the FEC stream may cold and the 2nd question is for example if you you building could you IPI and you expect that this API what web also you build them the value of L parts like API sludge B once lush profile and at some point you to say OK I want to modify the profile it won't be compatible with the old to prop up so he if API sludge be to flush profile with your current structure the the way that you're building could dynamically that your health it looks like you have to copy all the functionalities reference them once again if you want to they also to be accessible under this large peak book but so when you are registering a module to expose you can so you can explicitly choose the name can be exposed on so if you're importing from say the 2 then uh you can you can choose to say imported as something different like the way in we import and food up are as far and engine you refer to it as positive whatever from now on you can do the same thing because you can change the name of the model if you need to because of conflicts or things like that that answer your 2nd question With the use case using important file so but for me this will end up with a lot of when used in aborting the individual model ends up I'm a big fan of flake Kate and I wouldn't or even the best to run if old Michael ctional to make it compatible we you and going q but different ball that the just not used and it looks we enter a few weeks from now someone will build the error in that file Hugh take all the simple to not just l just remove them I did that a few months ago in the with something that was working similar that the result was terrible so I'm not sure where you actually talk about for those imports because 2 I'm in maybe I might have confuse things but shining an example of the way that I did things wrong because there there isn't any imports that aren't used anymore it yeah the woman question maybe but in we terror thanks for the talk which looks for interesting I was a sure I thought it might have is of that package directory structure now has to represent the URL structure of the way that but what is a good function name a module name is not necessarily what is a good URL graph for example you might wanna use a Python identifier or some other has a legal billing of the user that's not so I have the well that the function names should I think speak to the developer and there you are land should speak to the user so if you don't want these to correspond one-to-one is in some cases have you work on that so to make the function names that you use on a public API whether it's a API that you're exposing to uh users directly to Python the right so those functioning should be for the users of that API they should be designed for those not the developers all of not the developers of those functions themselves so to me if you're naming something for consumers of your API it should be you should have the same top process whether it's exposed or HTTP or it's exposed as a import import my API and my function to me for the following the same guidelines for how you would name those functions OK but I wanna use the word many or else flesh from the I can't have a module or a function called from this a syntax error the OK so this is yeah I OK I guess I've never come across a situation where a quantity you name a function from or a module from OK thank you so if you think in terms of rest then yes you'll want to name the functions maybe following you will not want to name the functions as man's yes I guess what I'm asking is is there a way to override the neural name if you don't like build generative on so if you like of people apart from the way that the euro the generations amount of functions and yes you can override and the way that the routine is done and actually have done this for a a project that is running in production but because it was implemented as a REST API and but it was using a different framework and we want to migrate away from it for various other reasons but what we wanted to maintain API to possibility so for that project I overrode the richer best modifying people cannot but over the roof of this but still use all of the decorators all of the the rules about which axis and the uh the framework from inside functions except for everything else stays the same but the root of it was overridden just to work with so standard works on routes and then the idea that works fine so if you really don't like the way is to the roosting is done or if you need to maintain compatibility for a different project then you can you can do that is like I just personally I feel that we don't need to uh I didn't want to support the breast full API is in my in the library and I thought that it maintains a bit more complicated uh so that's why I chose this method but yes you can override it if you want any more questions uh thank you for a really interesting uh talk and I wanted to ask well maybe it's more and more of a litigation design question but OK move but to the gate let's assume you have like your videos and they belong to users and you don't want the user to edit or delete others tedious but where would you all go make these checks III in case of Pico in some decorator or inside a function for maybe get some information from 2 greater function into the main 1 uh which way you so the correct 1 in your opinion so I'm in the philosophy and in my philosophy for Peco is that's how you can do things in many ways as long as you don't use the request object inside the function so that's basically the main rules so if you want to do uh I think we just about as permissions for doing different things for users so the way that I would normally do it is our wits by using the decorators so this protected declaration it can be used for most in most cases like that sometimes you want to do things based on if the user is an admin user then you want to include extra information in the response so in that case I have a request odd that specifies if it's a super user are admin user whatever you call it in year uh your code and they get back it's passed as an argument to the function so then you a keyword argument that says superuser true or false and then later in your code you say if superuser them into this in the response the dictionary if not then we don't and so then again when you're testing your code you can possibly is a true or false yeah the yeah you can raise any of those exceptions from inside the craters or inside the main body of the function and because they are so those exceptions our normal Python exceptions but can be caught in the normal way but if they raise all the way up to the top of the framework then they turned into responses with the appropriate sources code and header accepted but you can easily if you need to for example you can raise a on unauthorized were forbidden or whatever is the appropriate 1 in the case and then you can catch it later in the code some rocks if you have the use case OK you 1 last question please and then we have to the in they are things about this rebate of the figure entitled how much is so I have another Python pro or anything of just use them flask bit entangler bit and Alice felt that those frameworks always really intra connected with templating stuff like change or something do you have something similar for that as well or do you or a speaker just not for delta and so I so technically this is an API framework so with your near-term Jason I'm so there's no need for a templating library but because everything is based on work story and what we see in the end you if for example you had an API application but for some reason you need 1 view that is rendered templates i denotes the reset passwords former something like this you don't have to use a whole new framework just for that rendering the page with the form so you can break the rules and directly return response objects from 1 of these functions and that will work because that's what happens in the end so if if you don't return a response objects whatever he return as convergence Jason if you do respect to return response Beckett's return directly to the user so because Europe can return a response objective means you cannot surrender template so you can import ginger ginger rendered templated return the response and that works fine so you can do it it's obviously not the recommended way because this is API framework designed for returning Jason but if you need to do it for a specific things or for example you have an API that has a like a Web book for handling incoming SMS messages from uh into radio and you need to return as response to them and needs to be into a mold which is the funny Markup Language then you can't return Jason they won't accept it and they want their markup language so yes you can override the response there for that particular function but but in general you don't need to do it but for those edge cases when you do need to it is possible that's the promotion version so then it's given that they can fulfill the launch
Lineares Funktional
Parametersystem
Subtraktion
Namensraum
Bit
Graph
EDV-Beratung
Ähnlichkeitsgeometrie
Elektronische Publikation
Biprodukt
Mathematische Logik
Framework <Informatik>
Objekt <Kategorie>
Multiplikation
Datentyp
Endogene Variable
COM
Softwareentwickler
Funktionale Programmiersprache
Message-Passing
Subtraktion
Bit
Gruppenoperation
Klasse <Mathematik>
Mathematische Logik
Framework <Informatik>
Computeranimation
Message-Passing
Endogene Variable
Mustersprache
Volumenvisualisierung
Wurzel <Mathematik>
Parametersystem
Sichtenkonzept
Textbaustein
Konfigurationsraum
Ähnlichkeitsgeometrie
Computervirus
Data Dictionary
Endogene Variable
Objekt <Kategorie>
Mustersprache
Flash-Speicher
Funktionale Programmiersprache
Textbaustein
Message-Passing
Komponententest
Prozess <Physik>
Existenzaussage
Code
Framework <Informatik>
Computeranimation
Informationsmodellierung
Client
Softwaretest
Interaktives Fernsehen
Code
Datentyp
Endogene Variable
Programmbibliothek
Softwareentwickler
URL
Modul
Umwandlungsenthalpie
Softwaretest
Lineares Funktional
Parametersystem
Profil <Aerodynamik>
Quellcode
Computervirus
Modul
Entscheidungstheorie
Objekt <Kategorie>
Texteditor
Funktion <Mathematik>
Framework <Informatik>
Offene Menge
Ein-Ausgabe
Serielle Schnittstelle
Overhead <Kommunikationstechnik>
Funktionale Programmiersprache
Message-Passing
Standardabweichung
Autorisierung
Netzadresse
Framework <Informatik>
Dialekt
Computeranimation
Data Dictionary
Objekt <Kategorie>
Mailing-Liste
Dienst <Informatik>
Interaktives Fernsehen
Reelle Zahl
Adressraum
Endogene Variable
Projektive Ebene
Reelle Zahl
Softwareentwickler
E-Mail
Fehlermeldung
Resultante
Bit
Adressraum
Versionsverwaltung
Framework <Informatik>
Code
Netzadresse
Computeranimation
Mailing-Liste
Softwaretest
Interaktives Fernsehen
RPC
Adressraum
Code
Skript <Programm>
Passwort
Passwort
Softwareentwickler
Attributierte Grammatik
Autorisierung
Lineares Funktional
Parametersystem
Strömungsrichtung
Routing
Objekt <Kategorie>
Mapping <Computergraphik>
Framework <Informatik>
Funktion <Mathematik>
Rechter Winkel
Ein-Ausgabe
Information
Normalvektor
Funktionale Programmiersprache
Schlüsselverwaltung
Brennen <Datenverarbeitung>
Mailing-Liste
Funktion <Mathematik>
Datenhaltung
Systemverwaltung
Passwort
Funktionale Programmiersprache
Mathematische Logik
Computeranimation
Datenhaltung
Objekt <Kategorie>
Nichtlinearer Operator
Lineares Funktional
Systemaufruf
Ausnahmebehandlung
Kontextbezogenes System
Fokalpunkt
Computeranimation
Endogene Variable
Datenhaltung
Objekt <Kategorie>
Task
Rechenschieber
Funktion <Mathematik>
Autorisierung
Deklarative Programmiersprache
Client
Flächeninhalt
Funktionale Programmiersprache
Brennen <Datenverarbeitung>
Parametersystem
Lineares Funktional
Relativitätstheorie
Ultraviolett-Photoelektronenspektroskopie
Komplex <Algebra>
Modul
Code
Computeranimation
Entscheidungstheorie
Entscheidungstheorie
Mapping <Computergraphik>
Multiplikation
Informationsmodellierung
Funktion <Mathematik>
Code
Overhead <Kommunikationstechnik>
Routing
URL
Overhead <Kommunikationstechnik>
Funktionale Programmiersprache
URL
Bit
Mereologie
Browser
Kartesische Koordinaten
Baumechanik
Computeranimation
Deskriptive Statistik
Message-Passing
Informationsmodellierung
Stichprobenumfang
Endogene Variable
Datentyp
Softwareentwickler
Default
Normalvektor
URL
Parametersystem
Lineares Funktional
Benutzerfreundlichkeit
Default
Computervirus
Dateiformat
Modul
Endogene Variable
Objekt <Kategorie>
Funktion <Mathematik>
Client
Dateiformat
URL
Funktionale Programmiersprache
Standardabweichung
Fehlermeldung
Resultante
Parametersystem
Datentyp
Punkt
Kartesische Koordinaten
Computervirus
Code
Computeranimation
Message-Passing
Generator <Informatik>
Client
Dienst <Informatik>
Funktion <Mathematik>
Code
Client
Programmbibliothek
URL
Computerarchitektur
Eigentliche Abbildung
Diskretes System
Default
Funktionale Programmiersprache
Punkt
Web-Applikation
Versionsverwaltung
Iteration
NP-hartes Problem
Kartesische Koordinaten
Bridge <Kommunikationstechnik>
Information
GSM-Software-Management AG
Analysis
Computeranimation
Übergang
Eins
Netzwerktopologie
Last
Dämpfung
Web Services
Prozess <Informatik>
Code
Minimum
Visualisierung
Skript <Programm>
Metropolitan area network
Lineares Funktional
Parametersystem
Softwareentwickler
Extremwert
REST <Informatik>
Güte der Anpassung
Programmierumgebung
Varietät <Mathematik>
Computervirus
Biprodukt
Dienst <Informatik>
Verknüpfungsglied
Framework <Informatik>
Funktion <Mathematik>
Rechter Winkel
Client
Projektive Ebene
URL
Overhead <Kommunikationstechnik>
Ordnung <Mathematik>
Repository <Informatik>
Programmierumgebung
Prototyping
Fehlermeldung
Varietät <Mathematik>
Multiplikation
Hausdorff-Dimension
Interaktives Fernsehen
Zahlenbereich
Dienst <Informatik>
Mathematische Logik
Term
Code
Framework <Informatik>
Message-Passing
Iteration
Modul <Datentyp>
Leitungscodierung
Programmbibliothek
Skript <Programm>
Softwareentwickler
Modul
Analysis
Relativitätstheorie
Einfache Genauigkeit
Elektronische Publikation
Modul
Quick-Sort
Einfache Genauigkeit
Endogene Variable
Mapping <Computergraphik>
Mereologie
Web-Designer
Visualisierung
Funktionale Programmiersprache
Innerer Punkt
Resultante
Bit
Punkt
Prozess <Physik>
Beschreibungssprache
Versionsverwaltung
Kartesische Koordinaten
Homepage
Videokonferenz
Streaming <Kommunikationstechnik>
Client
Wurzel <Mathematik>
Urbild <Mathematik>
E-Mail
Figurierte Zahl
Bijektion
Metropolitan area network
Umwandlungsenthalpie
Softwaretest
Lineares Funktional
Parametersystem
Sichtenkonzept
Template
REST <Informatik>
Gebäude <Mathematik>
Güte der Anpassung
Profil <Aerodynamik>
Ausnahmebehandlung
Ähnlichkeitsgeometrie
Quellcode
Generator <Informatik>
Verknüpfungsglied
Menge
Kompakter Raum
Rechter Winkel
Deklarative Programmiersprache
Projektive Ebene
Identifizierbarkeit
URL
Information
Verzeichnisdienst
Message-Passing
Standardabweichung
Fehlermeldung
Folge <Mathematik>
Subtraktion
Mathematisierung
Zahlenbereich
Term
Code
Framework <Informatik>
Loop
Informationsmodellierung
Benutzerbeteiligung
Bildschirmmaske
Fächer <Mathematik>
Endogene Variable
Koroutine
Vererbungshierarchie
Programmbibliothek
Passwort
Datenstruktur
Softwareentwickler
Wald <Graphentheorie>
Graph
Systemverwaltung
Schlussregel
Routing
Elektronische Publikation
Modul
Objekt <Kategorie>
Verschränkter Zustand
Mereologie
Wort <Informatik>
Normalvektor
Funktionale Programmiersprache
Brennen <Datenverarbeitung>

Metadaten

Formale Metadaten

Titel Rethinking how we build HTTP APIs
Serientitel EuroPython 2017
Autor Walsh, Fergal
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/33709
Herausgeber EuroPython
Erscheinungsjahr 2017
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Rethinking how we build HTTP APIs [EuroPython 2017 - Talk - 2017-07-14 - PyCharm Room] [Rimini, Italy] Rethinking how we build HTTP APIs The Python universe is overflowing with web frameworks, from full featured batteries included frameworks like Django to micro frameworks like Bottle or Flask. They each have their own specific features but in the end they are all very similar in their core functionality of processing requests and generating responses. In this talk I will discuss why I felt the need to create yet another framework, a pico framework, that specifically focuses on the task of building HTTP based APIs for the web. Pico, as it is aptly called, doesn't do templating, ORM, custom routing, authentication, validation, caching, or a million other things. Instead it helps you write clean APIs using simple functions and modules with minimal boilerplate. Pico is both opinionated and flexible in equal measures so you can focus on what matters; your API logic. Pico helps you to write code that that is simple to get started, trivial to test, and easy to maintain as your project grows. APIs built with Pico are self describing so client code can automatically/dynamically be created. Pico includes both a Python & Javascript client but it is also very simple to interact with your API with plain old cURL/Requests/jQuery/etc. It is just a HTTP API after all. Having recently released Pico 2.0, this talk will outline the evolution of this framework over the past 7 years and discuss some lessons learnt along the way about building HTTP APIs and frameworks

Ähnliche Filme

Loading...
Feedback