(сетевой с №3-2015)
(сетевой с №2-2015)
|Articles and journals | Tariffs | Payments | Your profile|
Practical use of asynchronous programming in Python with Asyncio
Abstract.The subject of the study is the study of the basic principles of asynchronous programming with the Asyncio package and their application for solving applied problems in Python. Since the Python interpreter uses the Global Interpreter Lock synchronization method, which limits the ability to parallelize programs in the given language and, as a result, does not allow achieving the greatest efficiency, the use of asynchronous programming technologies allows to significantly increase the speed of programs in this language, avoiding the mentioned limitations. The above described approach to creating programs is used in many tasks, for example: when creating a web server, client-server application, when extracting data from a resource by a web crawler. This paper is devoted to explaining the basic principles of working with the packageAsyncio in Python. Since the Russian-language literature on this package is often not enough to understand the basics of asynchronous programming in Python, this article gives examples of the use of this technology with explanations.
Keywords: scraping, couroutines, parsing, web-crawling, asynchronous programming, asyncio library, python programming language, GIL, parallel computing, data extraction
Article was received:27-03-2018
This article written in Russian. You can find full text of article in Russian here .