Staging: this is not the live site, pydocs.org.
Networking and Interprocess Communication
asyncio
not WASI
Symbols in asyncio
_
- _enter_task
- Enter into task execution or resume suspended task.
a
- ALL_COMPLETED
- The function will return when all futures finish or are cancelled.
- all_tasks
- Return a set of all tasks for the loop.
- as_completed
- Create an iterator of awaitables or their results in completion order.
b
- Barrier
- Asyncio equivalent to threading.Barrier
c
- capture_call_graph
- Capture the async call graph for the current task or the provided Future.
- Condition
- Asynchronous equivalent to threading.Condition.
- create_task
- Schedule the execution of a coroutine object in a spawn task.
e
- Event
- Asynchronous equivalent to threading.Event.
f
- FIRST_COMPLETED
- The function will return when any future finishes or is cancelled.
- FIRST_EXCEPTION
- The function will return when any future finishes by raising an exception.
- Future
- This class is *almost* compatible with concurrent.futures.Future.
g
- gather
- Return a future aggregating results from the given coroutines/futures.
h
- Handle
- Object returned by callback registration methods.
l
- LifoQueue
- A subclass of Queue that retrieves most recently added entries first.
- Lock
- Primitive lock objects.
- loop.add_reader
- Start monitoring the fd file descriptor for read availability and invoke callback with the specified arguments once fd is available for reading.
- loop.add_writer
- Start monitoring the fd file descriptor for write availability and invoke callback with the specified arguments args once fd is available for writing.
- loop.call_at
- Schedule callback to be called at the given absolute timestamp when (an int or a float), using the same time reference as loop.time().
- loop.call_later
- Schedule callback to be called after the given delay number of seconds (can be either an int or a float).
- loop.call_soon
- Schedule the callback callback to be called with args arguments at the next iteration of the event loop.
- loop.create_server
- Create a TCP server (socket type SOCK_STREAM) listening on port of the host address.
- loop.run_in_executor
- Arrange for func to be called in the specified executor passing args as positional arguments.
- loop.subprocess_shell
- Create a subprocess from cmd, which can be a str or a bytes string encoded to the filesystem encoding, using the platform’s “shell” syntax.
- loop.time
- Return the current time, as a float value, according to the event loop’s internal monotonic clock.
n
- new_event_loop
- Equivalent to calling get_event_loop_policy().new_event_loop().
o
- open_connection
- A wrapper for create_connection() returning a (reader, writer) pair.
p
- print_call_graph
- Print the async call graph for the current task or the provided Future.
- PriorityQueue
- A subclass of Queue; retrieves entries in priority order (lowest first).
- ProactorEventLoop
- A subclass of AbstractEventLoop for Windows that uses “I/O Completion Ports” (IOCP).
q
- Queue
- A queue, useful for coordinating producer and consumer coroutines.
- QueueEmpty
- Raised when Queue.get_nowait() is called on an empty Queue.
- QueueFull
- Raised when the Queue.put_nowait() method is called on a full Queue.
- QueueShutDown
- Raised when putting on to or getting from a shut-down Queue.
r
- run
- Execute the coroutine and return the result.
- Runner
- A context manager that controls event loop life cycle.
s
- Server
- Server objects are asynchronous context managers.
- set_event_loop
- Equivalent to calling get_event_loop_policy().set_event_loop(loop).
- shield
- Wait for a future, shielding it from cancellation.
- sleep
- Coroutine that completes after a given time (in seconds).
- start_server
- Start a socket server, call back for each client connected.
- StreamReader
- Represents a reader object that provides APIs to read data from the IO stream.
- subprocess.DEVNULL
- Special value that can be used as the stdin, stdout or stderr argument to process creation functions.
- subprocess.Process
- An object that wraps OS processes created by the create_subprocess_exec() and create_subprocess_shell() functions.
- subprocess.STDOUT
- Special value that can be used as the stderr argument and indicates that standard error should be redirected into standard output.
- SubprocessTransport
- An abstraction to represent a connection between a parent and its child OS process.
t
- Task
- A coroutine wrapped in a Future.
- TaskGroup
- Asynchronous context manager for managing groups of tasks.
- timeout
- Timeout async context manager.
- Timeout
- Asynchronous context manager for cancelling overdue coroutines.
- TimerHandle
- Object returned by timed callback registration methods.
- to_thread
- Asynchronously run function *func* in a separate thread.
- Transport
- Interface representing a bidirectional transport.
w
- wait
- Wait for the Futures or Tasks given by fs to complete.
- wait_for
- Wait for the single Future or coroutine to complete, with timeout.