A python library to define and validate data types in Docling.
Actively maintained. Last release 10 days ago, commits in 25 of the last 26 weeks. A safe choice.
pip install docling-coreDocling Core
Docling Core is a library that defines core data types and transformations in Docling.
Installation
To use Docling Core, simply install docling-core from your package manager, e.g. pip:
pip install docling-core
Development setup
To develop for Docling Core, you need Python 3.10 through 3.15 and the uv package. You can then install it from your local clone's root directory:
uv sync --all-extras
To run the pytest suite, execute:
uv run pytest -s test
Main features
Docling Core provides the foundational DoclingDocument data model and API, as well as additional APIs for tasks like serialization and chunking, which are key to developing generative AI applications using Docling.
DoclingDocument
Docling Core defines the DoclingDocument as a Pydantic model, allowing for advanced data model control, customizability, and interoperability.
In addition to specifying the schema, it provides a handy API for building documents, as well as for basic operations, e.g. exporting to various formats, like Markdown, HTML, and others.