RETIRED, further work has moved to Debian project infrastructure
Go to file
Yury Selivanov 8d79c57726 Fix Task.get_stask() for 'async def' coroutines 2015-08-14 15:29:28 -04:00
asyncio Fix Task.get_stask() for 'async def' coroutines 2015-08-14 15:29:28 -04:00
examples replace tulip with asyncio 2015-07-09 02:43:11 +02:00
tests Fix Task.get_stask() for 'async def' coroutines 2015-08-14 15:29:28 -04:00
.gitattributes Switch hgignore and hgeol to git equivalents 2015-04-11 10:30:29 -04:00
.gitignore add in .gitignore pyvenv and Pycharm files 2015-04-11 11:30:49 -04:00
.travis.yml Run asyncio with python nightly builds too on travis 2015-08-05 12:06:19 -04:00
AUTHORS replace tulip with asyncio 2015-07-09 02:43:11 +02:00
COPYING Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
ChangeLog Issue #234: Drop JoinableQueue on Python 3.5+ 2015-07-10 22:51:13 +02:00
MANIFEST.in Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
Makefile Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
README.rst replace tulip with asyncio 2015-07-09 02:43:11 +02:00
check.py Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
overlapped.c _overlapped.ConnectPipe(): release the GIL 2015-01-26 22:42:10 +01:00
pypi.bat Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
release.py Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
run_aiotest.py Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00
runtests.py replace tulip with asyncio 2015-07-09 02:43:11 +02:00
setup.py Rename README file to have rst render on Github 2015-04-11 10:08:27 -04:00
tox.ini tox.ini: enable ResourceWarning warnings 2015-01-30 00:09:48 +01:00
update_stdlib.sh Python issue #23208: Add BaseEventLoop._current_handle 2015-01-26 10:52:45 +01:00

README.rst

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.

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 Python standard 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. 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:

C> P setup.py build_ext --inplace

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:

C> P runtests.py

And coverage as follows:

C> P runtests.py --coverage