Backend

A transcript-parsing backend.

Usage

Source

Backend()

Implementations parse a batch of transcript paths into ParsedTranscript objects, streaming results as they finish.

Methods

Name Description
parse_batch() Parses paths concurrently, yielding results as they complete.

parse_batch()

Parses paths concurrently, yielding results as they complete.

Usage

Source

parse_batch(paths, *, prefetch, spec=None)
Parameters
paths: Sequence[tuple[Path, float]]

Pairs of (path, mtime) to parse.

prefetch: int

The number of files to keep in flight at once.

spec: FilterSpec | None = None
When given, events failing the spec are dropped during parsing; portable specs run in the Rust backend, others fall back to the Python interpreter.
Yields
One: AsyncIterator[ParsedTranscript]
class:ParsedTranscript per input path.