docling の API リファレンス
docling (docling-project/docling) の公開 API 176 件 —— クラス 104、関数 16、メソッド 56。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: docling-project/docling
| 種別 | 件数 |
|---|---|
| クラス | 104 |
| 関数 | 16 |
| メソッド | 56 |
API 一覧
class
docling.backend.abstract_backend.DeclarativeDocumentBackendDeclarativeDocumentBackend.
class
docling.backend.abstract_backend.PaginatedDocumentBackendPaginatedDocumentBackend.
class
docling.backend.boxnote_backend.BoxNoteDocumentBackendDeclarative backend for Box Notes (.boxnote files).
func
docling.backend.docx.drawingml.utils.convert_with_libreoffice(input_path:str | Path, output_path:str | Path) -> NoneConvert a DOCX/PPTX file to PDF via LibreOffice.
func
docling.backend.docx.drawingml.utils.get_libreoffice_cmd(raise_if_unavailable:bool=False) -> Optional[str]Return the libreoffice cmd and optionally test it.
class
docling.backend.docx.latex.omml.PrProperties element processor for OMML elements.
method
docling.backend.docx.latex.omml.Pr.do_brk(elm:_Element) -> strProcess line break element.
method
docling.backend.docx.latex.omml.Pr.do_common(elm:_Element) -> NoneProcess common property elements.
func
docling.backend.docx.latex.omml.escape_latex(strs:str) -> strEscape special LaTeX characters in a string.
func
docling.backend.docx.latex.omml.get_val(key:str | None, default:str, store:dict | None=CHR) -> strGet a value from a dictionary store or return the key/default.
func
docling.backend.docx.latex.omml.load(stream:Any) -> Iterator[str]Load and convert OMML elements from a stream.
func
docling.backend.docx.latex.omml.load_string(string:str) -> Iterator[str]Load and convert OMML elements from a string.
class
docling.backend.docx.latex.omml.oMath2LatexConvert OMML oMath elements to LaTeX format.
method
docling.backend.docx.latex.omml.oMath2Latex.do_acc(elm:_Element) -> strProcess accent element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_bar(elm:_Element) -> strProcess bar element (overline/underline).
method
docling.backend.docx.latex.omml.oMath2Latex.do_d(elm:_Element) -> strProcess delimiter element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_eqarr(elm:_Element) -> strProcess equation array element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_f(elm:_Element) -> strProcess fraction element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_fname(elm:_Element) -> strProcess function name element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_func(elm:_Element) -> strProcess function application element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_lim(elm:_Element) -> strProcess limit content element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_limlow(elm:_Element) -> strProcess lower limit element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_limupp(elm:_Element) -> strProcess upper limit element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_m(elm:_Element) -> strProcess matrix element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_mr(elm:_Element) -> strProcess matrix row element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_nary(elm:_Element) -> strProcess n-ary operator element (e.g., sum, product, integral).
method
docling.backend.docx.latex.omml.oMath2Latex.do_r(elm:_Element) -> strProcess run element containing text.
method
docling.backend.docx.latex.omml.oMath2Latex.do_rad(elm:_Element) -> strProcess radical (root) element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_spre(elm:_Element) -> NoneProcess pre-sub-superscript element (not supported yet).
method
docling.backend.docx.latex.omml.oMath2Latex.do_ssub(elm:_Element) -> strProcess subscript element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_ssubsup(elm:_Element) -> strProcess combined sub-superscript element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_ssup(elm:_Element) -> strProcess superscript element.
method
docling.backend.docx.latex.omml.oMath2Latex.do_sub(elm:_Element) -> strProcess standalone subscript content.
method
docling.backend.docx.latex.omml.oMath2Latex.do_sup(elm:_Element) -> strProcess standalone superscript content.
method
docling.backend.docx.latex.omml.oMath2Latex.latex() -> strGet the LaTeX representation.
method
docling.backend.docx.latex.omml.oMath2Latex.process_unicode(s:str) -> strProcess Unicode character and convert to LaTeX.
method
docling.backend.docx.latex.omml.oMath2Latex.process_unknow(elm:_Element, stag:str) -> Any | NoneHandle unknown element types.
class
docling.backend.image_backend.ImageDocumentBackendImage-native backend that bypasses pypdfium2.
class
docling.backend.msexcel_backend.ExcelCellRepresents an Excel cell.
class
docling.backend.msexcel_backend.ExcelTableRepresents an Excel table on a worksheet.
class
docling.backend.noop_backend.NoOpBackendA no-op backend that only validates input existence.
class
docling.backend.opendocument_backend.OdtDocumentBackendBackend for OpenDocument Text (``.odt``) files.
func
docling.backend.utils.image_resource_loader.validate_url_safety(url:str) -> NoneReject URLs that resolve to a non-public IP address.
class
docling.backend.webvtt_backend.WebVTTDocumentBackendDeclarative backend for WebVTT (.vtt) files.
class
docling.backend.xml.uspto_backend.PatentUsptoParser of patent documents from the US Patent Office.
method
docling.backend.xml.uspto_backend.PatentUspto.parse(patent_content:str) -> DoclingDocument | NoneParse a USPTO patent.
class
docling.backend.xml.uspto_backend.PatentUsptoAppV1.PatentHandlerSAX ContentHandler for patent documents.
class
docling.backend.xml.uspto_backend.PatentUsptoGrantAps.FieldRepresent a field in a patent APS document.
class
docling.backend.xml.uspto_backend.PatentUsptoGrantAps.SectionRepresent a section in a patent APS document.
class
docling.backend.xml.uspto_backend.PatentUsptoGrantV2.PatentHandlerSAX ContentHandler for patent documents.
class
docling.backend.xml.uspto_backend.PatentUsptoIce.PatentHandlerSAX ContentHandler for patent documents.
class
docling.datamodel.accelerator_options.AcceleratorDeviceDevices to run model inference
class
docling.datamodel.backend_options.BaseBackendOptionsCommon options for all declarative document backends.
class
docling.datamodel.backend_options.EbcdicBackendOptionsOptions specific to the EBCDIC backend.
class
docling.datamodel.backend_options.EbcdicFieldA single fixed-width field of an EBCDIC record.
class
docling.datamodel.backend_options.EbcdicFieldTypeStorage type of a field inside an EBCDIC record.
class
docling.datamodel.backend_options.EbcdicLayoutParsing rules for an EBCDIC data file.
class
docling.datamodel.backend_options.EbcdicRecordLayoutField layout of one record schema, i.e.
class
docling.datamodel.backend_options.EpubBackendOptionsOptions specific to the EPUB backend.
class
docling.datamodel.backend_options.HTMLBackendOptionsOptions specific to the HTML backend.
class
docling.datamodel.backend_options.LatexBackendOptionsOptions specific to the LaTeX backend.
class
docling.datamodel.backend_options.MarkdownBackendOptionsOptions specific to the Markdown backend.
class
docling.datamodel.backend_options.MetsGbsBackendOptionsOptions specific to the METS-GBS document backend.
class
docling.datamodel.backend_options.MsExcelBackendOptionsOptions specific to the MS Excel backend.
class
docling.datamodel.backend_options.MsPowerpointBackendOptionsOptions specific to the MS PowerPoint backend.
class
docling.datamodel.backend_options.MsWordBackendOptionsOptions specific to the MS Word backend.
class
docling.datamodel.backend_options.PdfBackendOptionsBackend options for pdf document backends.
class
docling.datamodel.backend_options.XBRLBackendOptionsOptions specific to the XBRL backend.
class
docling.datamodel.base_models.ErrorItemStructured error information from document conversion.
class
docling.datamodel.base_models.InputFormatA document format supported by document backend parsers.
class
docling.datamodel.document.InputDocumentA document as an input of a Docling conversion.
func
docling.datamodel.document.build_invalid_input_errors(in_doc:'InputDocument') -> list[ErrorItem]Build the ErrorItem list for an invalid input document.
class
docling.datamodel.extraction.ExtractedPageDataData model for extracted content from a single page.
class
docling.datamodel.extraction.ExtractionResultResult of document extraction.
class
docling.datamodel.pipeline_options.BaseLayoutOptionsBase options for document layout analysis models.
class
docling.datamodel.pipeline_options.BaseOptionsBase class for all pipeline option models.
class
docling.datamodel.pipeline_options.BaseTableStructureOptionsBase options for table structure extraction models.
class
docling.datamodel.pipeline_options.ConvertPipelineOptionsBase configuration for document conversion pipelines.
class
docling.datamodel.pipeline_options.EasyOcrOptionsConfiguration for EasyOCR engine.
class
docling.datamodel.pipeline_options.LayoutOptionsDeprecated.
class
docling.datamodel.pipeline_options.LayoutPostprocessorOptionsStage options for ``LayoutPostprocessingModel``.
class
docling.datamodel.pipeline_options.NemotronOcrOptionsConfiguration for NVIDIA Nemotron OCR.
class
docling.datamodel.pipeline_options.OcrModeHow to generate the input for the OCR model
class
docling.datamodel.pipeline_options.PipelineOptionsBase configuration for document processing pipelines.
class
docling.datamodel.pipeline_options.TableStructureOptionsOptions for the table structure (TableFormer V1).
class
docling.datamodel.pipeline_options.TableStructureV2OptionsOptions for the table structure (TableFormer V2).
class
docling.datamodel.pipeline_options.VideoPipelineOptionsConfiguration options for the video pipeline.
class
docling.datamodel.pipeline_options.VlmConvertOptionsConfiguration for VLM-based document conversion.
func
docling.datamodel.pipeline_options.normalize_pdf_backend(backend:PdfBackend) -> PdfBackendNormalize deprecated backend enum values to current ones.
class
docling.datamodel.pipeline_options_vlm_model.BaseVlmOptionsBase configuration for vision-language models.
method
docling.datamodel.pipeline_options_vlm_model.BaseVlmOptions.build_prompt(page:Optional['SegmentedPage'], *_internal_page:Optional['Page']=None) -> strBuild the prompt for VLM inference.
class
docling.datamodel.service.chunking.ChunkerTypeChoice of the chunkers available in Docling.
class
docling.datamodel.service.chunking.HierarchicalChunkerOptionsConfiguration options for the HierarchicalChunker.
class
docling.datamodel.service.chunking.HybridChunkerOptionsConfiguration options for the HybridChunker.
class
docling.datamodel.service.responses.ConfidenceScoresJSON-safe snapshot of docling confidence scores.
class
docling.datamodel.service.responses.ZipArchiveResultContainer for a zip archive of the conversion.
class
docling.datamodel.stage_model_specs.ApiModelConfigAPI-specific model configuration.
method
docling.datamodel.stage_model_specs.ApiModelConfig.merge_with(base_params:Dict[str, Any]) -> ApiModelConfigMerge with base parameters.
class
docling.datamodel.stage_model_specs.EngineModelConfigEngine-specific model configuration.
method
docling.datamodel.stage_model_specs.EngineModelConfig.merge_with(base_repo_id:str, base_revision:str='main') -> EngineModelConfigMerge with base configuration.
class
docling.datamodel.stage_model_specs.ImageClassificationModelSpecSpecification for an image-classification model.
method
docling.datamodel.stage_model_specs.ImageClassificationModelSpec.get_repo_id(engine_type:ImageClassificationEngineType) -> strGet repository ID for specific engine.
method
docling.datamodel.stage_model_specs.ImageClassificationModelSpec.get_revision(engine_type:ImageClassificationEngineType) -> strGet revision for specific engine.
class
docling.datamodel.stage_model_specs.ObjectDetectionModelSpecSpecification for an object detection model.
method
docling.datamodel.stage_model_specs.ObjectDetectionModelSpec.get_repo_id(engine_type:ObjectDetectionEngineType) -> strGet repository ID for specific engine.
method
docling.datamodel.stage_model_specs.ObjectDetectionModelSpec.get_revision(engine_type:ObjectDetectionEngineType) -> strGet revision for specific engine.
class
docling.datamodel.stage_model_specs.StagePresetMixinMixin for stage options classes that support presets.
method
docling.datamodel.stage_model_specs.StagePresetMixin.get_preset(preset_id:str) -> StageModelPresetGet a specific preset.
method
docling.datamodel.stage_model_specs.StagePresetMixin.list_preset_ids() -> List[str]List all preset IDs for this stage.
method
docling.datamodel.stage_model_specs.StagePresetMixin.list_presets() -> List[StageModelPreset]List all presets for this stage.
method
docling.datamodel.stage_model_specs.StagePresetMixin.register_preset(preset:StageModelPreset) -> NoneRegister a preset for this stage options class.
class
docling.datamodel.stage_model_specs.VlmModelSpecSpecification for a VLM model.
method
docling.datamodel.stage_model_specs.VlmModelSpec.get_api_params(engine_type:VlmEngineType) -> Dict[str, Any]Get API parameters for a specific engine.
method
docling.datamodel.stage_model_specs.VlmModelSpec.get_engine_config(engine_type:VlmEngineType) -> EngineModelConfigGet EngineModelConfig for a specific engine type.
method
docling.datamodel.stage_model_specs.VlmModelSpec.get_repo_id(engine_type:VlmEngineType) -> strGet the repository ID for a specific engine.
method
docling.datamodel.stage_model_specs.VlmModelSpec.get_revision(engine_type:VlmEngineType) -> strGet the model revision for a specific engine.
method
docling.datamodel.stage_model_specs.VlmModelSpec.is_engine_supported(engine_type:VlmEngineType) -> boolCheck if an engine is supported by this model.
class
docling.datamodel.vlm_engine_options.ApiVlmEngineOptionsOptions for API-based VLM services.
class
docling.datamodel.vlm_engine_options.VllmCudaGraphModeCUDA graph capture mode for the vLLM v1 engine.
class
docling.document_converter.LatexFormatOptionFormat options for LaTeX documents.
class
docling.document_extractor.DocumentExtractorStandalone extractor class.
class
docling.document_extractor.ExtractionFormatOptionPer-format configuration for extraction.
class
docling.exceptions.DocumentLoadErrorA backend could not parse the input bytes into a document.
class
docling.models.base_layout_model.BaseLayoutModelShared interface for layout models.
class
docling.models.base_ocr_model.BaseOcrModelBase class for all OCR models.
class
docling.models.base_table_model.BaseTableStructureModelShared interface for table structure models.
method
docling.models.inference_engines.common.kserve_v2_client_base.KserveV2Client.close() -> NoneRelease client resources.
class
docling.models.inference_engines.common.kserve_v2_http.KserveV2InferResponseKServe v2 infer response payload.
func
docling.models.inference_engines.vlm._utils.normalize_image_to_pil(image:Union[Image.Image, np.ndarray]) -> Image.ImageConvert any image format to RGB PIL Image.
func
docling.models.inference_engines.vlm._utils.preprocess_image_batch(images:List[Union[Image.Image, np.ndarray]]) -> List[Image.Image]Preprocess a batch of images to RGB PIL Images.
class
docling.models.inference_engines.vlm.base.BaseVlmEngineAbstract base class for VLM inference engines.
method
docling.models.inference_engines.vlm.base.BaseVlmEngine.cleanup() -> NoneClean up resources (optional).
method
docling.models.inference_engines.vlm.base.BaseVlmEngine.predict(input_data:VlmEngineInput) -> VlmEngineOutputRun inference on a single input.
method
docling.models.inference_engines.vlm.base.BaseVlmEngine.predict_batch(input_batch:List[VlmEngineInput]) -> List[VlmEngineOutput]Run inference on a batch of inputs.
class
docling.models.inference_engines.vlm.base.BaseVlmEngineOptionsBase configuration for VLM inference engines.
class
docling.models.inference_engines.vlm.base.VlmEngineInputInput to a VLM inference engine.
class
docling.models.inference_engines.vlm.base.VlmEngineOutputOutput from a VLM inference engine.
class
docling.models.inference_engines.vlm.base.VlmEngineTypeTypes of VLM inference engines available.
method
docling.models.inference_engines.vlm.base.VlmEngineType.is_api_variant(engine_type:'VlmEngineType') -> boolCheck if an engine type is an API variant.
class
docling.models.inference_engines.vlm.mlx_engine.MlxVlmEngineMLX engine for VLM inference on Apple Silicon.
method
docling.models.inference_engines.vlm.mlx_engine.MlxVlmEngine.cleanup() -> NoneClean up model resources.
method
docling.models.inference_engines.vlm.mlx_engine.MlxVlmEngine.initialize() -> NoneInitialize the MLX model and processor.
method
docling.models.inference_engines.vlm.mlx_engine.MlxVlmEngine.predict_batch(input_batch:List[VlmEngineInput]) -> List[VlmEngineOutput]Run inference on a batch of inputs.
class
docling.models.inference_engines.vlm.vllm_engine.VllmVlmEnginevLLM engine for high-throughput VLM inference.
method
docling.models.inference_engines.vlm.vllm_engine.VllmVlmEngine.cleanup() -> NoneClean up vLLM resources.
method
docling.models.inference_engines.vlm.vllm_engine.VllmVlmEngine.initialize() -> NoneInitialize the vLLM engine.
class
docling.models.stages.layout.layout_model.LayoutModelDeprecated.
class
docling.models.stages.ocr.nemotron_ocr_model.NemotronOcrModelWrapper for Nvidia's nemotron-ocr-v2 model
class
docling.models.utils.generation_utils.GenerationStopperBase interface for stopping logic.
class
docling.pipeline.simple_pipeline.SimplePipelineSimpleModelPipeline.
class
docling.pipeline.standard_pdf_pipeline.ProcessingResultAggregated outcome of a pipeline run.
class
docling.pipeline.standard_pdf_pipeline.RunContextWiring for a single *execute* call.
class
docling.pipeline.standard_pdf_pipeline.ThreadedItemEnvelope that travels between pipeline stages.
class
docling.service_client._async_client.AsyncDoclingServiceClientNative async client for docling-serve.
method
docling.service_client.client.DoclingServiceClient.close() -> NoneRelease HTTP resources owned by this client.
class
docling.service_client.client.RawServiceResultTyped wrapper for non-JSON result payloads.
class
docling.service_client.exceptions.DoclingServiceClientErrorBase error for all client SDK failures.
class
docling.service_client.exceptions.ServiceErrorRaised for non-retryable HTTP service errors.
class
docling.service_client.exceptions.TaskExecutionErrorRaised when task-level orchestration fails.
class
docling.service_client.exceptions.TaskNotFoundErrorRaised when a task id is unknown to the service.
class
docling.service_client.job.ConversionJobLong-lived handle for a submitted docling-serve task.
class
docling.service_client.watchers.AsyncStatusWatcherProtocol for async job status watchers.
class
docling.service_client.watchers.StatusWatcherProtocol for job status watchers.
func
docling.utils.code_language.detect_code_language(text:str, hint:str | None=None) -> CodeLanguageLabelDetect the programming language of a code block.
class
docling.utils.layout_postprocessor.IntervalHelper class for sortable intervals.
method
docling.utils.layout_postprocessor.IntervalTree.find_containing(point:float) -> set[int]Find all intervals containing the point.
method
docling.utils.layout_postprocessor.UnionFind.get_groups() -> dict[int, list[int]]Returns groups as {root: [elements]}.
class
docling.utils.speaker_diarization.DiarizationResultOutput of speaker diarization.
class
docling.utils.speaker_diarization.SpeakerSegmentA time segment attributed to a single speaker.
func
docling.utils.speaker_diarization.diarize(wav_path:Path, num_speakers:int | None=None, accelerator_device:str='auto') -> DiarizationResultRun speaker diarization on a WAV file.
func
docling.utils.utils.create_file_hash(path_or_stream:Union[BytesIO, Path]) -> strCreate a stable page_hash of the path_or_stream of a file
class
docling.utils.video_frame_sampling.VideoFrameA single sampled video frame with its timestamp.
class
docling.utils.video_frame_sampling.VideoFrameSamplingModeFrame sampling strategy for the video pipeline.
class
docling.utils.video_frame_sampling.VideoSceneA contiguous time window treated as one scene.
func
docling.utils.visualization.draw_clusters(image:Image.Image, clusters:list[Cluster], scale_x:float, scale_y:float) -> NoneDraw clusters on an image
func
docling.utils.vlm_utils.strip_stop_strings(texts:list[str], stop_strings:list[str]) -> list[str]Strip stop strings from decoded texts.
この情報について
掲載しているシグネチャは docling-project/docling の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。