skillfed

doclang

DocLang reference toolkit

doclang v0.7.3 2.3M downloads/30d#3,138 on PyPI526
Permissive license Apache-2.0 Active released

What it is and what it does

DocLang is a reference implementation toolkit for a markup format designed specifically for AI and LLM workflows. It provides command-line tools and a Python API to validate documents against the DocLang specification and package them for consumption by language models. The format preserves document structure, semantics, layout, and geometry in a single unambiguous representation that maps cleanly to LLM tokens.

The toolkit depends on lxml for XML processing and typer for CLI construction. It supports validation via XSD and Schematron, and document packaging operations. The package targets Python 3.10 and later, with active development and a specification maintained in the project repository.

Use it for:

  • Validate DocLang-formatted documents before feeding them to LLM or VLM pipelines to ensure structural correctness.
  • Package structured documents for consumption by AI models while preserving layout and semantic information.
  • Build document processing workflows that need to maintain both human readability and machine-parseable structure.
  • Integrate DocLang validation into CI/CD pipelines for content quality assurance before model inference.
  • Convert or normalize unstructured content into a standardized format for multimodal LLM applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

DocLang is a reference toolkit for validating and packaging documents in DocLang format, an AI-native markup designed to preserve structure and semantics while mapping cleanly to LLM tokens.

Yes. The package has low install friction, active maintenance, no known vulnerabilities, and a permissive license. It fills a specific niche—standardizing document representation for LLM/VLM workflows—with a clean CLI and Python API. Suitable for production use if you are working with DocLang-formatted content or building AI document pipelines.

Install

doclang on PyPI

pip

pip install doclang

uv

uv add doclang

poetry

poetry add doclang

Installing doclang

Before you install

Low friction: pure Python wheel with only lxml and typer as runtime dependencies. Active maintenance with a release within the last 30 days and a live repository.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions—suitable for most projects.

Quickstart

pip install "doclang[schematron-saxon]"

doclang validate -n my_document.dclg
doclang pack my_document.dclg

Requires Python 3.10 or later.

Verify before relying

  • Whether the optional schematron-saxon extra is required for typical validation workflows or only for advanced use cases.
  • Performance characteristics when validating large documents or batch processing many files.
  • Maturity and stability guarantees given the first release was 2026-06-02.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — lxml, typer
Maintenance actively maintained — 30 days since the last release
Last repo commit
First released
Downloads 2,326,709/month — #3,138 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: doclang-0.7.3-py3-none-any.whl

Keywords: doclang, xml, validation, xsd, schematron, documents, llm

Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Text Processing :: Markup :: XML

Tags

document validation markup formatllm document format toolkitxml schema validationai-native document formatschematron validationdocument packaging toolstructured content for llms
llm-document-formatxml-validationai-content-pipeline

More Libraries packages