Walk Through Coroutines in Python

Anustup


1

Vote

Description:

AsyncIO uses coroutines to deliver high performance from a single thread. But coroutines can be mysterious. How do they work? Starting from first principles, we’ll take a look at the basic concepts of coroutines and the unique problems they solve, then finish by deconstructing the core pieces of the AsyncIO framework. This talk is for developers of all backgrounds. No CS degree required

In short , in this talk will start with basic concepts of functions, including how they are represented in memory, how state is tracked, and how function calls interact with the stack. We’ll then cover the common methods of running multiple functions concurrently, as well as the benefits and difficulties of concurrency in Python.

We’ll then introduce the concept of coroutines, a variant of functions, and discuss how coroutines manage state and execution differently from functions. We’ll show some high level examples of coroutines that communicate with each other, and look at how they can be of use for I/O bound workloads.

Then we’ll finish by showing how coroutines are implemented in Python, what the async/await keywords are actually doing when you use them in your code, and how all of these concepts are leveraged by the AsyncIO framework to build high performance applications in modern, clean Python.

OutLine for this Talk :(40 mins)

  • Brief intro and start of What is a Coroutine ?(5 mins)
  • Relating a Function with Coroutines in Python(7 mins)
  • Concept of "Stack" Base Virtual machines and speed up your ML models with Coroutines -- Cpython(7 mins)
  • Start with Concurrency and cooperative Multitasking with coroutines(6 mins)
  • Start with Generators and concept of AsyncIO(5 mins)
  • Short concept with asynchronous programming with Coroutines in micro python (5 mins)
  • Short example with AsyncIO in Lynroot Python and speed up application (5 mins)
  • Ending Note (last 2 mins)

By the end of this talk , folks will understand a complete concept and implementations of Coroutines and asynchronous programming with real world developing in python and its advancements .

Prerequisites:

Prerequisite for this talk are :

  • Basic understanding and programming experience with Python
  • Understanding of Basic developing knowledge
  • Basic understanding of Data Structures and interest in Python

no other prerequisite , since anyone can learn and understand from this talk and explore python in a new way .

Video URL:

https://youtu.be/vF-p3-HlI9c

Content URLs:

Slide of proposed talk : Click Here To find

Complete code and required files of my talk : Github Repo -clickHere

Speaker Info:

About me :

II I am Machine Learning Developer formerly at @Metvy II AI Researcher formerly @IIT Bombay , worked with many research projects along with freelancing too II Patent Holder with publications II,Mentored both national and international level students , many Hackathons as well technical event, speaker II Entrepreneur @ Founder & CEO of Mankibaat.pvt.ltd , NorthIndias Fastest grown AI startup II Former Winter Intern @ IIT Patna , Tech head @Girlscript India II Full stack developer II

Speaker Links:

Find me at :

Linkedin

Github

Section: Core Python
Type: Talks
Target Audience: Intermediate
Last Updated: