libvt.aio — Session Core

Shared session protocol, reply writer protocol, and PTY line discipline type exported from libvt.aio.

class libvt.aio.AsyncSession
class libvt.aio.AsyncSession

Bidirectional interactive terminal session shared by streams and PTYs.

Satisfied by both AsyncTerminalStream (cross-platform pipes, sockets, and SSH channels) and PtySession (POSIX pseudo-terminals).

Examples

>>> import asyncio
>>> from libvt.aio import AsyncSession, AsyncTerminalStream
>>> async def _check() -> bool:
...     return isinstance(AsyncTerminalStream(asyncio.StreamReader()), AsyncSession)
>>> asyncio.run(_check())
True
class libvt.aio.ReplyWriter
class libvt.aio.ReplyWriter

Structural writer protocol satisfied by asyncio.StreamWriter.

type libvt.aio.TtyMode = Literal['cooked', 'cbreak', 'raw']
type
type
type libvt.aio.TtyMode = Literal['cooked', 'cbreak', 'raw']

Slave pseudo-terminal line discipline mode passed to open_pty().