Asynchronous Web Apps in Python

  Рет қаралды 27,197

mCoding

mCoding

Күн бұрын

Building your future web app.
Stop copy-pasting snippets to piece together a FastAPI app you don't really understand. Instead, buckle down and take the time to learn the fundamental building blocks that async web app frameworks in Python are built on top of. That way, you won't be stuck when there's no tutorial to copy from.
― mCoding with James Murphy (mcoding.io)
Source code: github.com/mCodingLLC/VideosS...
ASGI Spec: asgi.readthedocs.io/
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
/ mcoding
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
www.paypal.com/donate/?hosted...
Want to donate crypto? Check out the rest of my supported donations on my website!
mcoding.io/donate
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information, Pi
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: / discord
Github: github.com/mCodingLLC/
Reddit: / mcoding
Facebook: / james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
1:14 The ASGI Specification
3:04 What an ASGI app looks like
4:37 Our first ASGI app
7:41 The lifespan connection
9:10 HTTP connections
12:05 Routing like FastAPI
13:27 The Response object
14:42 Starting to see the big picture

Пікірлер: 81
@AntonioZL
@AntonioZL Ай бұрын
You fill a really important niche on programming youtube, which is that of intermediate+ Python content. Throughout the past 2/3 years you helped me a lot in becoming a much better developer. Thanks a bunch, James!
@walkdead94
@walkdead94 29 күн бұрын
True.. is hard to find new content when you are intermediate + developer
@Ca1vema
@Ca1vema 29 күн бұрын
sorry, but wsgi and asgi basics is a junior level nowadays.
@kaosce
@kaosce 29 күн бұрын
​@@Ca1vema Absolutely not. Junior level is understanding what is http and how it works + basics of frameworks like Django or FastAPI but certainly not how they are implemented
@Ca1vema
@Ca1vema 29 күн бұрын
@@kaosce What you described is 12h courses, you put the bar too low :^) I'm not asking for implementation details, knowlege about HOW http request comes to django is enough. You know, browser, web-server, wsgi, django interaction.
@temik26
@temik26 Ай бұрын
This is pure gold, thanks
@khanra17
@khanra17 29 күн бұрын
The topic is gold but this video is dog poop !
@smnomad9276
@smnomad9276 Ай бұрын
Thanks for this really valuable content. Teaching the fundamentals of a technology and not just an implementation tutorial is what is really lacking in the youtube space!
@nitishvirtual4745
@nitishvirtual4745 15 күн бұрын
Wow! This is one of the best ASGI videos out there. Pure information for fundamentals building. Thank you very much. Keep posting more such videos.
@greob
@greob Ай бұрын
Great demonstration! Very excited for other videos about this topic! Thanks for sharing!
@Sandeep-zd6dq
@Sandeep-zd6dq Ай бұрын
Thanks for starting this amazing series 🙌
@draufunddran
@draufunddran 29 күн бұрын
As someone already mentioned, this channel is pure gold... The topics are awesome and the knowledge density is from another planet. This mixed with his unmatched humor is the best KZfaq channel of all time. Please don't stop making python videos. You rock!
@pythoninarabic3341
@pythoninarabic3341 29 күн бұрын
perfect timing, I'm just started learning about this ❤❤❤
@ejovo
@ejovo 28 күн бұрын
Awesome content! Been using FastAPI at work and this content is so illustrative of technical details behind the scenes. Mission accomplished, thank you!
@matis9783
@matis9783 Ай бұрын
Quality content as usual, the ASGI series will be great!
@bool2max
@bool2max Ай бұрын
very eye opening, waiting for future installments!
@sandie_jr
@sandie_jr 29 күн бұрын
Much needed! Thanks for the making series for it.
@jurgenrusch4041
@jurgenrusch4041 27 күн бұрын
Hi James, a big thumbs up 👍 for your clear and excellent explanation connecting the ASGI theory/defintion to actual REST API building libraries. Some time ago a colleague asked me to write a simple REST API. I used used FastAPI. That was quite easy to do but then he asked me a feature I did not know how to implement, simply because I did not know about the 'structure' of ASGI that you have explained so well here. As another viewer wrote, your videos are true gold! Keep 'm coming.
@robosergTV
@robosergTV 27 күн бұрын
dude, thanks! I was just tasked to understand our core FastAPI app at my company, this is perfect!
@manuelangelsuarezalvarez3355
@manuelangelsuarezalvarez3355 Ай бұрын
Loved the video, thanks for this kind of low level content!!
@shadowviper95
@shadowviper95 Ай бұрын
Love this content idea. Please keep it up!
@Ontaro
@Ontaro Ай бұрын
What a genius, 10/10, liked, suscribed, and will patreon.
@Khushpich
@Khushpich 29 күн бұрын
Best python content on youtube. Thanks James.
@dirtdart81
@dirtdart81 29 күн бұрын
This comes at a perfect time, thank you for making this series!
@adamdapatsfan
@adamdapatsfan 28 күн бұрын
YES, so glad we're getting a series on this! It's such a great project design, can't wait to find out all the little things I've been doing wrong :P
@jewpcabra666
@jewpcabra666 28 күн бұрын
This series will be one of the best series for developers for years to come. Can't wait for the next video. Absolute banger of a vid!
@svaponi
@svaponi 28 күн бұрын
Great content! Thanks for breaking this down
@slash_me
@slash_me 29 күн бұрын
This is perfectly timed, just this week I started converting a sync web application (using uwsgi) to ASGI with Starlette, and there's another app which I think I'll want to convert next. I think I already know the fundamentals, but I'm excited to learn more! From what I've seen of Starlette, I like it a lot already. Since both of my apps are rather simple, I wanted to keep it low level and not use something like Flask or FastAPI, but Starlette feels like the perfect middle point of being somewhat low level without me having to reinvent any wheels.
@farhadeviltrg6116
@farhadeviltrg6116 29 күн бұрын
this was perfect, I couldn't understand asgi before but now its a lot more clear
@AntonLebedevEsq
@AntonLebedevEsq 27 күн бұрын
That's a cool quest to undertake. I'll make sure to follow along, going to be an interesting journey. Thanks!
@PaulaBean
@PaulaBean 26 күн бұрын
Very enlightening! Thanks!
@ramimashalfontenla1312
@ramimashalfontenla1312 27 күн бұрын
Waw, what a video! Thanks, awesome content!
@nicolaipre
@nicolaipre 29 күн бұрын
This was a great video, thank you! Would also be very cool to see you implement routers, route ordering, subdomain routing and middlewares in a part 2.
@this-one
@this-one Ай бұрын
Great content, as always.
@trupalcanada
@trupalcanada 29 күн бұрын
great series🎉
@blitzarsun
@blitzarsun 29 күн бұрын
This is great! I would love to learn about deployment too.
@NileGold
@NileGold Ай бұрын
This is very helpful
@dojjy5798
@dojjy5798 29 күн бұрын
Another master piece
@Razerblue6
@Razerblue6 Ай бұрын
I'm probably misunderstanding but why would a standard such as ASGI be designed for/tailored specifically towards Python? Is this not something that multiple languages (that of course support async programming) could benefit from ASGI? Is there anything fundamentally standing in the way to implement an ASGI protocol server for use in other languages?
@soyitiel
@soyitiel Ай бұрын
0:25 that's exactly how I feel whenever I'm learning a new python library
@mistervallus185
@mistervallus185 Ай бұрын
i actually want to see the regex for the http request header
@failgun
@failgun 29 күн бұрын
stack overflow question 1732348. _that_ answer. It is not possible to do this.
@noel.friedrich
@noel.friedrich 29 күн бұрын
It's not possible to create such a regex, as the spec for it isn't a regular language! Fun - right?
@Ca1vema
@Ca1vema 29 күн бұрын
2:20, you could and you should write an HTTP parser, as en exercise. It's easy to understand and work with. After that you got a knowledge not only on protocol but also on how it works. With such great number of frameworks, new coming developers do not understand basics, and it's a shame.
@CASnumber
@CASnumber 25 күн бұрын
Quality content
@aashayamballi
@aashayamballi 29 күн бұрын
Thank you!
@YuvrajRaghuvanshiS
@YuvrajRaghuvanshiS Ай бұрын
Yesss❤
@tan.nicolas
@tan.nicolas Ай бұрын
u rock! thank you so much
@sakost
@sakost Ай бұрын
..... 0:53 and authorization (sry, I couldn't resist) (btw I use arch (and keycloack) )
@mCoding
@mCoding Ай бұрын
Authorization was actually cut in the edit for time :)
@MrFluteboy1980
@MrFluteboy1980 Ай бұрын
The opening description of all the magic sounded like Laravel for Python!
@sscapture
@sscapture 29 күн бұрын
Super!
@nemoumbra0
@nemoumbra0 Ай бұрын
4:57 Can this be expressed via the `Coroutine` from `typing`? (btw, I use Manjaro, not Arch)
@agb2557
@agb2557 20 күн бұрын
Amazing
@jakedunn9241
@jakedunn9241 Ай бұрын
Whats the stack overflow pic?
@mr.vladislav5746
@mr.vladislav5746 29 күн бұрын
Google: RegEx match open tags except XHTML self-contained tags. It's the top answer to that stack overflow post (won't link cuz my comment will probably be removed then)
@yourdadsbestfriend7101
@yourdadsbestfriend7101 29 күн бұрын
Great!
@JohnFallot
@JohnFallot Ай бұрын
Discord gang lets goooo
@mCoding
@mCoding Ай бұрын
First, gratz!
@jdratlif
@jdratlif Ай бұрын
This was really interesting. Thanks!
@JohnWasinger
@JohnWasinger 29 күн бұрын
Would this be an alternative to using Django or as a companion to?
@mCoding
@mCoding 29 күн бұрын
Django is primarily a synchronous framework that uses WSGI, the synchronous predecessor to ASGI. Django has added ASGI support, so it is technically "companion to," but the support is more like a wrapper that speaks ASGI to the outside but remains synchronous on the inside. Support continues to improve with each release, though, so it may add native asynchronous support in the future.
@yomajo
@yomajo 26 күн бұрын
What is print(objects...)?
@monorepo
@monorepo Ай бұрын
When's the Litestar series drop? 👀
@iury664
@iury664 6 күн бұрын
no need to pass self as the first argument in get, post, patch...functions ?
@hoteny
@hoteny 28 күн бұрын
2:32 im very curious now
@BR-lx7py
@BR-lx7py 29 күн бұрын
So ASGI is the newfangled CGI?
@baja
@baja 29 күн бұрын
As always, great video but the `q: str = None` is really killing me 😬
@prakashkalluri64
@prakashkalluri64 26 күн бұрын
Instructions unclear. Started raising a whole herd of goats
@denispmaciel
@denispmaciel 27 күн бұрын
T-H-A-T I-S G-R-E-A-T !!!
@thisoldproperty
@thisoldproperty 22 күн бұрын
Kill -9 Similar to other times when you have shown that Python isn't in complete control of its facilities.
@mCoding
@mCoding 22 күн бұрын
I think this might actually be a uvicorn issue. I know they set up signal handlers, and they probably just aren't handling sigint properly.
@glorytoarstotzka330
@glorytoarstotzka330 26 күн бұрын
I am worried that it won't get many views and that the series will stop, even if it will be really useful for a bunch of people (if not now, in the future, when algorithm might decide so)
@jadore801120
@jadore801120 Ай бұрын
Gj
@jullien191
@jullien191 25 күн бұрын
No he entendido
@Mekuso8
@Mekuso8 29 күн бұрын
I really like this video. The only real problem is that you keep referring to FastAPI, as if it were some sort of de-facto standard ASGI server in Python. I don't think this is fair. Litestar in particular is drastically more based
@ejovo
@ejovo 28 күн бұрын
FastAPI _is_ the de facto standard. Doesnt mean its the best though!
@b33thr33kay
@b33thr33kay 27 күн бұрын
Asynchronous programming is still so weird to me 😭
@abhijithalder4996
@abhijithalder4996 Ай бұрын
24k gold 🪙
Lambda in a Loop is a Code Smell
8:20
mCoding
Рет қаралды 60 М.
Python's collections.abc | InvertibleDict
14:00
mCoding
Рет қаралды 44 М.
Заметили?
00:11
Double Bubble
Рет қаралды 2,4 МЛН
Como ela fez isso? 😲
00:12
Los Wagners
Рет қаралды 29 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
Black Magic 🪄 by Petkit Pura Max #cat #cats
00:38
Sonyakisa8 TT
Рет қаралды 24 МЛН
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,7 МЛН
Why I prefer attrs over dataclasses
6:21
mCoding
Рет қаралды 60 М.
How I re-created the rhythm game osu! from scratch in C++!
5:51
Omer Hasanov
Рет қаралды 26 М.
What's new in Python 3.13?
5:08
Carberra
Рет қаралды 72 М.
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 395 М.
Async for loops in Python
16:36
mCoding
Рет қаралды 56 М.
The spelled-out intro to language modeling: building makemore
1:57:45
Andrej Karpathy
Рет қаралды 602 М.
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 10 МЛН
Карточка Зарядка 📱 ( @ArshSoni )
0:23
EpicShortsRussia
Рет қаралды 332 М.
3.5.A Solar Mobile 📱 Charger
0:39
Gaming zone
Рет қаралды 320 М.
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
Теперь это его телефон
0:21
Хорошие Новости
Рет қаралды 1,7 МЛН