A Problem-Solution Approach
Buch, Englisch, 315 Seiten, Format (B × H): 155 mm x 235 mm, Gewicht: 522 g
ISBN: 978-1-4842-4400-5
Verlag: Apress
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
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.
Zielgruppe
Professional/practitioner
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Chapter 1: Preparing for the Recipes .- 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.- Appendix A: Setting up Your Environment.- Appendix B: Event Loops OS Specifics