Modern Python through FastAPI and friends. Sebastián Ramírez.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so good to see faces it's so nice to be here thank you very much for inviting me i'm actually nervous this is the first the first conference in person i've been in like two years or something like that i've been talking to this camera here yeah it's not that's fun uh cool so we're gonna be talking about modern python through fast api and friends so let's start with that first who am i i'm celestian ramirez i live in berlin germany you can find me on the github tutorial the stuff i am actually from colombia south america that's why the accent i currently work as a staff software engineer for thought and i'm also doing some external consultancy for other teams i created fast api typer and recently i released equal model like two weeks ago so so we're going to be talking about modern python can you actually all see the slides or should i move it okay cool we're going to be talking about modern python and when i say modern python i mean the python versions that are currently supported the ones that have not reached the end of life so it's 3.6 and above we're going to talk a little bit about f strings about type annotations and then a a lot about type annotations a bit about async and weight and some about performance and then community we're going to see examples with fast api typer sql model and all the friends and all the tools that are working behind the scenes so why why am i here for those that didn't raise the hand when they when i just asked if you wanted to hear my talk fast api is a framework for building web apis with python based on type annotations and it's a it has 35 000 github stars it's been drawn about 1 000 stars per month is currently used at uber microsoft netflix and a bunch of other places the performance is in the top rank of what you can get for python and is currently the third most used web framework for python right below a flask and django and by the official python developer survey and by this the stack overflow developer survey is the third most loved web framework mixing with front-end and stuff so it's right above react which is quite cool uh yeah that's why i'm here now let's actually start with modern python so we're going to talk a little bit about f strings so let's start with this we have some data here that is some recipes each recipe has a just some id some ingredients and then we have a default price now we have a function here and this function takes a name and it's going to give us some output about the recipe it's going to tell us like hey this is the recipe these these are the ingredients and this is the full price it's quite simple now if we run it we of course get the expected result we can get the recipe for a crunchy dash frog and we get the recipe for crunchy dash frog we get the ingredients the the total all the stuff and if we say that we want a quantity of 2 then we get the total is 2. nice but if we see here we have a bunch of repetition in this line we are using a this is a standard string with formatting so we are using the method dot format and then we pass a keyword argument name with the value that we want to put and if you see we are repeating name three times here and we can replace that with just the f string here where we just put the name inside of these curly braces and the f at the beginning of the string and this has better performance and of course it's simpler and easier to use and the editor can help us a lot very simple but of course it works as expected there's nothing there new and a we can avoid a launch of repetition and we can keep stuff simple that just to start so a little bit about f strings now let's talk about type annotations and we're going to spend here a bit of time so why would we want to have type annotations let's say that we don't like to get the message saying like hey this is the recipe for the crunchy dash frog because it looks ugly we want to replace that middle dash can you actually see all should we move a bit i will assume yes cool we want to replace this string that we are returning there we want to replace the dash for a space and we want to make it in capitals but if we trigger autocomplete in this function we won't get anything because the editor doesn't know that this variable this parameter is a string so yeah but we have been working with without type annotations without the completion of our life so it's fine we can deal with that but if we change just in this name if we tell the function if we tell the editor hey this parameter of the function this is a string and this is how we say it we just say columns and then string this is a string suddenly we get out of completion the editor will be able to tell us hey because this is a string you have these autocompletion methods and this is stuff that you can do with strings and because the editor knows that the result of dot replace so now we're replacing the dash for space the editor knows that the result of this is a string two we keep getting out of the completion so these type annotations are what provides auto completion in the editors so now we have auto completion for all the stuff and this is like the final line this is what we what we end up having and if we call it of course it just works the same it's just that it makes our lives simpler now let's say that we actually don't want to always give a quantity of one maybe some people just want the recipe and they don't really want to order one it's a simple refactor we just change the default from one to none cool that sounds fine and now if we run it after we run this we get an error telling us hey default price is an integer and quantity is none and you cannot multiply an integer with none so we're getting an error after the fact but then if we change this annotation here and we tell the editor hey this quantity by default is none but the type of this is a string it's an integer so the editor will know that this is an actual integer and that this should be an integer that this should be an integer or that it could be known the editor will know what is it that we are dealing with and now suddenly we have this inline error in the editor so we can see we can detect bugs before having to run the code right in the editor we will get those red lines telling us what is wrong in this case default price is an integer and quantity is known so this is not a valid operation in the case that quantity is not so the type hints these type annotations or typings are protecting us from a bunch of box that's the benefit we get from that now how do we fix that instead of just returning this whole dictionary we can just put the dictionary in a part in this result here and then we can check if quantity is actually not none and if it's not known then we can use it because it means that it is an integer so it can be none or an integer and if it's not then we just use it now if we if we see this is actually still showing a little error saying that hey you are putting here this is this will be an integer but this dictionary will contain other stuff so why is that this is because now that we are adding some annotations the editor is actually trying to be super smart and guessing what is the type of this dictionary so it's guessing that this is a dictionary that has as keys strings and the values strings or lists of strings or actually sequences of strings but then we can just tell the editor hey don't try to guess too hard this is just a dictionary of anything so don't guess what are the values of the of the of the keys and now the editor will know okay cool this is a dictionary that can take anything and now we don't have the error the little error here and now our code is working and the editor is helping us detect all those bugs and now notice this we annotated this as quantity as an integer that by default is none so the editor knows that this is an integer or that it could be none but then when we check here inside of this if block that is checking if this variable is uh is none the editor knows that inside of this block this variable or this parameter is actually an integer so it won't complain that hey this could be known because we're inside of a block checking that now we can be a a bit more thorough and a bit more uh structured and tell it explicitly hey this thing is actually an integer that is optional so it could be none this is the way this is the standard way in python to tell it that this quantity is an integer or a none this typing module is part of the standard library so we can just use it directly now in python 3.10 this is going to be even better even simpler but yeah for now let's keep it like that so with type hints we have more robust code we have a bunch of error detections we have in inline autocompletion in our errors and without typings we have to deal with the stuff that we have been dealing with now some of the people behind these type annotations uh these guys are the maintainers of mypay which is the tool that is used to check for these type annotations and actually this guy's the one that started the role and my pi is the thing that these type annotations are based on so thanks to the work of just a bunch of people we have a bunch of benefits now in python now let's talk about a more python with type annotations using fast api so fast api is all based on type annotations so let's actually build a web api from the same function that we had before so we just import fast api we create an app which is an instance of this class fast api and then we use a decorator with app dot get this get means that this will handle http get requests so get operations or get methods and this is going to go to the path slash recipes slash and then this name here this is going to be a path parameter and we are using the same format that we use for f strings so this should be relatively familiar but we are this is not an f string we don't have an f here and we don't have a variable name on top but it still is the same format now what fast api is going to do what has the pa is going to do is that it's going to take this parameter from the path and it's going to put it in this parameter in the function and we're going to have the the path parameter inside of the function and we're going to be able to use it inside and then this quantity is going to take it and put it and read it from the query parameters of the request so the marvelous api code we write the less api code we write because we can just focus on the actual business logic and the actual code that is important for our app and of course because this is all based on type annotations with autocompletion everywhere and we and uh yeah autocompletion which is nice and we get all the errors in then errors from the detection of these types and by using fast api we can go to slash docs and we get this automatic interactive documentation interface the for the api that is generated automatically but from the translations that we used we can actually use it interactively and send the request and then we will get a response that this is talking directly to the actual api that is running so we can interact with our api and the work and stuff and check it live so we write some basic code and good guy faster game x docs user interface for us now this is not only doing a this is not only doing documentation of the data from the type annotations it's also doing data validation because we declared that the quantity should be an integer if we try to pass it nine which is a string then the user interface is gonna tell hey this is not valid and it's not even going to allow us to send that value but if we tried really hard we just send the the request through the command line or through code fast api would still validate the request and will give us a nice error it won't only tell us hey this request is invalid it will tell us exactly where is the point where there's invalid data so we can see that in the query parameter the quantity parameter a value the value is not a valid integer which is what we declare so this can save us a lot of time that we're going to save the clients of this api a lot of time they will be so without valid data fast api will protect our code from running with invalid data and with valid data we will just get all the code that we wrote just as we wrote it now we also get a data conversion based on these type annotations so we declared that the quantity was an integer and it's shown here in the in the interface as an integer but we are sending it in a url and a url is by default a string it's just a long string but still fast api is going to read it from there and because we wrote the annotation as an integer first api is going to convert that value to an integer and we're gonna get an integer back so in the response this is a json integer this is not a string so we are actually getting an integer as we declare it and this is all based on the standard type hints we don't have to learn a new type of interface new classes new types we don't have to do anything else to get all that based on typings so fast api is based on standards a open api which internally uses json schema and also uses oauth2 you don't have to know all that but uh because of this we can get this automatic api docs this is actually powered by a tool called swagger ui and this tool is based on open api and because fast api is based on these standards we get all that and because we are using standard type annotations we get all the autocompletion and inline errors but we also get automatic data conversion and data validation and data documentation of course cool now let's change the example now let's see how we can use these type annotations with typer so now let's say that we are building a command line application not a web api a command line application so instead of importing fast api now we import typer we create an app with typer we decorate this function with app dot command so we are telling this type of app hey this is oops okay yeah this is the command that i want to run and now because we don't want to just return something because this is not a request we want to print something on the screen we are saying hey typer echo this result so we just add a little bit of type result and now we get an automatic command interface application from that function using type annotations so for example if we just call it like that it will say hey you have a missing argument name because this is required and then if we pass the name then we get the result as we expected and we also get automatic cli options like the quantity then now is two and we also get data validation if we say hey the quantity is nine we will get an error telling us hey you passed an invalid parameter for this for this cli option so this has to be an integer and when you build a package with typer a and your users install it and they install a completion because it comes with shell completion by default they will have a shell or tab completion in their terminals so they can write a for example dash dash view and then hit tab and it will auto complete the rest of the of the options or the of the sub commands that it will have and this works in a fish shell c bash powershell like everywhere even in windows powers so you're building a cli apps with typer with just using the same type annotations now we can extend this a bit with a little friend we can use rich which is another one library we can use and we'll reach i won't show you all data but we can import some tools here and then we can use this to print a table that is going to show us the stuff more neatly so if we run that then now we get this table with all the stuff that we that we wanted but now it's shown much more play so very easily with this one libraries we can have a command line application quite quickly and if you combine typer with rich er this is a very good combination for building online applications now some of the people behind because i want to show you all the people behind these tools a typo is actually based on click click is the thing that does all the actual work behind the scenes and a click is maintained by david lord and rich which is the other tool to show pretty information on the terminal is built by will will just like two days ago decided to go full time on open source so we're also going to see a bunch of improvements and features from uh from his work but what i want to show you is that this is just like normal people building these tools behind the scenes now let's say type annotations with fast api and now we're going to use pythag so fast api is built on top of pythantic another tool called starlet that i'll show you in a bit but because it uses pedantic we can use pydantic directly to declare the shapes of the data that we want to receive in json so for example let's say that now we want to receive some food some recipes or some yeah recipes for food and we just import from identity we import this base model and we use it like this we create a class and then we declare what are the attributes of this class and the types using the same standard type annotations so we're saying that this name is a string and the ingredients is a list of strings and this list of strings this is the standard way to declare in python that something is a list of strings this list also comes from typing and now we just use this class food that we created here we use it as a type annotation in the function here as a parameter so this is again the standard way to declare that something that this parameter food should be an instance of this class food and this is what fast api is going to give us so we will have this parameter food that will have a name and will have some ingredients so we can use it internally and of course a facility is going to read that information that we declared with standard type annotations and generate the documentation for that automatically and we can of course execute it and interact with the api direct directly and get the results back live with the api running just from the browser now what happens here sorry what happens if we send invalid data in this request so we say that we wanted to have a name which is a string and we wanted to have ingredients which is a list of strings that's what we declared so this second item this is actually a json object this is not a string and if we send that we will get again a nice error telling us where is the validation error so this is telling us hey in the body in the item ingredients the in the the index one a string type was expected and we actually sent a json so this is giving us validation errors from the data types that we declared from the same type annotations uh now what if we want to nest data let's say that we want to have not just one single food item but a nor a list of food items we can declare now that this is anor this a this orders parameter is going to be a list of food instances again this is the standard way to declare that in python and fast api will make sure that this is what we receive and because this is a list we can iterate on this list and we will actually receive an instance of this food class in each one of these items so we will be able to just use them internally so if you want to have json inside json we can just do that with the same standard type annotations and because this is all based on the same standard type annotations we get out of completion even for deeply nested data structures so for example let's check this out this is a double nested for loop and we are we are iterating for each one of the ingredients in each one of the food items and because we are using these standard type annotations we can get out to completion for each one of them so we get after completion everywhere okay and of course we get a inline errors even for these deeply nested data structures and these deeply nested data structures can be as complex as you want to declare them and they will just work and we will get validation automation and all the stuff even for those data structures also notice that these data structures we are building them with the shape that we need it's not something that is provided by fast api that is telling you hey this is the shape that you have to send it's something that we declared how we want to receive the data and we get all that stuff from that some of the people behind the scenes from this so fast api is built on top of pydantic and starlet starlet does all the web stuff by dante does all the data validation and serialization and all the stuff samuel calling is the creator of pedantic tom christie is the creator of starlet and a bunch of other projects and david montague is a notorious contributor to pydantik and fast api but again this is just normal people doing stuff to help others now we can use the same type annotations to combine fast api with sql model to interact with databases and build a web api that communicates with a database so sql model is based on sql alchemy and pedentic so we get this we we can declare this we can declare this model this is equivalent to a pedentic model and the equivalent to a sql alchemy model at the same time we are saying hey this is a primary key and the name should be a string serial name should be a string too and age is an optional integer that by default is none then we just create an engine in this case this is a sqlite engine and then we can use that in the first api application so in this case at startup we're just creating the whole database and then we can use that same hero class that we created that is a pedantic model and the sql key model by being a sql model model and then we can use that same here because that is also a sequel alchemy model we can use that directly with the database we can save it we can commit to the database we can refresh the data and when we can return it and then we can also use the same response mode if you have ever used fast api then this response model is used to declare what is the data sheet that we are going to return so we also get in the documentation and is also used for doing data filtering and data validation in the output and if we do that we can also create uh another path operation another endpoint to get all the heroes so we just use the same session we execute the session we select the heroes and we just return them directly and again we use the same type annotations in this case we're using in this parameter to tell you that hey we are going to return a list of heroes and now fast api with that is going to generate the same documentation that we have missing using the same data types that we declare so we can keep the same database and data models without duplicating all the information so sql model the people behind this sql model is based on top of pedentic and in top of sql alchemy and these tools were created by samuel coppin and mike badger so what is the deal with async and wait and what is the stuff with the performance and concurrency and all the stuff so here's the thing python as a programming language is very fast when you compare it with don't look at me like that when you compare it with the network if you are waiting in the network for clients to send data and to return data back then that is much slower than uh than the execution that you can create in python if you're building a kernel for an operating system then you probably will use another language but if you're building a web application or most of the other things that you could build python is probably a very good idea to use so this is the problem if python is fast sort of and the network is very slow how can we improve that so that we can have better performance so the first idea is that we can just use a bunch of clients in parallel all of them talking to the same application in python so this sounds great but then in reality by default it will be more like one of these lines so each one of these people is waiting for the one in front to pay before they can actually go to the cashier so the the python application will be sort of the cashier we're just waiting for each one of them so it's actually it actually looks more like this we are waiting for the network which is as low and then each one of these clients has to wait for that slow network before they can even start sending information or requesting data and then our api application is just waiting there for the network for a long time not using the cpu so here's the idea what if we had something like a waiter that can go to each one of the clients and then ask each one of them what they want and then just send the information back concurrently so this is what we get with async and away so your application will be kind of a kitchen preparing meals and then async and weight will be sort of like a waiter that is going to each one of the tables and asking them what do you want to order so this guy wants a salmon they he wanted a beef and this for example this one here could be my sister that is taking a long time to decide if she wants a beef or chicken and it's gonna wait there forever so now the waiter can say like you know keep the menu i'm gonna go to the next table and go to the next one and ask them what do they want meanwhile this waiter is taking each one of these orders and sending them to the application saying hey this is what i need you to cook so the application can be using the cpu all the time always cooking meals sort of and we don't have to be waiting for my sister to decide if she wants beef or chicken and this is how this looks like in code so we just use async and await and we start with so fast api is actually behind the scenes is an amazing framework so it supports both normal functions and async functions we actually we start with an async function then by having an async function we can use this keyword a weight and then this keyword await now we are using a httpx here we are using this async width to create a an async client with https and now this client.get method this get here it was created also using async dev and when it's created with async def we have to use it with a weight and this a weight this is the point where we are telling the waiter hey this might take a while because this thing might be my sister undecided if she wants beef or chicken so you might want to check the next table what they want to order meanwhile and by doing this we can serve a bunch of lines at the same time so that's all the deal and of course the user interface and the api all works the same we can get the results back and all stuff works as normal now there are some caveats with async and weight we have to make sure that all the levers that we are using are compatible with async and wait because if we are using a library that is for example going to cook the meals without using a weight it will be like having the waiter take the order and then have the waiter go to the kitchen to prepare the order before asking the other tables and we don't want that to happen because that will be even worse so we have to make sure that these libraries are compatible but then uh we can actually for example with api and with https they are both compatible with async or non-async so we can just start with normal dev functions and then we can optimize those path operations or those endpoints that really need the extra performance in terms of concurrency there's some or throughput which means how many clients we can serve at the same time so this is what we are talking about so we can just get both a normal left and async def in these cases some of the people behind the scenes in this async and await stuff so tom christie again he's the creator of starlet which is what fast api is based on which is an async framework also https which is the tool i just showed you to communicate with remote servers so httpx is pretty much like the modern requests framework is also a commentary of https and all these uh all this stuff with the web framework with fast api and install it they are all based on this standard ascii the asga specification this actually came from the people at django and this was created andrew goldwyn so cool now with that api in terms of concurrency and throughput like the amount of clients and the amount of requests that we can get has pretty good performance in the ballpark of the best that you can get with python so this is a benchmark run by a third party and the blue lines are python the green lines are golang there's a bunch of other languages and frameworks but this is a nice a nice comparison because golang is compiled it's a compiled language it has to be faster than python but still by using these these tricks with async and weight and all that stuff we can get a better performance that with some of the frameworks with go so that's quite nice which one of these is the fastest it's not necessarily that relevant because this has some noise for example fast api is based on starlet and starlet fast api and all this stuff is run by uvicorn ubicon is the actual server that is running if you have ever used unicorn this is the equivalent so this actually should be on top of everything but the important thing is that you get on the ballpark of the best performance that you can get and as you can see this has over 15 000 something requests per second so it's over 9000 requests which is quite nice now why is it that we get good performance with us api fast api doesn't really do anything fancy but it uses a very powerful tools underneath so starlit is a web toolkit or micro framework that does all the web parts and pythante does all the data validations serialization parts start starlit implements this as specification and uv core is the server that runs the application so when you run something in the command line it will be ubicon and this ubicom will use the application that you built with fast api or starlet or anything else and uv uses uv loop which is a high performance async io uh dropping replacement so you don't really have to do anything to use euv loop but it will be used underneath and you will get like all that extra performance and uv loop is built with syphon which is a sort of compiled python unpaid antique is also built with cyto so we get all these extra performance because all these nice people are building this stuff with high performance using site and using all these nice tricks so the that's why we get nice performance api is just because the tools underneath are very powerful now some of the people behind the scenes of these things again tom christie the creator of starlet and ubicorn are other tools jury is the one of the creator of uv loop and this guy is actually the creator or like the implementer or whatever of the async and await keywords in python and stephan bennett the maintainer of i'm probably pronouncing from of satan yes nailed it nice so cool i have been showing you a bunch of these pictures for each one of the sections so this is all about the community this is all all these tools all these things are built by normal people uh and it's in many cases it's just mostly during free time and it's just like trying to help others and trying to put stuff out there for others so all of these maintainers might actually have hobbies but they probably are doing some sacrifices also some stuff to keep these projects alive uh but you can actually help so you could for example for fast api you could help translating a page in documentation you can review translations from others you could answer questions from others you could help with books and features or you could help with all of these other projects there's always stuff that can be done to help with these projects so if you want to help that will be awesome and yeah well that's the end of it thank you very much i don't know if we have time for questions [Applause] yes basically is it possible to add some additional information like comments or anything so it will go into into the documentation of a fastest api as you showed in in the code yeah so the question is if it is possible to add commands or more documentation to the first api communication uh yes uh for example when you declare the docs string inside of that function that dock string will be shown in that interactive documentation and will be rendered with mark them so you can use markdown inside of the document and it will just automatically show up yes so after sql model do you have any big problems uh you see yourself solving as fast api human sql model i think it's huge what's next we had this discussion with my colleague and i said maybe uh jango admin replacement but colleague said jungle admin is anti-patron sebastian won't try to solve it oh high stakes yeah uh actually that's a very good that's a very good point i want to build something like like django admin i don't want to make it necessarily restricted to the specific orm i have been wanting to build another sort of admin interface that is based on open api so that it can read whatever is information that you are asking for so for example if you say like i want to upload an image and then i'm going to return a prediction using machine learning of the object detected in the image then that that would not be automatically created creatable at least based just on the data from the database but if it's based on open api we can use the same data shapes that are declared there to generate that i would like to build that that's one of the things that i want to work on i also want to work a bit on automatically generated clients for python there are great clients for typescript for example so you can get for the front-end teams they can get a from the same api that you build they can get an automatic code that has all the type annotations of the completion type checks in the fronted code based on the backing code that you wrote so they can see the errors that they are going to make before even talking to the to the back end i want to improve that a little bit on the on the python area uh yeah i think that's that's those are like the main things that i think right now how hard i don't want to expose my documentation so the documentation like the interactive docs interface you can disable it just by setting it up so there are many ways to protect and to like do authentication and authorization all the stuff and that will depend heavily on each application so fast api provides the ways for you to use the same tools that generate the documentation and add the the the authentication that you need first api has tools for doing authentication also based on oauth2 so that you can use you can do things like what i don't know google or facebook do that you have some permissions some specific permissions for some tokens and all the stuff so you can integrate that and then put the documentation behind something like that but for example you could just use just cookies and then show documentation only when the authorization cookie is so available api is awesome thank you uh so the way you do it right now is basically to find the api right uh you can build the documentation from from the open up it's kind of built you can you models and so on and so forth which is which is great uh what is your opinion uh in like in general in doing it a little bit the other way around defining the open up spec generator i've seen people uh start something similar for faster guys what is your opinion yeah so you can actually use exactly data model generator uh the thing is the like that's actually how open api was made open api's the evolution of swagger was the first sort of specification and it was intended so that you will build first what is the declaration of how the api should look and then implement the code but that's a long trip a lot of work that has to be replicated and what i have been trying to do is to reduce the amount of duplication of code and information and all that stuff and at least for me it's easier to work with python and without the completion i really love the completion as you have seen without the completion with inline error checks in the in the editor and all the stuff so for me it's easier to just actually build the api with fidantic and with at least the shape of it in python and then generate from that the open api than doing it the other way around but it's certainly possible so there are tools for doing it so for example if you already have an open api application you can also generate for example all the json schemas for all the pydentic models and then or even generate the actual rest of the application and then you can just fine tune it yep just i was always under the impression that when you declared hyphens python variables they don't have any actual runtime behavior but seeing how api works it seems that it kind of does conversion based on those templates and i was wondering how is that possible that's a really nice question so a yeah these type annotations were not created originally for doing anything at runtime but it's just possible in python so then pedantic does that to extract all these two to produce that extra capabilities and in fact uh because python was was a expect it was expecting to just use these type of annotations for for helping with editors and all the stuff uh it was like the main use case uh like even recently there was some uh some issue with something that could change a little bit the way that pydantik behaved but the the the python community and the string console they saw that this is a very important use case for pedantic so they actually reverted that because we took a long time to actually complain so that was bad on our side but then they actually reverted so that we can keep using these patterns that can help a lot so actually yes you can do use those type annotations underneath it has a bunch of tricks that has to be done but the but pydantic and fast api take care of that so so yeah you can just use them does that answer the question yeah so there are some tools internally from from python itself so you can use i think using typing you can just get type hints then in in introspect i think is the name of the model you can extract the information from the function to get the signature the signature of the function to get the parameters and all the stuff so there are several tools that have been in a couple of different places i think probably the easiest that you can do to replicate that type of behavior will be to check out the code titanic or typer is probably simpler to see because it's not as sophisticated as spidernick also because pydantik has been doing a lot of stuff to be able to be compatible with different versions of python that have changed a little bit of those how these types work underneath because these types have been evolving uh recently so like they are sort of new they have like i don't know a couple of years well four years or something so there's a lot of tricks that are done inside of identity to be able to to allow that but you probably the best way to actually figure out what are all the little tricks will be to check out the source code for [Music] the pythagorean topic so the conflict between the uses of types in fidelity and similar ties and what bison wanted to move forward was to make that system more widely applicable to make easier to annotate different use cases so how is the progress going on a compromise that improves to both those users and still allows python to classify others to work so for example with this recent the situation with pydenticon the new way that type annotations will have worked if they haven't rejected that they made the smartest decision which was to hold back not uh not set anything in stone so that it's possible to figure out what is the best way to make it make it all work with fast api python taken all this community and at the same time still benefit all the other communities that just want the type annotations and all the stuff but yeah like it's just something that has been going on and like all the all the all the actual geniuses that are building python itself are checking out like what is the best way to do this here and there and like how to how to improve all that so that the evolution can uh continue to go but the clearly fast api and python have been taking some uh some traction and the the same council knows that there's people that want to keep using those tools so they are very aware that this is a valid use case and that they just have to make sure that this also keeps working and and like they made a huge commitment by just reverting something that was already accepted uh in the in for python for python 10 3.9 to to postpone it to python 3.11 so yeah does that answer the question more or less yeah well like it's something that is going on it's in progress it's not something that is defined or written in stone yet yeah um source developers that you base your work on so i wanted to inquire in specific examples like let's take samuel colvin mike uh buyer and tom christie how do you partner with them in real it's very fun like you know like we became github friends so it's just like a bunch of videos and i ended up just asking stuff and uh i don't know some of some of the people who have been annoyed at the beginning because i didn't even know what i was asking about and some others were super nice despite that i didn't know what i was talking about uh but you know it's just like actually through these contributions in in in github and recently that fast api has been uh growing and all the stuff then i have been talking to someone colbin and to tom christie but i actually have never met them in real life yet just like you know a video call and stuff like that but it's actually quite fun because you know like i feel sort of friends with them and with a bunch of other people that i have actually never met in real life so yeah it's fine i think the question about like what what is the future of a admin will fast api i think that's very interesting and that that's that shows like what is what are the missing pieces i think that's a very good one okay so sorry for this one or for a book [Laughter] what what do you prefer he said that arabs very cute okay perfect and the book was what i'll leave it to you the book there were many good questions there are very good questions like i'm actually not sure this this is this is not a fair way to um [Music] [Laughter] um [Music] now actually let's do something who tells me that is not a christian uh who is the author if you remember of a juvenile the stuff that also the author of asin can wait yuri that's correct jose during jose julie okay thank you
Info
Channel: PyCon Lithuania
Views: 1,675
Rating: 5 out of 5
Keywords:
Id: 37CcB2GBdlY
Channel Id: undefined
Length: 47min 2sec (2822 seconds)
Published: Sun Sep 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.