brk-code

anyio の API リファレンス

anyio (agronholm/anyio) の公開 API 106 件 —— クラス 31、関数 20、メソッド 55。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: agronholm/anyio

種別件数
クラス31
関数20
メソッド55

API 一覧

methodsrc.anyio._backends._asyncio.Runner.close() -> None
Shutdown and close event loop.
methodsrc.anyio._backends._asyncio.Runner.get_loop() -> AbstractEventLoop
Return embedded event loop.
methodsrc.anyio._backends._asyncio.Runner.run(coro:Coroutine[T_Retval], *context=None) -> T_Retval
Run a coroutine inside the embedded event loop.
funcsrc.anyio._core._eventloop.get_all_backends() -> tuple[str, ...]
Return a tuple of the names of all built-in backends.
funcsrc.anyio._core._eventloop.get_available_backends() -> tuple[str, ...]
Test for the availability of built-in backends.
funcsrc.anyio._core._eventloop.sleep(delay:float) -> None
Pause the current task for the specified duration.
funcsrc.anyio._core._eventloop.sleep_forever() -> None
Pause the current task until it's cancelled.
funcsrc.anyio._core._eventloop.sleep_until(deadline:float) -> None
Pause the current task until the given time.
classsrc.anyio._core._exceptions.ConnectionFailed
Raised when a connection attempt fails.
classsrc.anyio._core._exceptions.WouldBlock
Raised by ``X_nowait`` functions if ``X()`` would block.
classsrc.anyio._core._fileio.AsyncFile
An asynchronous file object.
methodsrc.anyio._core._fileio.AsyncFile.wrapped() -> IO[AnyStr]
The wrapped file object.
classsrc.anyio._core._fileio.Path
An asynchronous version of :class:`pathlib.Path`.
funcsrc.anyio._core._fileio.wrap_file(file:IO[AnyStr], *limiter:CapacityLimiter | None=None) -> AsyncFile[AnyStr]
Wrap an existing file as an asynchronous file.
classsrc.anyio._core._futures.Future.Status
The status of a future handle.
methodsrc.anyio._core._futures.Future.return_value() -> T
The return value of the future.
methodsrc.anyio._core._futures.Future.status() -> Future.Status
The current status of a future.
methodsrc.anyio._core._futures.Future.wait() -> None
Waits for the future to finish.
funcsrc.anyio._core._resources.aclose_forcefully(resource:AsyncResource) -> None
Close an asynchronous resource in a cancelled scope.
funcsrc.anyio._core._signals.open_signal_receiver(*signals:Signals) -> AbstractContextManager[AsyncIterator[Signals]]
Start receiving operating system signals.
classsrc.anyio._core._sockets.TCPConnectable
Connects to a TCP server at the given host and port.
classsrc.anyio._core._sockets.UNIXConnectable
Connects to a UNIX domain socket at the given path.
funcsrc.anyio._core._sockets.connect_unix(path:str | bytes | PathLike[Any]) -> UNIXSocketStream
Connect to the given UNIX socket.
funcsrc.anyio._core._sockets.create_udp_socket(family:AnyIPAddressFamily=AddressFamily.AF_UNSPEC, *local_host:IPAddressType | None=None, *local_port:int=0, *reuse_port:bool=False) -> UDPSocket
Create a UDP socket.
funcsrc.anyio._core._sockets.create_unix_datagram_socket(*local_path:None | str | bytes | PathLike[Any]=None, *local_mode:int | None=None) -> UNIXDatagramSocket
Create a UNIX datagram socket.
funcsrc.anyio._core._sockets.create_unix_listener(path:str | bytes | PathLike[Any], *mode:int | None=None, *backlog:int=65536) -> SocketListener
Create a UNIX socket listener.
funcsrc.anyio._core._sockets.getnameinfo(sockaddr:IPSockAddrType, flags:int=0) -> Awaitable[tuple[str, str]]
Look up the host name of an IP address.
funcsrc.anyio._core._sockets.wait_readable(obj:FileDescriptorLike) -> Awaitable[None]
Wait until the given object has data to be read.
funcsrc.anyio._core._sockets.wait_socket_readable(sock:socket.socket) -> Awaitable[None]
..
funcsrc.anyio._core._sockets.wait_socket_writable(sock:socket.socket) -> Awaitable[None]
..
funcsrc.anyio._core._sockets.wait_writable(obj:FileDescriptorLike) -> Awaitable[None]
Wait until the given object can be written to.
classsrc.anyio._core._streams.create_memory_object_stream
Create a memory object stream.
methodsrc.anyio._core._synchronization.Condition.acquire() -> None
Acquire the underlying lock.
methodsrc.anyio._core._synchronization.Condition.acquire_nowait() -> None
Acquire the underlying lock, without blocking.
methodsrc.anyio._core._synchronization.Condition.locked() -> bool
Return True if the lock is set.
methodsrc.anyio._core._synchronization.Condition.notify(n:int=1) -> None
Notify exactly n listeners.
methodsrc.anyio._core._synchronization.Condition.notify_all() -> None
Notify all the listeners.
methodsrc.anyio._core._synchronization.Condition.release() -> None
Release the underlying lock.
methodsrc.anyio._core._synchronization.Condition.wait() -> None
Wait for a notification.
methodsrc.anyio._core._synchronization.Condition.wait_for(predicate:Callable[[], T]) -> T
Wait until a predicate becomes true.
methodsrc.anyio._core._synchronization.Event.is_set() -> bool
Return ``True`` if the flag is set, ``False`` if not.
methodsrc.anyio._core._synchronization.Event.set() -> None
Set the flag, notifying all listeners.
methodsrc.anyio._core._synchronization.Event.wait() -> None
Wait until the flag has been set.
methodsrc.anyio._core._synchronization.Lock.acquire() -> None
Acquire the lock.
methodsrc.anyio._core._synchronization.Lock.acquire_nowait() -> None
Acquire the lock, without blocking.
methodsrc.anyio._core._synchronization.Lock.locked() -> bool
Return True if the lock is currently held.
methodsrc.anyio._core._synchronization.Lock.release() -> None
Release the lock.
methodsrc.anyio._core._synchronization.Semaphore.acquire() -> None
Decrement the semaphore value, blocking if necessary.
methodsrc.anyio._core._synchronization.Semaphore.acquire_nowait() -> None
Acquire the underlying lock, without blocking.
methodsrc.anyio._core._synchronization.Semaphore.max_value() -> int | None
The maximum value of the semaphore.
methodsrc.anyio._core._synchronization.Semaphore.release() -> None
Increment the semaphore value.
methodsrc.anyio._core._synchronization.Semaphore.value() -> int
The current value of the semaphore.
classsrc.anyio._core._tasks.CancelScope
Wraps a unit of work that can be made separately cancellable.
methodsrc.anyio._core._tasks.CancelScope.cancel(reason:str | None=None) -> None
Cancel this scope immediately.
methodsrc.anyio._core._tasks.CancelScope.cancel_called() -> bool
``True`` if :meth:`cancel` has been called.
classsrc.anyio._core._tasks.TaskHandle.Status
The status of a task handle.
methodsrc.anyio._core._tasks.TaskHandle.cancel() -> None
Set the task to a cancelled state.
methodsrc.anyio._core._tasks.TaskHandle.name() -> str
The name of the task.
methodsrc.anyio._core._tasks.TaskHandle.return_value() -> T_co
The return value of the task.
methodsrc.anyio._core._tasks.TaskHandle.status() -> TaskHandle.Status
The current status of the task.
methodsrc.anyio._core._tasks.TaskHandle.wait() -> None
Wait for the task to finish.
funcsrc.anyio._core._tasks.create_task_group() -> TaskGroup
Create a task group.
classsrc.anyio._core._typedattr.TypedAttributeSet
Superclass for typed attribute collections.
funcsrc.anyio._core._typedattr.typed_attribute() -> Any
Return a unique object, used to mark typed attributes.
classsrc.anyio.abc._resources.AsyncResource
Abstract base class for all closeable asynchronous resources.
methodsrc.anyio.abc._resources.AsyncResource.aclose() -> None
Close the resource.
classsrc.anyio.abc._sockets.ConnectedUDPSocket
Represents an connected UDP socket.
classsrc.anyio.abc._sockets.ConnectedUNIXDatagramSocket
Represents a connected Unix datagram socket.
classsrc.anyio.abc._sockets.SocketAttribute
..
classsrc.anyio.abc._sockets.SocketListener
Listens to incoming socket connections.
methodsrc.anyio.abc._sockets.SocketListener.accept() -> SocketStream
Accept an incoming connection.
classsrc.anyio.abc._sockets.SocketStream
Transports bytes over a socket.
classsrc.anyio.abc._sockets.UDPSocket
Represents an unconnected UDP socket.
classsrc.anyio.abc._sockets.UNIXDatagramSocket
Represents an unconnected Unix datagram socket.
classsrc.anyio.abc._streams.ByteReceiveStream
An interface for receiving bytes from a single peer.
methodsrc.anyio.abc._streams.ByteReceiveStream.receive(max_bytes:int=65536) -> bytes
Receive at most ``max_bytes`` bytes from the peer.
classsrc.anyio.abc._streams.ByteSendStream
An interface for sending bytes to a single peer.
methodsrc.anyio.abc._streams.ByteSendStream.send(item:bytes) -> None
Send the given bytes to the peer.
classsrc.anyio.abc._streams.ByteStream
A bidirectional byte stream.
methodsrc.anyio.abc._streams.ByteStream.send_eof() -> None
Send an end-of-file indication to the peer.
classsrc.anyio.abc._streams.UnreliableObjectReceiveStream
An interface for receiving objects.
methodsrc.anyio.abc._streams.UnreliableObjectReceiveStream.receive() -> T_co
Receive the next item.
classsrc.anyio.abc._streams.UnreliableObjectSendStream
An interface for sending objects.
methodsrc.anyio.abc._streams.UnreliableObjectSendStream.send(item:T_contra) -> None
Send an item to the peer(s).
classsrc.anyio.abc._subprocesses.Process
An asynchronous version of :class:`subprocess.Popen`.
methodsrc.anyio.abc._subprocesses.Process.kill() -> None
Kills the process.
methodsrc.anyio.abc._subprocesses.Process.pid() -> int
The process ID of the process.
methodsrc.anyio.abc._subprocesses.Process.returncode() -> int | None
The return code of the process.
methodsrc.anyio.abc._subprocesses.Process.send_signal(signal:Signals) -> None
Send a signal to the subprocess.
methodsrc.anyio.abc._subprocesses.Process.stdin() -> ByteSendStream | None
The stream for the standard input of the process.
methodsrc.anyio.abc._subprocesses.Process.stdout() -> ByteReceiveStream | None
The stream for the standard output of the process.
methodsrc.anyio.abc._subprocesses.Process.terminate() -> None
Terminates the process, gracefully if possible.
methodsrc.anyio.abc._subprocesses.Process.wait() -> int
Wait until the process exits.
classsrc.anyio.abc._tasks.TaskGroup
Groups several asynchronous tasks together.
methodsrc.anyio.abc._tasks.TaskGroup.cancel(reason:str | None=None) -> None
Cancel this task group's cancel scope immediately.
methodsrc.anyio.abc._tasks.TaskGroup.start_soon(func:Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]], *name:object=None, *args:Unpack[PosArgsT]) -> TaskHandle[T_co]
Start a new task in this task group.
classsrc.anyio.from_thread.BlockingPortalProvider
A manager for a blocking portal.
funcsrc.anyio.from_thread.run(func:Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]], *token:EventLoopToken | None=None, *args:Unpack[PosArgsT]) -> T_co
Call a coroutine function from a worker thread.
classsrc.anyio.lowlevel.EventLoopToken
An opaque object that holds a reference to an event loop.
methodsrc.anyio.lowlevel.RunVar.set(value:T) -> RunvarToken[T]
Set the value of this run variable for the current event loop.
classsrc.anyio.streams.file.FileReadStream
A byte stream that reads from a file in the file system.
methodsrc.anyio.streams.file.FileReadStream.from_path(path:str | PathLike[str]) -> FileReadStream
Create a file read stream by opening the given file.
methodsrc.anyio.streams.file.FileReadStream.seek(position:int, whence:int=SEEK_SET) -> int
Seek the file to the given position.
methodsrc.anyio.streams.file.FileReadStream.tell() -> int
Return the current stream position.
classsrc.anyio.streams.file.FileWriteStream
A byte stream that writes to a file in the file system.
classsrc.anyio.streams.tls.TLSAttribute
Contains Transport Layer Security related attributes.

この情報について

掲載しているシグネチャは agronholm/anyio の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る