Files
py-libp2p/libp2p/typing.py
2025-01-25 15:48:39 -07:00

16 lines
385 B
Python

from collections.abc import (
Awaitable,
)
from typing import (
TYPE_CHECKING,
Callable,
NewType,
)
if TYPE_CHECKING:
from libp2p.network.stream.net_stream_interface import INetStream # noqa: F401
from libp2p.stream_muxer.abc import IMuxedStream # noqa: F401
TProtocol = NewType("TProtocol", str)
StreamHandlerFn = Callable[["INetStream"], Awaitable[None]]