Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/agronholm/anyio
/ types & classes
Types & classes
268 in github.com/agronholm/anyio
⨍
Functions
2,134
◇
Types & classes
268
↳
Endpoints
11
↓ 137 callers
Class
Path
An asynchronous version of :class:`pathlib.Path`. This class cannot be substituted for :class:`pathlib.Path` or :class:`pathlib.PurePath
src/anyio/_core/_fileio.py:280
↓ 80 callers
Class
CancelScope
Wraps a unit of work that can be made separately cancellable. :param deadline: The time (clock value) when this scope is cancelled automatic
src/anyio/_core/_tasks.py:48
↓ 35 callers
Class
Event
src/anyio/_backends/_trio.py:697
↓ 22 callers
Class
ResourceGuard
A context manager for ensuring that a resource is only used by a single task at a time. Entering this context manager while the previous
src/anyio/_core/_synchronization.py:740
↓ 21 callers
Class
CapacityLimiter
src/anyio/_backends/_trio.py:834
↓ 17 callers
Class
Lock
src/anyio/_backends/_trio.py:720
↓ 14 callers
Class
RunVar
Like a :class:`~contextvars.ContextVar`, except scoped to the running event loop. Can be used as a context manager, Just like :class:`~conte
src/anyio/lowlevel.py:131
↓ 14 callers
Class
Semaphore
src/anyio/_backends/_trio.py:778
↓ 10 callers
Class
Condition
src/anyio/_core/_synchronization.py:270
↓ 9 callers
Class
StapledObjectStream
Combines two object streams into a single, bidirectional object stream. Extra attributes will be provided from both streams, with the receiv
src/anyio/streams/stapled.py:65
↓ 8 callers
Class
BlockingPortal
An object that lets external threads run code in an asynchronous event loop. :raises NoEventLoopError: if no supported asynchronous event lo
src/anyio/from_thread.py:185
↓ 8 callers
Class
CancelScope
src/anyio/_backends/_asyncio.py:382
↓ 7 callers
Class
BadContextManager
tests/test_contextmanagers.py:80
↓ 7 callers
Class
BufferedByteReceiveStream
Wraps any bytes-based receive stream and uses a buffer to provide sophisticated receiving capabilities in the form of a byte stream.
src/anyio/streams/buffered.py:31
↓ 7 callers
Class
_PathIterator
src/anyio/_core/_fileio.py:263
↓ 5 callers
Class
AsyncFile
An asynchronous file object. This class wraps a standard file object and provides async friendly versions of the following blocking meth
src/anyio/_core/_fileio.py:51
↓ 5 callers
Class
BusyResourceError
Raised when two tasks are trying to read from or write to the same resource concurrently.
src/anyio/_core/_exceptions.py:61
↓ 5 callers
Class
CancelScope
src/anyio/_backends/_trio.py:143
↓ 4 callers
Class
DummyAsyncContextManager
tests/test_contextmanagers.py:41
↓ 4 callers
Class
DummyContextManager
tests/test_contextmanagers.py:23
↓ 4 callers
Class
Indexable
tests/test_itertools.py:585
↓ 4 callers
Class
SpooledTemporaryFile
An asynchronous spooled temporary file that starts in memory and is spooled to disk. This class provides an asynchronous interface to a spoo
src/anyio/_core/_tempfile.py:220
↓ 4 callers
Class
TaskCancelled
Raised when awaiting on, or attempting to access the return value of, a :class:`.TaskHandle` that was cancelled.
src/anyio/_core/_exceptions.py:166
↓ 4 callers
Class
TaskState
Encapsulates auxiliary task information that cannot be added to the Task instance itself because there are no guarantees about its implementa
src/anyio/_backends/_asyncio.py:702
↓ 4 callers
Class
TrioTaskInfo
src/anyio/_backends/_trio.py:1047
↓ 3 callers
Class
AsyncIOTaskInfo
src/anyio/_backends/_asyncio.py:2193
↓ 3 callers
Class
BufferedByteStream
A full-duplex variant of :class:`BufferedByteReceiveStream`. All writes are passed through to the wrapped stream as-is.
src/anyio/streams/buffered.py:154
↓ 3 callers
Class
CapacityLimiterStatistics
:ivar int borrowed_tokens: number of tokens currently borrowed by tasks :ivar float total_tokens: total number of available tokens :ivar
src/anyio/_core/_synchronization.py:29
↓ 3 callers
Class
ClosedResourceError
Raised when trying to use a resource that has been closed.
src/anyio/_core/_exceptions.py:71
↓ 3 callers
Class
Event
src/anyio/_core/_synchronization.py:82
↓ 3 callers
Class
EventStatistics
:ivar int tasks_waiting: number of tasks waiting on :meth:`~.Event.wait`
src/anyio/_core/_synchronization.py:20
↓ 3 callers
Class
Foo
tests/test_to_thread.py:372
↓ 3 callers
Class
LockStatistics
:ivar bool locked: flag indicating if this lock is locked or not :ivar ~anyio.TaskInfo owner: task currently holding the lock (or ``None`` if
src/anyio/_core/_synchronization.py:47
↓ 3 callers
Class
MultiListener
Combines multiple listeners into one, serving connections from all of them at once. Any MultiListeners in the given collection of listeners
src/anyio/streams/stapled.py:101
↓ 3 callers
Class
NoEventLoopError
Raised by several functions that require an event loop to be running in the current thread when there is no running event loop. This is
src/anyio/_core/_exceptions.py:137
↓ 3 callers
Class
SemaphoreStatistics
:ivar int tasks_waiting: number of tasks waiting on :meth:`~.Semaphore.acquire`
src/anyio/_core/_synchronization.py:73
↓ 3 callers
Class
SocketStream
src/anyio/_backends/_asyncio.py:1294
↓ 3 callers
Class
SocketStream
src/anyio/_backends/_trio.py:473
↓ 3 callers
Class
TCPConnectable
Connects to a TCP server at the given host and port. :param host: host name or IP address of the server :param port: TCP port number of
src/anyio/_core/_sockets.py:911
↓ 3 callers
Class
TaskHandle
Returned from the task-spawning methods of :class:`TaskGroup`. Can be awaited on to get the return value of the task (or the raised exception
src/anyio/_core/_tasks.py:207
↓ 3 callers
Class
TemporaryDirectory
An asynchronous temporary directory that is created and cleaned up automatically. This class provides an asynchronous context manager for cr
src/anyio/_core/_tempfile.py:454
↓ 3 callers
Class
TextReceiveStream
Stream wrapper that decodes bytes to strings using the given encoding. Decoding is done using :class:`~codecs.IncrementalDecoder` which retu
src/anyio/streams/text.py:34
↓ 3 callers
Class
TextSendStream
Sends strings to the wrapped stream as bytes using the given encoding. :param AnyByteSendStream transport_stream: any bytes-based send strea
src/anyio/streams/text.py:77
↓ 3 callers
Class
UNIXSocketStream
src/anyio/_backends/_asyncio.py:1425
↓ 3 callers
Class
UNIXSocketStream
src/anyio/_backends/_trio.py:506
↓ 2 callers
Class
AIter
tests/test_functools.py:488
↓ 2 callers
Class
AsyncCacheInfo
src/anyio/functools.py:63
↓ 2 callers
Class
BrokenWorkerInterpreter
Raised by :meth:`~anyio.to_interpreter.run_sync` if an unexpected exception is raised in the subinterpreter.
src/anyio/_core/_exceptions.py:26
↓ 2 callers
Class
BrokenWorkerProcess
Raised by :meth:`~anyio.to_process.run_sync` if the worker process terminates abruptly or otherwise misbehaves.
src/anyio/_core/_exceptions.py:19
↓ 2 callers
Class
CapacityLimiter
src/anyio/_backends/_asyncio.py:2018
↓ 2 callers
Class
ConnectedUDPSocket
src/anyio/_backends/_asyncio.py:1688
↓ 2 callers
Class
ConnectedUDPSocket
src/anyio/_backends/_trio.py:626
↓ 2 callers
Class
ConnectedUNIXDatagramSocket
src/anyio/_backends/_asyncio.py:1776
↓ 2 callers
Class
ConnectedUNIXDatagramSocket
src/anyio/_backends/_trio.py:669
↓ 2 callers
Class
ConnectionFailed
Raised when a connection attempt fails. .. note:: This class inherits from :exc:`OSError` for backwards compatibility.
src/anyio/_core/_exceptions.py:75
↓ 2 callers
Class
CustomTLSListener
tests/streams/test_tls.py:429
↓ 2 callers
Class
EventLoopToken
An opaque object that holds a reference to an event loop. .. versionadded:: 4.11.0
src/anyio/lowlevel.py:70
↓ 2 callers
Class
FileReadStream
A byte stream that reads from a file in the file system. :param file: a file that has been opened for reading in binary mode .. version
src/anyio/streams/file.py:61
↓ 2 callers
Class
Foo
tests/test_functools.py:305
↓ 2 callers
Class
FreePortFactory
Manages port generation based on specified socket kind, ensuring no duplicate ports are generated. This class provides functionality for
src/anyio/pytest_plugin.py:297
↓ 2 callers
Class
MemoryObjectReceiveStream
src/anyio/streams/memory.py:79
↓ 2 callers
Class
MemoryObjectSendStream
src/anyio/streams/memory.py:198
↓ 2 callers
Class
ReceiveStreamWrapper
src/anyio/_backends/_trio.py:321
↓ 2 callers
Class
Runner
src/anyio/_backends/_asyncio.py:130
↓ 2 callers
Class
SomeClass
tests/test_fileio.py:169
↓ 2 callers
Class
StreamReaderWrapper
src/anyio/_backends/_asyncio.py:1067
↓ 2 callers
Class
TCPSocketListener
src/anyio/_backends/_asyncio.py:1541
↓ 2 callers
Class
TCPSocketListener
src/anyio/_backends/_trio.py:573
↓ 2 callers
Class
TLSConnectable
Wraps another connectable and does TLS negotiation after a successful connection. :param connectable: the connectable to wrap :param hos
src/anyio/streams/tls.py:377
↓ 2 callers
Class
TaskNotFinished
Raised when attempting to access the return value or exception of a :class:`.TaskHandle` that is still pending completion.
src/anyio/_core/_exceptions.py:173
↓ 2 callers
Class
TextStream
A bidirectional stream that decodes bytes to strings on receive and encodes strings to bytes on send. Extra attributes will be provided
src/anyio/streams/text.py:112
↓ 2 callers
Class
UDPSocket
src/anyio/_backends/_asyncio.py:1638
↓ 2 callers
Class
UDPSocket
src/anyio/_backends/_trio.py:604
↓ 2 callers
Class
UNIXConnectable
Connects to a UNIX domain socket at the given path. :param path: the file system path of the socket
src/anyio/_core/_sockets.py:937
↓ 2 callers
Class
UNIXDatagramSocket
src/anyio/_backends/_asyncio.py:1740
↓ 2 callers
Class
UNIXDatagramSocket
src/anyio/_backends/_trio.py:647
↓ 2 callers
Class
UNIXSocketListener
src/anyio/_backends/_asyncio.py:1601
↓ 2 callers
Class
UNIXSocketListener
src/anyio/_backends/_trio.py:589
↓ 2 callers
Class
_LRUCacheWrapper
src/anyio/functools.py:226
↓ 2 callers
Class
_TeeAsyncIterator
src/anyio/itertools.py:104
↓ 2 callers
Class
_TeeLink
src/anyio/itertools.py:77
↓ 1 callers
Class
AIter
tests/test_itertools.py:50
↓ 1 callers
Class
AsyncLRUCacheWrapper
src/anyio/functools.py:100
↓ 1 callers
Class
BlockingPortalProvider
A manager for a blocking portal. Used as a context manager. The first thread to enter this context manager causes a blocking portal to be sta
src/anyio/from_thread.py:447
↓ 1 callers
Class
BufferedConnectable
Wraps a byte stream connectable to produce :class:`BufferedByteStream` connections. Use this when you want the streams returned by :meth:`co
src/anyio/streams/buffered.py:177
↓ 1 callers
Class
CapacityLimiterAdapter
src/anyio/_core/_synchronization.py:646
↓ 1 callers
Class
Chain
src/anyio/itertools.py:198
↓ 1 callers
Class
ConditionStatistics
:ivar int tasks_waiting: number of tasks blocked on :meth:`~.Condition.wait` :ivar ~anyio.LockStatistics lock_statistics: statistics of the u
src/anyio/_core/_synchronization.py:61
↓ 1 callers
Class
DelimiterNotFound
Raised during :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the maximum number of bytes has been read withou
src/anyio/_core/_exceptions.py:93
↓ 1 callers
Class
DummyAttributeProvider
tests/test_typedattr.py:11
↓ 1 callers
Class
DummyByteReceiveStream
tests/streams/test_stapled.py:21
↓ 1 callers
Class
DummyByteSendStream
tests/streams/test_stapled.py:42
↓ 1 callers
Class
DummyObjectReceiveStream
tests/streams/test_stapled.py:103
↓ 1 callers
Class
EditableCancelScope
tests/test_taskgroups.py:321
↓ 1 callers
Class
Event
src/anyio/_backends/_asyncio.py:1821
↓ 1 callers
Class
EventAdapter
src/anyio/_core/_synchronization.py:114
↓ 1 callers
Class
InheritedAsyncContextManager
tests/test_contextmanagers.py:227
↓ 1 callers
Class
InheritedContextManager
tests/test_contextmanagers.py:123
↓ 1 callers
Class
Lock
src/anyio/_core/_synchronization.py:155
↓ 1 callers
Class
Lock
src/anyio/_backends/_asyncio.py:1846
next →
1–100 of 268, ranked by callers