Module trase.tools.progress

Lightweight, throttled progress logging for long-running pipeline loops.

Designed for dbt-duckdb Python models and CLI scripts: prints a start line, a heartbeat at most once every interval seconds while iterating, and a final line — enough to show a long S3 loop is alive and roughly how far along it is, without flooding dbt / CI logs.

pp = ProgressPrinter(len(items), "s3_file_schemas")
for item in items:
    ...
    pp.update()
pp.done()

Classes

class ProgressPrinter (total: int, label: str, interval: float = 60.0, stream=None)

Methods

def done(self) ‑> None
def update(self, step: int = 1) ‑> None