asyncio Recipes: A Problem-Solution Approach

PDF
- eBook:asyncio Recipes: A Problem-Solution Approach
- Author:Mohamed Mustapha Tahrioui
- Edition:1st ed. edition
- Categories:
- Data:June 15, 2019
- ISBN:1484244001
- ISBN-13:9781484244005
- Language:English
- Pages:315 pages
- Format:PDF
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 Learn
- Discover quirky APIs such as the event loop policies
- Write asyncio code with native coroutines
- Use the ast module to find legacy asyncio code
- Work with contextvars
- See what a async context manager is and why a lot of asyncio APIs use them
Experienced Python developers or hobbyists who want to understand asyncio and speed up their applications by adding concurrency to their toolkit.
-
Content
Chapter 2: Working with Event Loops
Chapter 3: Working with Coroutines and Async/Await
Chapter 4: Working with Async Generators
Chapter 5: Working with Async Context Manager
Chapter 6: Communication Between Asyncio Components
Chapter 7: Synchronization Between Asyncio Components
Chapter 8: Improving Asyncio Applications
Chapter 9: Working with Network Protocols
Chapter 10: Preventing Common Asyncio Mistakes
Free sample
-