« writing async in front of every function and hoping for the best » yup that’s me 😂
@dasshrs Жыл бұрын
That is really how it looks like when you do not check the implementation under the hood That was me too btw:)
@swx6074Ай бұрын
Your tutorials are one of the best out there, perfect amount of theory and examples. You should totally upload more:)
@serhiiserhieiev258311 ай бұрын
Лучшее видео по FastAPI что я смотрел за последнее время. Кратко и в то же время очень ёмко. Видно что автор глубоко разбирается в вопросе. Респект!
@evgenymaksimov11 ай бұрын
спасибо :)
@rns103 ай бұрын
This video is really a good reference when converting a sync project to async selectively. I will have to this video 2-3- times to understand whats going on in each scenario. I recently saw a conference video as well where they highlighted how making app async can block CPU bound processes, but there were not many examples. This video covers that extensively. Thank you
@dasshrs Жыл бұрын
You desire a million views - that is a great in-depth tutorial!
@corner47302 ай бұрын
This is awesome content dude, I am subscribing right away
@zemalex898 ай бұрын
finally amazing explanation with good examples I don't know how how come that you don't have a milion of views
@avitiwari79212 жыл бұрын
Excellent tutorial👌 and very accurate, precise chart. These are some much needed topics to be taken care of. My small request will be to share the code and chart in a repo, it will be much helpfull.
@evgenymaksimov2 жыл бұрын
Thank you for the kind words! Noted, I added git with chart to the video description :)
@КириллКулаков-т7г2 жыл бұрын
hi, Evgeny! great job! crystal clear explanation! big thanks!
Жыл бұрын
@evgenymaksimov 26:09 Of course, we cannot see that it has made a big difference with just a request. If you send thousands of IO-heavy requests, each request will be dedicated to a different thread, and as you said before, the application will lose performance after a while because the threads are memory hungry. If we use coroutines instead, I can say that they are lighter threads, the application will run more efficiently. Actually this may also be an answer to when to use thread and when to use async.
@evgenymaksimov Жыл бұрын
great point! thanks
@beme-l2k4 күн бұрын
great vid! Just one thing, I think your "run_in_process" function is actually creating a thread and not a process, no?
@chapizishorts652811 ай бұрын
14:50 What about GIL, doesn't it forbid to create multiple threads within 1 process?
@evgenymaksimov11 ай бұрын
It doesn't forbid to create, it just doesn't let more than one kernel thread take execution at the same time. However, for I/O calls GIL is getting realeased, so it doesn't impact it in our case
@huyubosaka89062 жыл бұрын
Thx for best material. It will be interesting if you do video about ASGI and WSGI web servers.
@evgenymaksimov2 жыл бұрын
Thank you! I’m considering it
@payitapp Жыл бұрын
Is it just me or our good tutor looks like Scarlett Johansson's brother 🤔. This is A really good tutorial by the way. Gives good context for how to write Async code.
@jafeta.75535 ай бұрын
Great video. Thank you very much!
@ahmadreza21898 ай бұрын
Great video, well done!
@rondechaka116011 ай бұрын
This video should have more views 👍
@akshaysarbhukan67012 жыл бұрын
Thanks for the tutorial. I have a question, is there any way to implement server sent events in FastAPI?
@evgenymaksimov2 жыл бұрын
take a look at pip package sse-starlette, it adds this functionality and you can use it with fastapi!
@akshaysarbhukan67012 жыл бұрын
@@evgenymaksimov thanks. So basically FastAPI still uses http 1.1 on top of which sse-starlette implements SSE, am I correct?
@evgenymaksimov2 жыл бұрын
@@akshaysarbhukan6701 not quite. FastAPI itself doesn't have hard dependecy on webserver. Regularly most use uvicorn as webserver, which uses http 1.1, but you can install hypercorn instead which supports 2.0 and it will work just fine
@akshaysarbhukan67012 жыл бұрын
@@evgenymaksimov yeah, got it. Thanks again for the help.
@jimmykhaidem929111 ай бұрын
Hi bro, can you make a video of using chunk method
@alekseichulei9955 Жыл бұрын
Did you try to use psycopg3 since it provides async?
@SabyrBerikuly5 ай бұрын
can you send a book you are referring to in your video?