(api)=

(reference)=

# API Reference

Public modules and types shipped by `libvt`.

::::{grid} 1 1 2 2
:gutter: 2 2 3 3

:::{grid-item-card} `libvt`
:link: libvt
:link-type: doc
Lazy PEP 562 quickstart exports: `Terminal`, `Snapshot`, `render`, `strip`, and
core types.
:::

:::{grid-item-card} `libvt.terminal`
:link: terminal
:link-type: doc
`Terminal`, `StopOn`, `StepResult`, `render`, and `strip`.
:::

:::{grid-item-card} `libvt.screen` & `libvt.views`
:link: screen
:link-type: doc
`Screen`, `ScreenSet`, `Cell`, `RowView`, `RowRun`, `RegionView`, and `Cursor`.
:::

:::{grid-item-card} `libvt.snapshot`, `format`, & `recorder`
:link: snapshot
:link-type: doc
`Snapshot`, `SyncToken`, `ScreenDelta`, `Formatter`, `TerminalRecorder`, and
`FlightRecorder`.
:::

:::{grid-item-card} `libvt.parser`
:link: parser
:link-type: doc
Streaming VT500 `Parser`, `CsiParams`, `Action` records, and `parse_sgr`.
:::

:::{grid-item-card} `libvt.style` & `libvt.modes`
:link: style
:link-type: doc
`Style`, `AnsiColor`, `IndexedColor`, `RgbColor`, `Hyperlink`, and DEC/ANSI `Mode`s.
:::

:::{grid-item-card} `libvt.config`, `profiles`, `events`, & `status`
:link: config
:link-type: doc
`Profile` capability groups, host presets, `Policy`, `Limits`, `Event`, and
`ProgramStatus`.
:::

:::{grid-item-card} `libvt.input` & `libvt.codec`
:link: input
:link-type: doc
Mode-aware `KeyEvent`, `MouseEvent`, `PasteEvent`, and VT sequence `explain`.
:::

:::{grid-item-card} `libvt.aio`
:link: aio/index
:link-type: doc
`AsyncSession`, `AsyncTerminalStream`, and POSIX `open_pty` / `PtySession`.
:::

:::{grid-item-card} `libvt.testing`
:link: testing
:link-type: doc
Zero-dependency `assert_screen`, `assert_screen_box`, `vt_screen`,
`serialize_vt_snapshot`, and `format_vt_diff_lines`.
:::

:::{grid-item-card} `libvt.pytest_plugin`
:link: pytest_plugin
:link-type: doc
Import-light `vt_terminal`, `vt_factory`, `vt_recorder`, `vt_parser`, and
`vt_pty` fixtures (`libvt[pytest]`).
:::

:::{grid-item-card} `libvt.graphics`
:link: graphics
:link-type: doc
`SIXEL` and Kitty `APC G` `ImageMeta` and `ImagePlacement`.
:::

:::{grid-item-card} `libvt.contrib.tmux`
:link: contrib/tmux/index
:link-type: doc
Decoupled `tmux` `profile`, `capture`, `window`, and `control` submodules.
:::

:::{grid-item-card} `libvt.contrib.subprocess`
:link: contrib/subprocess
:link-type: doc
Synchronous child processes on POSIX PTYs and Windows ConPTY.
:::

:::{grid-item-card} `libvt.contrib.syrupy`
:link: contrib/syrupy
:link-type: doc
Optional `syrupy` `VtSnapshotExtension` and conditional `vt_snapshot` fixture for
`.ambr` golden files (`libvt[syrupy]`).
:::

::::

## Policy and Guarantees

::::{grid} 1 2 3 3
:gutter: 2

:::{grid-item-card} Public API
:link: ../project/public-api
:link-type: doc
What is and is not part of the public API.
:::

:::{grid-item-card} Compatibility
:link: ../project/compatibility
:link-type: doc
Supported Python versions and platforms.
:::

:::{grid-item-card} Deprecations
:link: ../project/deprecations
:link-type: doc
Active deprecations and migration guidance.
:::

::::

```{toctree}
:hidden:
:maxdepth: 1

libvt
terminal
screen
views
snapshot
format
recorder
parser
style
modes
config
profiles
events
status
input
codec
graphics
aio/index
contrib/index
testing
pytest_plugin
exc
```
