Files
fotoplaner/venv/lib/python3.12/site-packages/docling/__init__.py
T
anders 16c54c6653 Tilføjet venv med docling og afhængigheder
Testfiler opdelt i PNG og previews
2026-10-27 12:20:23 +01:00

27 lines
798 B
Python

# SPDX-FileCopyrightText: The Docling Contributors
# SPDX-License-Identifier: MIT
"""Docling: parse documents and convert them to a unified representation."""
import importlib.metadata
__all__ = ["__version__"]
def _resolve_version() -> str:
"""Return the installed Docling version, or ``"unknown"``.
``docling`` is a meta-package that is absent on slim installs, where only
``docling-slim`` is present. This mirrors the fallback that ``docling
--version`` applies to :class:`docling.datamodel.document.DoclingVersion`.
"""
for name in ("docling", "docling-slim"):
try:
return importlib.metadata.version(name)
except importlib.metadata.PackageNotFoundError:
continue
return "unknown"
__version__: str = _resolve_version()