asyncio Recipes: A Problem-Solution Approach
Book information
Description
Get the most out of asyncio and find solutions to your most troubling Python programming problems. This book offers a pragmatic collection of recipes by going beyond online resources and docs to provide guidance on using this complex library. As such, you’ll see how to improve application performance and run computationally intensive programs faster. asyncio Recipes starts with examples illustrating the primitives that come with the asyncio library, and explains how to determine if asyncio is the right choice for your application. It shows how to use asyncio to yield performance gains without multiple threads, and identifies common mistakes and how to prevent them. Later chapters cover error-handling, testing, and debugging. By the end of this book, you'll understand how asyncio runs behind the scenes, and be confident enough to contribute to asyncio-first projects. What You Will LearnDiscover quirky APIs such as the event loop policiesWrite asyncio code with native coroutines Use the ast module to find legacy asyncio codeWork with contextvars See what a async context manager is and why a lot of asyncio APIs use them Who This Book Is For Experienced Python developers or hobbyists who want to understand asyncio and speed up their applications by adding concurrency to their toolkit. Front Matter ....Pages i-xxvi Preparing for the Recipes (Mohamed Mustapha Tahrioui)....Pages 1-4 Working with Event Loops (Mohamed Mustapha Tahrioui)....Pages 5-48 Working with Coroutines and Async/Await (Mohamed Mustapha Tahrioui)....Pages 49-75 Working with Async Generators (Mohamed Mustapha Tahrioui)....Pages 77-95 Working with Async Context Manager (Mohamed Mustapha Tahrioui)....Pages 97-112 Communication Between Asyncio Components (Mohamed Mustapha Tahrioui)....Pages 113-145 Synchronization Between Asyncio Components (Mohamed Mustapha Tahrioui)....Pages 147-164 Improving Asyncio Applications (Mohamed Mustapha Tahrioui)....Pages 165-205 Working with Network Protocols (Mohamed Mustapha Tahrioui)....Pages 207-253 Preventing Common Asyncio Mistakes (Mohamed Mustapha Tahrioui)....Pages 255-291 Back Matter ....Pages 293-315
Similar books
Crafting Interpreters
2021 · PDF
Coordination Models and Languages: 22nd IFIP WG 6.1 International Conference, COORDINATION 2020, Held as Part of the 15th International Federated Conference on Distributed Computing Techniques, DisCoTec 2020, Valletta, Malta, June 15–19, 2020, Proceedings
2020 · PDF
Trends in Functional Programming: 21st International Symposium, TFP 2020, Krakow, Poland, February 13–14, 2020, Revised Selected Papers
2020 · PDF
Runtime Verification: 20th International Conference, RV 2020, Los Angeles, CA, USA, October 6–9, 2020, Proceedings
2020 · PDF
XcalableMP PGAS Programming Language: From Programming Model to Applications
2021 · PDF
Getting Structured Data from the Internet: Running Web Crawlers/Scrapers on a Big Data Production Scale
2020 · PDF
Learn PHP 8: Using MySQL, JavaScript, CSS3, and HTML5
2020 · PDF
Beginning Ring Programming: From Novice to Professional
2020 · PDF