Async application classes vs. functions

Published: 06 May 2024
on channel: mCoding
10,732
675

To function or to class?

According to the spec, an ASGI application is an async callable, but when we use FastAPI, Starlette, or other ASGI frameworks, that callable is hidden in plain sight. In this video, we see how it's possible to use an application class instead of a literal async def function, and we go over reasons for preferring the class approach.

― mCoding with James Murphy (https://mcoding.io)

Source code: https://github.com/mCodingLLC/VideosS...
ASGI Spec: https://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.)
https://www.paypal.com/donate/?hosted...

Want to donate crypto? Check out the rest of my supported donations on my website!
https://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: https://github.com/mCodingLLC/
Reddit:   / mcoding  
Facebook:   / james.mcoding  


Watch video Async application classes vs. functions online without registration, duration hours minute second in high quality. This video was added by user mCoding 06 May 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10,732 once and liked it 675 people.