Skip to Content
PythonでのAsyncioの使用
book

PythonでのAsyncioの使用

by Caleb Hattingh
March 2025
Intermediate to advanced
166 pages
2h 26m
Japanese
O'Reilly Media, Inc.
Content preview from PythonでのAsyncioの使用

第5章 おわりに

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

Pythonに大きな新機能が登場すると、誰にとっても新しいものになる。 私はPythonを20年近く使った経験があるが、それでもAsyncioを学ぶのは難しいと感じた。以前のプロジェクトですでにTwistedとTornadoを使っていたので、イベントベースのプログラミングは目新しいものではなかったことを考慮に入れてもだ。asyncio APIは予想以上に複雑だと発見した。その一因は、高レベルのドキュメントが不足していたことにある。

PythonでAsyncioの使い方を学ぶのに時間を費やした今、私はAsyncioをより快適に感じている。APIの設計の背後には首尾一貫した構造と目的があり、願わくばこの本があなたにとって、私よりもずっと学びやすくしてくれることを願っている。基本的な理解ができたことで、常にドキュメントを参照することなく、新しいAsyncioベースのコードを書くことが非常に簡単になった。

しかし、まだ荒削りな部分もある。asyncio 標準ライブラリは、フレームワーク設計者とエンドユーザ開発者の両方に対応しているため、大規模できめ細かいAPIを持ち続けるだろう。つまり、エンドユーザ開発者である我々は、APIのどの部分が我々に適用され、どの部分が適用されないかを学ばなければならない。やがて、asyncio のサードパーティーライブラリーエコシステムが成長し成熟するにつれて、私たちは生のasyncio 標準ライブラリーAPIではなく、それらのライブラリーAPIを使って作業することになるだろう。aiohttp 、Sanicのような既存のライブラリはその良い例である。また、asyncio API自体も、より多くの人々がAPIを使いこなすにつれて改良され続けるだろう。

偶然にも、この本を書いているのと同じ時期にZeroMQを最終的に学ぶ必要があることがわかったし、asynciopyzmq を組み合わせると、ネットワーク・プログラミングが楽しくなることも発見した。Asyncioを学ぶ最良の方法として私がお勧めするのは、実験して、いろいろ試して、楽しむことだ。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

実践的レイクハウス・アーキテクチャー

実践的レイクハウス・アーキテクチャー

Gaurav Ashok Thalpati
ファストAPI

ファストAPI

Bill Lubanovic
DevOpsのためのPython

DevOpsのためのPython

Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu

Publisher Resources

ISBN: 9798341635036