CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-azure-ai-documentintelligence

Azure AI Document Intelligence client library for Python - a cloud service that uses machine learning to analyze text and structured data from documents

76

1.18x
Overview
Eval results
Files

task.mdevals/scenario-2/

Blob Batch Analysis Coordinator

Utility for launching and managing batch document analysis jobs against Azure Blob Storage so multiple files can be processed and results collected in bulk.

Capabilities

Submit batch run

  • Starts a batch analysis when given a model identifier, source container URL, and result container URL; optionally accepts a file list path, result prefix, and overwrite flag; returns both an operation identifier and continuation token. @test
  • Raises a clear error when required URLs are missing. @test

Inspect batch status

  • Resumes a batch run from a continuation token and returns the current status plus succeeded, failed, and skipped document counts without reconfiguring sources. @test

List recent runs

  • Pages through recent batch runs for a model, yielding summaries limited by caller-provided skip/top values that include operation id, status, and percent complete when available. @test

Cleanup results

  • Deletes a stored batch result when given the model identifier and result id so storage does not retain completed runs. @test

Implementation

@generates

API

from typing import Dict, Iterable, Optional, TypedDict, Tuple


class BatchRunSummary(TypedDict):
    operation_id: str
    status: str
    percent_completed: Optional[int]


def start_batch_run(
    model_id: str,
    source_container_url: str,
    *,
    file_list_path: Optional[str] = None,
    result_container_url: str,
    result_prefix: Optional[str] = None,
    overwrite_existing: bool = False
) -> Tuple[str, str]:
    """
    Starts a batch analysis job and returns (operation_id, continuation_token).
    Raises ValueError when required URLs are missing.
    """


def resume_batch_status(continuation_token: str) -> Dict[str, int]:
    """
    Resumes a batch analysis using continuation token and returns succeeded_count,
    failed_count, skipped_count, and current status.
    """


def list_batch_runs(
    model_id: str,
    *,
    skip: int = 0,
    top: int = 20
) -> Iterable[BatchRunSummary]:
    """
    Iterates over recent batch runs for a model yielding summaries.
    """


def delete_batch_run(model_id: str, result_id: str) -> None:
    """
    Removes the stored batch result for the given identifiers.
    """

Dependencies { .dependencies }

azure-ai-documentintelligence { .dependency }

Provides batch document analysis and run management against Azure resources.

Install with Tessl CLI

npx tessl i tessl/pypi-azure-ai-documentintelligence

tile.json