Asyncio python 3 install

asyncio — Asynchronous I/O¶

asyncio is a library to write concurrent code using the async/await syntax.

asyncio is used as a foundation for multiple Python asynchronous frameworks that provide high-performance network and web-servers, database connection libraries, distributed task queues, etc.

asyncio is often a perfect fit for IO-bound and high-level structured network code.

asyncio provides a set of high-level APIs to:

  • run Python coroutines concurrently and have full control over their execution;
  • perform network IO and IPC ;
  • control subprocesses ;
  • distribute tasks via queues ;
  • synchronize concurrent code;

Additionally, there are low-level APIs for library and framework developers to:

  • create and manage event loops , which provide asynchronous APIs for networking , running subprocesses , handling OS signals , etc;
  • implement efficient protocols using transports ;
  • bridge callback-based libraries and code with async/await syntax.

You can experiment with an asyncio concurrent context in the REPL:

$ python -m asyncio asyncio REPL . Use "await" directly instead of "asyncio.run()". Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio >>> await asyncio.sleep(10, result='hello') 'hello' 

This module does not work or is not available on WebAssembly platforms wasm32-emscripten and wasm32-wasi . See WebAssembly platforms for more information.

Источник

asyncio 3.4.3

The asyncio module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. Here is a more detailed list of the package contents:

  • a pluggable event loop with various system-specific implementations;
  • transport and protocol abstractions (similar to those in Twisted);
  • concrete support for TCP, UDP, SSL, subprocess pipes, delayed calls, and others (some may be system-dependent);
  • a Future class that mimics the one in the concurrent.futures module, but adapted for use with the event loop;
  • coroutines and tasks based on yield from (PEP 380), to help write concurrent code in a sequential fashion;
  • cancellation support for Futures and coroutines;
  • synchronization primitives for use between coroutines in a single thread, mimicking those in the threading module;
  • an interface for passing work off to a threadpool, for times when you absolutely, positively have to use a library that makes blocking I/O calls.
Читайте также:  Язык html основные понятия языка

Note: The implementation of asyncio was previously called “Tulip”.

Installation

asyncio requires Python 3.3 or later! The asyncio module is part of the Python standard library since Python 3.4.

asyncio is a free software distributed under the Apache license version 2.0.

Websites

  • asyncio project at GitHub: source code, bug tracker
  • asyncio documentation
  • Mailing list: python-tulip Google Group
  • IRC: join the #asyncio channel on the Freenode network

Development

The actual code lives in the ‘asyncio’ subdirectory. Tests are in the ‘tests’ subdirectory.

To run coverage (coverage package is required):

On Windows, things are a little more complicated. Assume ‘P’ is your Python binary (for example C:Python33python.exe).

You must first build the _overlapped.pyd extension and have it placed in the asyncio directory, as follows:

If this complains about vcvars.bat, you probably don’t have the required version of Visual Studio installed. Compiling extensions for Python 3.3 requires Microsoft Visual C++ 2010 (MSVC 10.0) of any edition; you can download Visual Studio Express 2010 for free from http://www.visualstudio.com/downloads (scroll down to Visual C++ 2010 Express).

Once you have built the _overlapped.pyd extension successfully you can run the tests as follows:

Источник

asyncio

reference implementation of PEP 3156 For more information about how to use this package see README

PyPI

GitHub

Ensure you’re using the healthiest python packages

Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice

Package Health Score

Explore Similar Packages

Popularity

Total Weekly Downloads (636,929)

Direct Usage Popularity

The PyPI package asyncio receives a total of 636,929 downloads a week. As such, we scored asyncio popularity level to be Influential project. Based on project statistics from the GitHub repository for the PyPI package asyncio, we found that it has been starred 1,016 times. The download numbers shown are the average weekly downloads from the last 6 weeks.

Читайте также:  Invokedynamic java что это

Security

Security and license risk for latest version

All security vulnerabilities belong to production dependencies of direct and indirect packages.

We found a way for you to contribute to the project! Looks like asyncio is missing a security policy.

You can connect your project’s repository to Snyk to stay up to date on security alerts and receive automatic fix pull requests.

Maintenance

Commit Frequency

Further analysis of the maintenance status of asyncio based on released PyPI versions cadence, the repository activity, and other data points determined that its maintenance is Inactive.

An important project maintenance signal to consider for asyncio is that it hasn’t seen any new versions released to PyPI in the past 12 months, and could be considered as a discontinued project, or that which receives low attention from its maintainers.

In the past month we didn’t find any pull request activity or change in issues status has been detected for the GitHub repository.

Community

This project has seen only 10 or less contributors.

Embed Package Health Score Badge

Keep your project healthy

Check your requirements.txt

Snyk Vulnerability Scanner

Package

Readme

  • a pluggable event loop with various system-specific implementations;
  • transport and protocol abstractions (similar to those in Twisted);
  • concrete support for TCP, UDP, SSL, subprocess pipes, delayed calls, and others (some may be system-dependent);
  • a Future class that mimics the one in the concurrent.futures module, but adapted for use with the event loop;
  • coroutines and tasks based on yield from (PEP 380), to help write concurrent code in a sequential fashion;
  • cancellation support for Futures and coroutines;
  • synchronization primitives for use between coroutines in a single thread, mimicking those in the threading module;
  • an interface for passing work off to a threadpool, for times when you absolutely, positively have to use a library that makes blocking I/O calls.
Читайте также:  Javascript get type name

Note: The implementation of asyncio was previously called «Tulip».

Installation

asyncio requires Python 3.3 or later! The asyncio module is part of the Python standard library since Python 3.4.

asyncio is a free software distributed under the Apache license version 2.0.

Websites

  • asyncio project at GitHub: source code, bug tracker
  • asyncio documentation
  • Mailing list: python-tulip Google Group
  • IRC: join the #asyncio channel on the Freenode network

Development

The actual code lives in the ‘asyncio’ subdirectory. Tests are in the ‘tests’ subdirectory.

To run coverage (coverage package is required):

On Windows, things are a little more complicated. Assume ‘P’ is your Python binary (for example C:Python33python.exe).

You must first build the _overlapped.pyd extension and have it placed in the asyncio directory, as follows:

If this complains about vcvars.bat, you probably don’t have the required version of Visual Studio installed. Compiling extensions for Python 3.3 requires Microsoft Visual C++ 2010 (MSVC 10.0) of any edition; you can download Visual Studio Express 2010 for free from (scroll down to Visual C++ 2010 Express).

Once you have built the _overlapped.pyd extension successfully you can run the tests as follows:

FAQs

What is asyncio?

reference implementation of PEP 3156. Visit Snyk Advisor to see a full health score report for asyncio, including popularity, security, maintenance & community analysis.

The python package asyncio receives a total of 636,929 weekly downloads. As such, asyncio popularity was classified as an influential project. Visit the popularity section on Snyk Advisor to see the full health analysis.

Is asyncio well maintained?

We found indications that asyncio is an Inactive project. See the full package health analysis to learn more about the package maintenance status.

Is asyncio safe to use?

The python package asyncio was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as safe to use. See the full health analysis review.

Источник

Оцените статью