Skip to content

Batch progress callback / event hook #2

@ArkNill

Description

@ArkNill

Feature Request

BatchProcessor.process_directory() currently runs silently. Add a progress callback:

def on_progress(current: int, total: int, path: str, result: ExtractionResult):
    print(f"[{current}/{total}] {path}: {'OK' if result.data else 'FAILED'}")

processor.process_directory("./docs/", schema=InvoiceSchema, on_progress=on_progress)

Motivation

Useful for long-running batch jobs and integration with progress bars.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions