Using Asyncio in Python: Understanding Python's Asynchronous Programming Features

Hattingh, Caleb

買這商品的人也買了...

相關主題

商品描述

If you're among the Python developers put off by Asyncio's complexity, it's time to take another look. Asyncio is complicated because it aims to solve problems in concurrent network programming for both framework developers and end-user developers like you. The features you need to consider are a small subset of the whole Asyncio API, but picking out the right features is the tricky part. That's where this practical book comes in.

Veteran Python developer Caleb Hattingh helps end-user developers gain a basic understanding of Asyncio's building blocks--enough to get you started writing simple event-based programs. You'll learn why Asyncio offers a safer alternative to preemptive multitasking (threading) and how this API provides a simple way to support thousands of simultaneous socket connections.

  • Get a critical comparison of Asyncio and threading for concurrent network programming
  • Take an Asyncio walkthrough, including a quickstart guide to help you hit the ground looping with event-based programming
  • Learn the difference between Asyncio features for end-user developers and those for framework developers
  • Understand Asyncio's new async/await language syntax, including coroutines and task and future APIs
  • Get detailed case studies (with code) of some popular Asyncio-compatible third-party libraries

商品描述(中文翻譯)

如果你是一位對於Asyncio的複雜性感到困惑的Python開發者,那麼現在是重新評估的時候了。Asyncio之所以複雜,是因為它旨在解決同時適用於框架開發者和終端用戶開發者(像你一樣)的並發網絡編程問題。你需要考慮的功能只是整個Asyncio API的一小部分,但選擇合適的功能是棘手的部分。這就是這本實用書的用途所在。

資深Python開發者Caleb Hattingh幫助終端用戶開發者獲得對Asyncio的基本理解,足以讓你開始編寫簡單的基於事件的程序。你將學習為什麼Asyncio提供了一種比抢占式多任務(線程)更安全的替代方案,以及這個API如何提供一種簡單的方式來支持數千個同時的套接字連接。

- 獲得Asyncio和線程的並發網絡編程的關鍵比較
- 進行Asyncio的實際操作,包括快速入門指南,幫助你開始使用基於事件的編程
- 理解終端用戶開發者和框架開發者之間的Asyncio功能差異
- 理解Asyncio的新的async/await語言語法,包括協程和任務和未來API
- 獲得一些流行的與Asyncio兼容的第三方庫的詳細案例研究(包括代碼)

作者簡介

Caleb Hattingh is passionate about coding and has been programming for over 20 years, specializing in Python. He holds a master's degree in chemical engineering and has consequently written a great deal of scientific software within chemical engineering, from dynamic chemical reactor models all the way through to data analysis. He is very experienced with the Python scientific software stack, as well as CRM, financial software development in the hospitality industry, GPS tracking, natural-language processing, and various other projects.

作者簡介(中文翻譯)

Caleb Hattingh熱愛編程,已經從事編程工作超過20年,專攻Python。他擁有化學工程碩士學位,因此在化學工程領域撰寫了大量科學軟件,從動態化學反應器模型到數據分析。他在Python科學軟件堆棧、CRM、酒店業金融軟件開發、GPS追蹤、自然語言處理和其他各種項目方面具有豐富的經驗。