Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « asyncio »

Liste des classes du module asyncio

Nom de la classe Description
AbstractChildWatcher Abstract base class for monitoring child processes. [extrait de AbstractChildWatcher.__doc__]
AbstractEventLoop Abstract event loop. [extrait de AbstractEventLoop.__doc__]
AbstractEventLoopPolicy Abstract policy for accessing the event loop. [extrait de AbstractEventLoopPolicy.__doc__]
AbstractServer Abstract server returned by create_server(). [extrait de AbstractServer.__doc__]
Barrier Asyncio equivalent to threading.Barrier [extrait de Barrier.__doc__]
BaseEventLoop
BaseProtocol Common base class for protocol interfaces. [extrait de BaseProtocol.__doc__]
BaseTransport Base class for transports. [extrait de BaseTransport.__doc__]
BoundedSemaphore A bounded semaphore implementation. [extrait de BoundedSemaphore.__doc__]
BufferedProtocol Interface for stream protocol with manual buffer control. [extrait de BufferedProtocol.__doc__]
Condition Asynchronous equivalent to threading.Condition. [extrait de Condition.__doc__]
DatagramProtocol Interface for datagram protocol. [extrait de DatagramProtocol.__doc__]
DatagramTransport Interface for datagram (UDP) transports. [extrait de DatagramTransport.__doc__]
Event Asynchronous equivalent to threading.Event. [extrait de Event.__doc__]
FastChildWatcher 'Fast' child watcher implementation. [extrait de FastChildWatcher.__doc__]
Future This class is *almost* compatible with concurrent.futures.Future. [extrait de Future.__doc__]
Handle Object returned by callback registration methods. [extrait de Handle.__doc__]
LifoQueue A subclass of Queue that retrieves most recently added entries first. [extrait de LifoQueue.__doc__]
Lock Primitive lock objects. [extrait de Lock.__doc__]
MultiLoopChildWatcher A watcher that doesn't require running loop in the main thread. [extrait de MultiLoopChildWatcher.__doc__]
PidfdChildWatcher Child watcher implementation using Linux's pid file descriptors. [extrait de PidfdChildWatcher.__doc__]
PriorityQueue A subclass of Queue; retrieves entries in priority order (lowest first). [extrait de PriorityQueue.__doc__]
Protocol Interface for stream protocol. [extrait de Protocol.__doc__]
Queue A queue, useful for coordinating producer and consumer coroutines. [extrait de Queue.__doc__]
ReadTransport Interface for read-only transports. [extrait de ReadTransport.__doc__]
Runner A context manager that controls event loop life cycle. [extrait de Runner.__doc__]
SafeChildWatcher 'Safe' child watcher implementation. [extrait de SafeChildWatcher.__doc__]
Semaphore A Semaphore implementation. [extrait de Semaphore.__doc__]
Server
StreamReader
StreamReaderProtocol Helper class to adapt between Protocol and StreamReader. [extrait de StreamReaderProtocol.__doc__]
StreamWriter Wraps a Transport. [extrait de StreamWriter.__doc__]
SubprocessProtocol Interface for protocol for subprocess calls. [extrait de SubprocessProtocol.__doc__]
SubprocessTransport
Task A coroutine wrapped in a Future. [extrait de Task.__doc__]
TaskGroup Asynchronous context manager for managing groups of tasks. [extrait de TaskGroup.__doc__]
ThreadedChildWatcher Threaded child watcher implementation. [extrait de ThreadedChildWatcher.__doc__]
Timeout Asynchronous context manager for cancelling overdue coroutines. [extrait de Timeout.__doc__]
TimerHandle Object returned by timed callback registration methods. [extrait de TimerHandle.__doc__]
Transport Interface representing a bidirectional transport. [extrait de Transport.__doc__]
WriteTransport Interface for write-only transports. [extrait de WriteTransport.__doc__]

Liste des exceptions du module asyncio

Nom de la classe d'exception Description
BrokenBarrierError Barrier is broken by barrier.abort() call. [extrait de BrokenBarrierError.__doc__]
CancelledError The Future or Task was cancelled. [extrait de CancelledError.__doc__]
IncompleteReadError
InvalidStateError The operation is not allowed in this state. [extrait de InvalidStateError.__doc__]
LimitOverrunError Reached the buffer limit while looking for a separator. [extrait de LimitOverrunError.__doc__]
QueueEmpty Raised when Queue.get_nowait() is called on an empty Queue. [extrait de QueueEmpty.__doc__]
QueueFull Raised when the Queue.put_nowait() method is called on a full Queue. [extrait de QueueFull.__doc__]
SendfileNotAvailableError Sendfile syscall is not available. [extrait de SendfileNotAvailableError.__doc__]
TimeoutError Timeout expired. [extrait de TimeoutError.__doc__]

Liste des fonctions du module asyncio

Signature de la fonction Description
all_tasks(loop=None) Return a set of all tasks for the loop. [extrait de all_tasks.__doc__]
as_completed(fs, *, timeout=None) Return an iterator whose values are coroutines. [extrait de as_completed.__doc__]
create_subprocess_exec(program, *args, stdin=None, stdout=None, stderr=None, limit=65536, **kwds)
create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, limit=65536, **kwds)
create_task(coro, *, name=None, context=None) Schedule the execution of a coroutine object in a spawn task. [extrait de create_task.__doc__]
current_task(loop=None) Return a currently executed task. [extrait de current_task.__doc__]
ensure_future(coro_or_future, *, loop=None) Wrap a coroutine or an awaitable in a future. [extrait de ensure_future.__doc__]
gather(*coros_or_futures, return_exceptions=False) Return a future aggregating results from the given coroutines/futures. [extrait de gather.__doc__]
get_child_watcher() Equivalent to calling get_event_loop_policy().get_child_watcher(). [extrait de get_child_watcher.__doc__]
get_event_loop() Return an asyncio event loop. [extrait de get_event_loop.__doc__]
get_event_loop_policy() Get the current event loop policy. [extrait de get_event_loop_policy.__doc__]
get_running_loop() Return the running event loop. Raise a RuntimeError if there is none. [extrait de get_running_loop.__doc__]
iscoroutine(obj) Return True if obj is a coroutine object. [extrait de iscoroutine.__doc__]
iscoroutinefunction(func) Return True if func is a decorated coroutine function. [extrait de iscoroutinefunction.__doc__]
isfuture(obj) Check for a Future. [extrait de isfuture.__doc__]
new_event_loop() Equivalent to calling get_event_loop_policy().new_event_loop(). [extrait de new_event_loop.__doc__]
open_connection(host=None, port=None, *, limit=65536, **kwds) A wrapper for create_connection() returning a (reader, writer) pair. [extrait de open_connection.__doc__]
open_unix_connection(path=None, *, limit=65536, **kwds) Similar to `open_connection` but works with UNIX Domain Sockets. [extrait de open_unix_connection.__doc__]
run(main, *, debug=None) Execute the coroutine and return the result. [extrait de run.__doc__]
run_coroutine_threadsafe(coro, loop) Submit a coroutine object to a given event loop. [extrait de run_coroutine_threadsafe.__doc__]
set_child_watcher(watcher) Equivalent to calling [extrait de set_child_watcher.__doc__]
set_event_loop(loop) Equivalent to calling get_event_loop_policy().set_event_loop(loop). [extrait de set_event_loop.__doc__]
set_event_loop_policy(policy) Set the current event loop policy. [extrait de set_event_loop_policy.__doc__]
shield(arg) Wait for a future, shielding it from cancellation. [extrait de shield.__doc__]
sleep(delay, result=None) Coroutine that completes after a given time (in seconds). [extrait de sleep.__doc__]
start_server(client_connected_cb, host=None, port=None, *, limit=65536, **kwds) Start a socket server, call back for each client connected. [extrait de start_server.__doc__]
start_unix_server(client_connected_cb, path=None, *, limit=65536, **kwds) Similar to `start_server` but works with UNIX Domain Sockets. [extrait de start_unix_server.__doc__]
timeout(delay: Optional[float]) -> asyncio.timeouts.Timeout Timeout async context manager. [extrait de timeout.__doc__]
timeout_at(when: Optional[float]) -> asyncio.timeouts.Timeout Schedule the timeout at absolute time. [extrait de timeout_at.__doc__]
to_thread(func, /, *args, **kwargs) Asynchronously run function *func* in a separate thread. [extrait de to_thread.__doc__]
wait(fs, *, timeout=None, return_when='ALL_COMPLETED') Wait for the Futures or Tasks given by fs to complete. [extrait de wait.__doc__]
wait_for(fut, timeout) Wait for the single Future or coroutine to complete, with timeout. [extrait de wait_for.__doc__]
wrap_future(future, *, loop=None) Wrap concurrent.futures.Future object. [extrait de wrap_future.__doc__]

Liste des variables globales du module asyncio

Nom de la variable globale Valeur
ALL_COMPLETED ALL_COMPLETED
FIRST_COMPLETED FIRST_COMPLETED
FIRST_EXCEPTION FIRST_EXCEPTION

Liste des alias du module asyncio

Nom de l'alias Définition ciblée
DefaultEventLoopPolicy _UnixDefaultEventLoopPolicy
SelectorEventLoop _UnixSelectorEventLoop