Azure AI Document Intelligence client library for Python - a cloud service that uses machine learning to analyze text and structured data from documents
76
Utility for downloading stored document analysis outputs as searchable PDFs and figure images, with optional cleanup of the stored result.
<output_dir>/<result_id>.pdf, returning the saved path in the result object. @test<output_dir>/<result_id>_figure_<index>.<image_format>, returning all saved paths in order. @testdelete_after is true, deletes the stored analysis result after all downloads succeed and reports whether deletion occurred. @test@generates
from dataclasses import dataclass
from typing import Iterable, List, Optional
@dataclass
class ExportResult:
pdf_path: Optional[str]
figure_paths: List[str]
deleted: bool
def export_analysis_assets(
client,
result_id: str,
output_dir: str,
include_pdf: bool = True,
figure_indexes: Optional[Iterable[int]] = None,
delete_after: bool = False,
image_format: str = "png",
overwrite: bool = False,
) -> ExportResult:
"""Downloads analysis outputs (searchable PDF and figure images) for a stored result ID and optionally deletes the stored result."""Provides retrieval of stored analysis results as searchable PDFs or figure images and deletion of stored results.
Install with Tessl CLI
npx tessl i tessl/pypi-azure-ai-documentintelligencedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10