MCPcopy Index your code

hub / github.com/agronholm/anyio / functions

Functions2,134 in github.com/agronholm/anyio

↓ 190 callersFunctioncreate_task_group
Create a task group. :return: a task group :raises NoEventLoopError: if no supported asynchronous event loop is running in the c
src/anyio/_core/_tasks.py:194
↓ 180 callersMethodstart_soon
Start a new task in this task group. :param func: a coroutine function :param args: positional arguments to call the functio
src/anyio/abc/_tasks.py:124
↓ 138 callersMethodcancel
Cancel this task group's cancel scope immediately. This is a shortcut for calling ``.cancel_scope.cancel()`` on the task group.
src/anyio/abc/_tasks.py:91
↓ 138 callersMethodclose
Shutdown and close event loop.
src/anyio/_backends/_asyncio.py:158
↓ 119 callersMethodextra
(self, attribute: T_Attr)
src/anyio/_core/_typedattr.py:53
↓ 107 callersFunctioncheckpoint
Check for cancellation and allow the scheduler to switch to another task. Equivalent to (but more efficient than):: await checkpoin
src/anyio/lowlevel.py:26
↓ 101 callersMethodreceive
(self, max_bytes: int = 65536)
tests/streams/test_stapled.py:29
↓ 94 callersFunctionwait_all_tasks_blocked
Wait until all other tasks are waiting for something.
src/anyio/_core/_testing.py:80
↓ 79 callersMethodsend
(self, item: bytes)
tests/streams/test_stapled.py:46
↓ 70 callersMethodappend
(x: int, task_status: TaskStatus)
tests/test_synchronization.py:849
↓ 62 callersFunctionsleep
Pause the current task for the specified duration. :param delay: the duration, in seconds
src/anyio/_core/_eventloop.py:88
↓ 60 callersMethodwait
(self)
src/anyio/_backends/_trio.py:709
↓ 59 callersMethodaclose
(self)
tests/streams/test_stapled.py:52
↓ 59 callersMethodstart
( self, func: Callable[..., Coroutine[Any, Any, T_co]], *args: object, name: o
src/anyio/abc/_tasks.py:147
↓ 57 callersFunctionget_async_backend
(asynclib_name: str | None = None)
src/anyio/_core/_eventloop.py:191
↓ 49 callersMethodget
(self, default: D)
src/anyio/lowlevel.py:159
↓ 46 callersMethodset
Set the value of this run variable for the current event loop. :param value: the new value :return: a token that can be used
src/anyio/lowlevel.py:187
↓ 45 callersFunctioncollect
(iterator: AsyncIterator[T])
tests/test_itertools.py:46
↓ 43 callersMethodmatch
( self, path_pattern: str, *, case_sensitive: bool | None = None )
src/anyio/_core/_fileio.py:488
↓ 41 callersFunctionfunc
()
tests/test_lowlevel.py:20
↓ 39 callersMethodstarted
(self: TaskStatus[None])
src/anyio/abc/_tasks.py:62
↓ 38 callersFunctionaiter_from
(iterable: Iterable[T])
tests/test_itertools.py:69
↓ 37 callersMethodaccept
Accept an incoming connection.
src/anyio/abc/_sockets.py:265
↓ 35 callersFunctionconnect_tcp
( remote_host: IPAddressType, remote_port: int, *, local_host: IPAddressType | None = ...,
src/anyio/_core/_sockets.py:64
↓ 33 callersMethodcreate_task
Create a new task from a coroutine object and schedule it to run. :param coro: a coroutine object :param name: optional name
src/anyio/abc/_tasks.py:105
↓ 31 callersMethodstatistics
(self)
src/anyio/_backends/_trio.py:770
↓ 28 callersFunctionassert_cancelled_on_first_next
(iterator: AsyncIterator[Any])
tests/test_itertools.py:73
↓ 28 callersFunctionfail_after
Create a context manager which raises a :class:`TimeoutError` if does not finish in time. :param delay: maximum allowed time (in seconds
src/anyio/_core/_tasks.py:133
↓ 27 callersFunctionget_cancelled_exc_class
Return the current async library's cancellation exception class. :raises NoEventLoopError: if no supported asynchronous event loop is runnin
src/anyio/_core/_eventloop.py:162
↓ 27 callersFunctionstart_blocking_portal
Start a new event loop in a new thread and run a blocking portal in its main task. The parameters are the same as for :func:`~anyio.run`.
src/anyio/from_thread.py:504
↓ 25 callersFunction_iterate
(iterable: Iterable[T] | AsyncIterable[T])
src/anyio/itertools.py:66
↓ 25 callersMethodcheckpoint
(cls)
src/anyio/_backends/_asyncio.py:2451
↓ 24 callersMethodfrom_socket
Wrap an existing socket object or file descriptor as a UDP socket. The newly created socket wrapper takes ownership of the socket be
src/anyio/abc/_sockets.py:292
↓ 23 callersFunctionget_current_task
Return the current task. :return: a representation of the current task :raises NoEventLoopError: if no supported asynchronous event loop
src/anyio/_core/_testing.py:56
↓ 23 callersMethodsleep
Pause the current task for the specified duration. :param delay: the duration, in seconds
src/anyio/abc/_eventloop.py:134
↓ 23 callersMethodwrite_text
( self, data: str, encoding: str | None = None, errors: str | None = None,
src/anyio/_core/_fileio.py:943
↓ 22 callersMethodcall
( self, func: Callable[..., T_Retval], args: tuple[Any, ...], )
src/anyio/to_interpreter.py:47
↓ 21 callersMethodadd
(a: int, b: int)
tests/test_itertools.py:854
↓ 21 callersFunctionconnect_unix
Connect to the given UNIX socket. Not available on Windows. :param path: path to the socket :return: a socket stream object :ra
src/anyio/_core/_sockets.py:276
↓ 21 callersMethodsendto
Alias for :meth:`~.UnreliableObjectSendStream.send` ((data, (host, port))).
src/anyio/abc/_sockets.py:306
↓ 20 callersFunctioncheckpoint_if_cancelled
Enter a checkpoint if the enclosing cancel scope has been cancelled. This does not allow the scheduler to switch to a different task. .
src/anyio/lowlevel.py:41
↓ 20 callersMethodset
(self)
src/anyio/_backends/_asyncio.py:1830
↓ 20 callersFunctionsock_or_fd_factory
( request: SubRequest, tmp_path_factory: TempPathFactory )
tests/test_sockets.py:170
↓ 19 callersMethodcreate_task_group
(cls)
src/anyio/abc/_eventloop.py:164
↓ 19 callersFunctionget_available_backends
Test for the availability of built-in backends. :return a tuple of the built-in backend names that were successfully imported .. versio
src/anyio/_core/_eventloop.py:141
↓ 19 callersFunctionrun
Call a coroutine function from a worker thread. :param func: a coroutine function :param args: positional arguments for the callable
src/anyio/from_thread.py:67
↓ 19 callersMethodrun
Run a coroutine inside the embedded event loop.
src/anyio/_backends/_asyncio.py:182
↓ 19 callersFunctiontyped_attribute
Return a unique object, used to mark typed attributes.
src/anyio/_core/_typedattr.py:13
↓ 18 callersMethodsend_nowait
Send an item immediately if it can be done without waiting. :param item: the item to send :raises ~anyio.ClosedResourceError
src/anyio/streams/memory.py:205
↓ 18 callersMethodset
(self)
src/anyio/_backends/_trio.py:716
↓ 18 callersMethodwrite
(self: AsyncFile[bytes], b: ReadableBuffer)
src/anyio/_core/_fileio.py:138
↓ 17 callersMethodcache_info
(self)
src/anyio/functools.py:83
↓ 17 callersFunctioncreate_tcp_listener
Create a TCP socket listener. :param local_port: port number to listen on :param local_host: IP address of the interface to listen on. I
src/anyio/_core/_sockets.py:291
↓ 17 callersFunctionmove_on_after
Create a cancel scope with a deadline that expires after the given delay. :param delay: maximum allowed time (in seconds) before exiting the
src/anyio/_core/_tasks.py:160
↓ 17 callersMethodreceive_nowait
Receive the next item if it can be done without waiting. :return: the received item :raises ~anyio.ClosedResourceError: if t
src/anyio/streams/memory.py:86
↓ 16 callersMethodexists
(self)
src/anyio/_core/_fileio.py:578
↓ 16 callersMethodopen
( self, mode: OpenBinaryMode, buffering: int = ..., encoding: str | None = ...
src/anyio/_core/_fileio.py:728
↓ 14 callersMethod_convert_socket_error
(self, exc: BaseException)
src/anyio/_backends/_trio.py:462
↓ 14 callersFunctionislice
( iterable: Iterable[T] | AsyncIterable[T], stop: int | None, /, )
src/anyio/itertools.py:374
↓ 14 callersMethodread_text
( self, encoding: str | None = None, errors: str | None = None )
src/anyio/_core/_fileio.py:774
↓ 14 callersMethodtouch
(self, mode: int = 0o666, exist_ok: bool = True)
src/anyio/_core/_fileio.py:889
↓ 14 callersMethodwrap
Wrap an existing stream with Transport Layer Security. This performs a TLS handshake with the peer. :param transport_stream
src/anyio/streams/tls.py:100
↓ 13 callersFunctionaccumulate
( iterable: Iterable[T] | AsyncIterable[T], function: Callable[[T, T], Awaitable[T]] = _operator_add,
src/anyio/itertools.py:147
↓ 13 callersMethodcancel
(self, reason: str | None = None)
src/anyio/_backends/_asyncio.py:646
↓ 13 callersFunctioncombinations_with_replacement
( iterable: Iterable[T] | AsyncIterable[T], r: int )
src/anyio/itertools.py:240
↓ 13 callersFunctioncreate_udp_socket
Create a UDP socket. If ``port`` has been given, the socket will be bound to this port on the local machine, making this socket suitable
src/anyio/_core/_sockets.py:460
↓ 13 callersMethodread
(self, size: int = -1)
src/anyio/_core/_fileio.py:119
↓ 13 callersMethodrelative_to
( self, *other: str | PathLike[str], walk_up: bool = False )
src/anyio/_core/_fileio.py:783
↓ 13 callersFunctiontaskfunc
(*, task_status: TaskStatus)
tests/test_taskgroups.py:117
↓ 12 callersMethodconnect
(self)
tests/streams/test_tls.py:556
↓ 12 callersFunctioncreate_unix_datagram_socket
Create a UNIX datagram socket. Not available on Windows. If ``local_path`` has been given, the socket will be bound to this path, makin
src/anyio/_core/_sockets.py:556
↓ 12 callersFunctioncurrent_time
Return the current value of the event loop's internal clock. :return: the clock value (seconds) :raises NoEventLoopError: if no supporte
src/anyio/_core/_eventloop.py:124
↓ 11 callersMethodrelease
(self)
src/anyio/_backends/_trio.py:767
↓ 11 callersMethodwait
(self)
src/anyio/_backends/_asyncio.py:1836
↓ 10 callersMethodacquire_nowait
(self)
src/anyio/_backends/_trio.py:755
↓ 10 callersFunctionbatched
( iterable: Iterable[T] | AsyncIterable[T], n: int, *, strict: bool = False )
src/anyio/itertools.py:172
↓ 10 callersFunctioncombinations
( iterable: Iterable[T] | AsyncIterable[T], r: int )
src/anyio/itertools.py:232
↓ 10 callersFunctiongetaddrinfo
Look up a numeric IP address given a host name. Internationalized domain names are translated according to the (non-transitional) IDNA 2
src/anyio/_core/_sockets.py:617
↓ 10 callersFunctionpairwise
( iterable: Iterable[T] | AsyncIterable[T], )
src/anyio/itertools.py:466
↓ 10 callersFunctionproduct
( *iterables: Iterable[T] | AsyncIterable[T], repeat: int = 1 )
src/anyio/itertools.py:503
↓ 10 callersFunctionreduce
( function: Callable[[T, S], Awaitable[T]], iterable: Iterable[S] | AsyncIterable[S], /, initi
src/anyio/functools.py:328
↓ 10 callersFunctionrun_process
Run an external command in a subprocess and wait until it completes. .. seealso:: :func:`subprocess.run` :param command: either a strin
src/anyio/_core/_subprocesses.py:16
↓ 10 callersMethodunwrap
Does the TLS closing handshake. :return: a tuple of (wrapped byte stream, bytes left in the read buffer)
src/anyio/streams/tls.py:216
↓ 9 callersMethod__init__
(self, *, fast_acquire: bool = False)
src/anyio/_backends/_trio.py:726
↓ 9 callersMethodacquire
(self)
src/anyio/_backends/_trio.py:735
↓ 9 callersFunctioncancel_shielded_checkpoint
Allow the scheduler to switch to another task but without checking for cancellation. Equivalent to (but potentially more efficient than)::
src/anyio/lowlevel.py:53
↓ 9 callersFunctioncompress
( data: Iterable[T] | AsyncIterable[T], selectors: Iterable[object] | AsyncIterable[object], )
src/anyio/itertools.py:248
↓ 9 callersFunctioncreate_connected_udp_socket
Create a connected UDP socket. Connected UDP sockets can only communicate with the specified remote host/port, an any packets sent from
src/anyio/_core/_sockets.py:506
↓ 9 callersFunctioncurrent_effective_deadline
Return the nearest deadline among all the cancel scopes effective for the current task. :return: a clock value from the event loop's int
src/anyio/_core/_tasks.py:178
↓ 9 callersMethodget_loop
(self)
src/anyio/_backends/_asyncio.py:2263
↓ 9 callersMethodis_set
(self)
src/anyio/_backends/_trio.py:706
↓ 9 callersMethodjoinpath
(self, *args: str | PathLike[str])
src/anyio/_core/_fileio.py:709
↓ 9 callersFunctionno_other_refs
()
tests/conftest.py:165
↓ 9 callersFunctionopen_process
Start an external command in a subprocess. .. seealso:: :class:`subprocess.Popen` :param command: either a string to pass to the shell,
src/anyio/_core/_subprocesses.py:122
↓ 9 callersFunctionpermutations
( iterable: Iterable[T] | AsyncIterable[T], r: int | None = None )
src/anyio/itertools.py:487
↓ 9 callersMethodstart_task_soon
( self, func: Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]], *args: Unpack[PosArgs
src/anyio/from_thread.py:341
↓ 9 callersMethodstatistics
Return statistics about the current state of this condition. .. versionadded:: 3.0
src/anyio/_core/_synchronization.py:373
↓ 9 callersMethodstatistics
(self)
src/anyio/_backends/_trio.py:902
↓ 8 callersFunctioncreate_unix_listener
Create a UNIX socket listener. Not available on Windows. :param path: path of the socket :param mode: permissions to set on the soc
src/anyio/_core/_sockets.py:428
↓ 8 callersFunctiondropwhile
( predicate: Callable[[T], Awaitable[object]], iterable: Iterable[T] | AsyncIterable[T], )
src/anyio/itertools.py:299
next →1–100 of 2,134, ranked by callers