Skip to content

tinker_cookbook.stores.IncrementalReader

class tinker_cookbook.stores.IncrementalReader(**)

Reads a JSONL file incrementally, tracking the byte offset.

property records

All buffered records (copy). Bounded by max_records.

property total_read

Total number of records read since creation (not bounded by max_records).

property known_keys

All metric keys seen (excluding 'step').

read()

Read new lines since last call. Returns only new records.

aread()

Async version of read().

has_data()

Return True if records exist in memory or on disk.