--- id: doclang version: "0.7.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # doclang — DocLang reference toolkit License: permissive · Maintenance: active · Downloads: 2.3M/mo ## 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 above — 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 pip install doclang uv add doclang 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_current - Install friction: low - Maintenance: active - Downloads: 2.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags document validation markup format, llm document format toolkit, xml schema validation, ai-native document format, schematron validation, document packaging tool, structured content for llms, llm-document-format, xml-validation, ai-content-pipeline [View on SkillFed](https://skillfed.io/packages/doclang) · [View on PyPI](https://pypi.org/project/doclang/)