MCPcopy Create free account

hub / github.com/agronholm/anyio / functions

Functions2,553 in github.com/agronholm/anyio

↓ 8 callersFunctionsleep_forever
Pause the current task until it's cancelled. This is a shortcut for ``sleep(math.inf)``. .. versionadded:: 3.1
src/anyio/_core/_eventloop.py:102
↓ 8 callersMethodstart_task
Start a task in the portal's task group and wait until it signals for readiness. This method works the same way as :meth:`.abc.TaskG
src/anyio/from_thread.py:488
↓ 7 callersFunction_validate_socket
( sock_or_fd: socket.socket | int, sock_type: socket.SocketKind, addr_family: socket.AddressFamily
src/anyio/abc/_sockets.py:32
↓ 7 callersMethodacquire
(self)
src/anyio/_backends/_trio.py:742
↓ 7 callersFunctionbatched
( iterable: Iterable[T] | AsyncIterable[T], n: int, *, strict: bool = False )
src/anyio/itertools.py:175
↓ 7 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:55
↓ 7 callersMethodcheckpoint_if_cancelled
(cls)
src/anyio/_backends/_asyncio.py:2640
↓ 7 callersFunctioncombinations
( iterable: Iterable[T] | AsyncIterable[T], r: int )
src/anyio/itertools.py:235
↓ 7 callersFunctioncombinations_with_replacement
( iterable: Iterable[T] | AsyncIterable[T], r: int )
src/anyio/itertools.py:243
↓ 7 callersMethodconnect
(self)
src/anyio/_core/_sockets.py:948
↓ 7 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:647
↓ 7 callersMethodis_set
(self)
src/anyio/_backends/_trio.py:713
↓ 7 callersMethodlocked
(self)
src/anyio/_backends/_trio.py:771
↓ 7 callersFunctionno_other_refs
()
tests/conftest.py:177
↓ 7 callersMethodreceive_exactly
Read exactly the given amount of bytes from the stream. :param nbytes: the number of bytes to read :return: the bytes read
src/anyio/streams/buffered.py:94
↓ 7 callersMethodremove_reader
(self, fd: FileDescriptorLike)
src/anyio/_core/_asyncio_selector_thread.py:102
↓ 7 callersFunctiontee
( iterable: Iterable[T] | AsyncIterable[T], n: int = 2 )
src/anyio/itertools.py:561
↓ 7 callersMethodwrite_bytes
(self, data: ReadableBuffer)
src/anyio/_core/_fileio.py:1025
↓ 6 callersMethodacquire
Acquire the lock.
src/anyio/_core/_synchronization.py:181
↓ 6 callersFunctionas_completed
Run awaitable objects concurrently in a task group, returning an iterator which can be used to get finished task handles in the order they co
src/anyio/_core/_concurrency_utils.py:97
↓ 6 callersFunctioncurrent_async_library
()
src/anyio/_core/_eventloop.py:215
↓ 6 callersMethodis_set
(self)
src/anyio/_backends/_asyncio.py:2002
↓ 6 callersFunctionislice
( iterable: Iterable[T] | AsyncIterable[T], stop: int | None, /, )
src/anyio/itertools.py:377
↓ 6 callersMethodnotify
Notify exactly n listeners.
src/anyio/_core/_synchronization.py:322
↓ 6 callersFunctionpermutations
( iterable: Iterable[T] | AsyncIterable[T], r: int | None = None )
src/anyio/itertools.py:490
↓ 6 callersFunctionproduct
( *iterables: Iterable[T] | AsyncIterable[T], repeat: int = 1 )
src/anyio/itertools.py:506
↓ 6 callersMethodrelease
Release the lock.
src/anyio/_core/_synchronization.py:194
↓ 6 callersMethodreset
Restore this run variable to the value it held before the matching :meth:`set`. :param token: the token returned by :meth:`set`
src/anyio/lowlevel.py:202
↓ 6 callersMethodsend
(self, item: UDPPacketType)
src/anyio/_backends/_trio.py:625
↓ 6 callersMethodsend_eof
(self)
src/anyio/streams/tls.py:277
↓ 6 callersMethodstat
(self, *, follow_symlinks: bool = True)
src/anyio/_core/_fileio.py:946
↓ 6 callersMethodstatistics
Return statistics about the current state of this lock. .. versionadded:: 3.0
src/anyio/_core/_synchronization.py:202
↓ 6 callersFunctiontyped_attribute
Return a unique object, used to mark typed attributes.
src/anyio/_core/_typedattr.py:17
↓ 6 callersMethodunwrap
Does the TLS closing handshake. :return: a tuple of (wrapped byte stream, bytes left in the read buffer)
src/anyio/streams/tls.py:242
↓ 5 callersFunctionaccumulate
( iterable: Iterable[T] | AsyncIterable[T], function: Callable[[T, T], Awaitable[T]] = _operator_add,
src/anyio/itertools.py:150
↓ 5 callersMethodclone
Create a clone of this send stream. Each clone can be closed separately. Only when all clones have been closed will the send
src/anyio/streams/memory.py:291
↓ 5 callersMethodcopy
( self, target: str | os.PathLike[str], *, follow_symlinks: bo
src/anyio/_core/_fileio.py:505
↓ 5 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:222
↓ 5 callersFunctioncycle
( iterable: Iterable[T] | AsyncIterable[T], )
src/anyio/itertools.py:284
↓ 5 callersMethodfrom_iterable
( self, iterables: ( Iterable[Iterable[T] | AsyncIterable[T]] | AsyncI
src/anyio/itertools.py:207
↓ 5 callersMethodget_loop
(self)
src/anyio/_backends/_asyncio.py:2430
↓ 5 callersMethodhas_pending_cancellation
Return ``True`` if the task has a cancellation pending, ``False`` otherwise.
src/anyio/_core/_testing.py:48
↓ 5 callersMethodis_file
(self, *, follow_symlinks: bool = True)
src/anyio/_core/_fileio.py:703
↓ 5 callersMethodis_set
Return ``True`` if the flag is set, ``False`` if not.
src/anyio/_core/_synchronization.py:101
↓ 5 callersMethodlocked
Return True if the lock is set.
src/anyio/_core/_synchronization.py:318
↓ 5 callersMethodnotify_all
Notify all the listeners.
src/anyio/_core/_synchronization.py:333
↓ 5 callersFunctionopen_signal_receiver
Start receiving operating system signals. :param signals: signals to receive (e.g. ``signal.SIGINT``) :return: an asynchronous context m
src/anyio/_core/_signals.py:10
↓ 5 callersMethodreceive
(self)
src/anyio/streams/text.py:61
↓ 5 callersMethodreceive
(self, max_bytes: int = 65536)
src/anyio/streams/buffered.py:67
↓ 5 callersMethodreceive_until
Read from the stream until the delimiter is found or max_bytes have been read. :param delimiter: the marker to look for in the strea
src/anyio/streams/buffered.py:125
↓ 5 callersMethodrelease
(self)
src/anyio/_backends/_trio.py:833
↓ 5 callersMethodremove_writer
(self, fd: FileDescriptorLike)
src/anyio/_core/_asyncio_selector_thread.py:116
↓ 5 callersMethodrun_sync_soon
Schedule a synchronous callable in an event loop without waiting.
src/anyio/abc/_eventloop.py:240
↓ 5 callersMethodsend_nowait
(self, item: T_Item)
src/anyio/streams/stapled.py:88
↓ 5 callersMethodstatistics
(self)
src/anyio/_backends/_trio.py:915
↓ 5 callersMethodwrap_async_context_manager
Wrap an async context manager as a synchronous context manager via this portal. Spawns a task that will call both ``__aenter__()`` a
src/anyio/from_thread.py:531
↓ 4 callersMethod__init__
(self)
src/anyio/_core/_exceptions.py:120
↓ 4 callersMethod__init__
(self, *, fast_acquire: bool = False)
src/anyio/_backends/_asyncio.py:2021
↓ 4 callersMethod__new__
(cls, *, fast_acquire: bool = False)
src/anyio/_core/_synchronization.py:164
↓ 4 callersMethod__new__
(cls, *, fast_acquire: bool = False)
src/anyio/_backends/_asyncio.py:2018
↓ 4 callersMethod__new__
(cls, *, fast_acquire: bool = False)
src/anyio/_backends/_trio.py:730
↓ 4 callersMethod_call_sslobject_method
( self, func: Callable[[Unpack[PosArgsT]], T_Retval], *args: Unpack[PosArgsT] )
src/anyio/streams/tls.py:195
↓ 4 callersMethod_wait_until_readable
(self, loop: asyncio.AbstractEventLoop)
src/anyio/_backends/_asyncio.py:1517
↓ 4 callersMethod_wait_until_writable
(self, loop: asyncio.AbstractEventLoop)
src/anyio/_backends/_asyncio.py:1527
↓ 4 callersMethodaclose
(self)
src/anyio/_core/_fileio.py:117
↓ 4 callersMethodaclose
(self)
src/anyio/streams/stapled.py:150
↓ 4 callersMethodaclose
(self)
src/anyio/streams/tls.py:254
↓ 4 callersMethodacquire
Acquire the underlying lock.
src/anyio/_core/_synchronization.py:301
↓ 4 callersMethodacquire
()
tests/test_synchronization.py:176
↓ 4 callersMethodacquire_nowait
Acquire the lock, without blocking. :raises ~anyio.WouldBlock: if the operation would block
src/anyio/_core/_synchronization.py:185
↓ 4 callersMethodacquire_nowait
(self)
src/anyio/_backends/_trio.py:819
↓ 4 callersMethodadd_writer
(self, fd: FileDescriptorLike, callback: Callable[[], Any])
src/anyio/_core/_asyncio_selector_thread.py:85
↓ 4 callersFunctionassert_checkpoints_on_first_next
(iterator: AsyncIterator[Any])
tests/test_itertools.py:80
↓ 4 callersMethodcheck_cancelled
(cls)
src/anyio/abc/_eventloop.py:215
↓ 4 callersMethodcreate_cancel_scope
( cls, *, deadline: float = math.inf, shield: bool = False )
src/anyio/_backends/_trio.py:1119
↓ 4 callersMethodexception
The exception value of a `.Future` :raises FutureNotFinished: if future is still pending :raises FutureCancelled: if future
src/anyio/_core/_futures.py:96
↓ 4 callersFunctionfail_at
Create a context manager which raises a :class:`TimeoutError` if the code in the enclosing context does not finish by the given deadline.
src/anyio/_core/_tasks.py:128
↓ 4 callersFunctionget_callable_name
(func: Callable, override: object = None)
src/anyio/abc/_tasks.py:42
↓ 4 callersMethodget_current_task
(cls)
src/anyio/abc/_eventloop.py:427
↓ 4 callersMethodkill
(self)
src/anyio/_backends/_trio.py:395
↓ 4 callersMethodreceive_fds
Receive file descriptors along with a message from the peer. :param msglen: length of the message to expect from the peer :p
src/anyio/abc/_sockets.py:232
↓ 4 callersMethodrelease
Release the underlying lock.
src/anyio/_core/_synchronization.py:314
↓ 4 callersFunctionrepeat
(element: T, times: int | None = None)
src/anyio/itertools.py:525
↓ 4 callersMethodsend
(self, item: str)
src/anyio/streams/text.py:112
↓ 4 callersMethodsend_fds
Send file descriptors along with a message to the peer. :param message: a non-empty bytestring :param fds: a collection of f
src/anyio/abc/_sockets.py:222
↓ 4 callersMethodserve
Accept incoming connections as they come in and start tasks to handle them. :param handler: a callable that will be used to handle e
src/anyio/abc/_streams.py:200
↓ 4 callersMethodstatistics
(self)
src/anyio/_backends/_trio.py:836
↓ 4 callersFunctiontakewhile
( predicate: Callable[[T], Awaitable[object]], iterable: Iterable[T] | AsyncIterable[T], )
src/anyio/itertools.py:576
↓ 4 callersMethodunlink
(self, missing_ok: bool = False)
src/anyio/_core/_fileio.py:969
↓ 4 callersMethodwait
Wait for a notification.
src/anyio/_core/_synchronization.py:341
↓ 4 callersMethodwait_for
Wait until a predicate becomes true. :param predicate: a callable that returns a truthy value when the condition is met
src/anyio/_core/_synchronization.py:363
↓ 4 callersFunctionwait_readable
Wait until the given object has data to be read. On Unix systems, ``obj`` must either be an integer file descriptor, or else an object w
src/anyio/_core/_sockets.py:754
↓ 3 callersMethod__anext__
(self)
tests/test_itertools.py:57
↓ 3 callersMethod_call_in_runner_task
( self, func: Callable[P, Awaitable[T_Retval]], /, *args: P.args, **kw
src/anyio/_backends/_asyncio.py:2486
↓ 3 callersMethod_call_in_runner_task
( self, func: Callable[P, Awaitable[T_Retval]], /, *args: P.args, **kw
src/anyio/_backends/_trio.py:1005
↓ 3 callersMethod_check_acquired
(self)
src/anyio/_core/_synchronization.py:297
↓ 3 callersMethod_check_running
(self)
src/anyio/from_thread.py:214
↓ 3 callersMethod_deliver_cancellation
Deliver cancellation to directly contained tasks and nested cancel scopes. Schedule another run at the end if we still have tasks el
src/anyio/_backends/_asyncio.py:601
↓ 3 callersMethod_do_cache_asserts
( wrapper: _LRUMethodWrapper[int] | AsyncLRUCacheWrapper[..., int], )
tests/test_functools.py:286
↓ 3 callersMethod_lazy_init
(self)
src/anyio/_backends/_asyncio.py:230
← previousnext →101–200 of 2,553, ranked by callers