Python Concurrency with asyncio teaches you to write concurrent Python code that will boost the speed of your apps and APIs. The book demystifies asynchio's unique single-threaded concurrency model, giving you a behind-the-scenes understanding of the library and its new async/await syntax. Hard-to-grok concurrency topics are broken down into simple flowcharts so you can easily see how your coroutines and tasks are running.
You'll learn to apply asyncio to solve common performance problems, such as batch database jobs, slow web servers, and scaling microservices. All examples you'll build are designed to be usable in the real world, including a clever command line SQL client that can run multiple slow queries at the same time. By the time you're done, you'll even be able to combine asyncio with traditional multiprocessing and multithreading techniques for huge improvements to performance.
what's inside
Use coroutines and tasks alongside async/await syntax to run code concurrently
Build web APIs and make concurrency web requests with aiohttp
Run thousands of SQL queries concurrently
Create a map-reduce job that can process gigabytes of data concurrently
Use threading with asyncio to mix blocking code with asyncio code
0 有用 wdpm 2023-01-23 16:29:03 广东
神作。1.深入浅出的讲解,不会过分挖入细节,也不会只讲细节不讲宏观概念。2.代码基本可以正常执行,而且一步一步从简单例子开始逐渐深入优化。3.篇幅简洁。知识密度大,在python 协程领域,目前看到的最为优秀的书籍。4. 事件轮询!under the hood。
0 有用 以地之名 2024-11-03 12:15:47 美国
我怎么感觉有点水
0 有用 Reiano 2023-07-10 09:41:38 上海
陆陆续续看完了,跳过了一章。需要花个一两天整理笔记
0 有用 菠萝地海吃菠萝 2025-10-21 14:54:25 广东
暂时先读了前 4 章,对 python 并发和协程有个初步概念。
2 有用 小卖部书记 2023-07-07 06:15:42 北京
知识密度很大,没有一句废话,深入浅出。直接我对异步的理解提高一个档次。 只不过看完头会痒,感觉要长脑子了