Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
/asyncioPublic archive

asyncio historical repository

NotificationsYou must be signed in to change notification settings

python/asyncio

 
 

Repository files navigation

https://travis-ci.org/python/asyncio.svg?branch=masterhttps://ci.appveyor.com/api/projects/status/u72781t69ljdpm2y?svg=true

The asyncio module provides infrastructure for writing single-threadedconcurrent code using coroutines, multiplexing I/O access over sockets andother resources, running network clients and servers, and other relatedprimitives. 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, andothers (some may be system-dependent);
  • a Future class that mimics the one in the concurrent.futures module, butadapted for use with the event loop;
  • coroutines and tasks based onyield from (PEP 380), to help writeconcurrent 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 youabsolutely, positively have to use a library that makes blocking I/O calls.

Note: The implementation of asyncio was previously called "Tulip".

Installation

To install asyncio, type:

pip install asyncio

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

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

Websites

Development

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

To run tests, run:

tox

Or use the Makefile:

make test

To run coverage (coverage package is required):

make coverage

On Windows, things are a little more complicated. AssumeP is yourPython binary (for exampleC:\Python33\python.exe).

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

C:\> P setup.py build_ext --inplace

If this complains about vcvars.bat, you probably don't have therequired version of Visual Studio installed. Compiling extensions forPython 3.3 requires Microsoft Visual C++ 2010 (MSVC 10.0) of anyedition; you can download Visual Studio Express 2010 for free fromhttp://www.visualstudio.com/downloads (scroll down to Visual C++ 2010Express).

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

C:\> P runtests.py

And coverage as follows:

C:\> P runtests.py --coverage

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp