skillfed

types-docutils

Typing stubs for docutils

types-docutils v0.22.3.20260724 13.0M downloads/30d#1,300 on PyPI37
Permissive license Apache-2.0 Active released

What it is and what it does

types-docutils is a type stub package that bridges the gap between the docutils library and Python's static type checkers. It provides type annotations for docutils so that tools like mypy and pyright can validate code that uses docutils for document parsing, transformation, and rendering without requiring the docutils package itself to include inline type hints.

The stubs are maintained as part of the typeshed project and are kept in sync with docutils 0.22.3. Since this is a stub-only package with no runtime dependencies, it installs quickly and adds no overhead to your application—it's purely a development tool for catching type errors during static analysis.

Use it for:

  • Enable mypy or pyright to type-check code that parses reStructuredText using docutils.
  • Catch type errors in document processing pipelines before runtime.
  • Integrate docutils into a codebase with strict type-checking enabled.
  • Validate custom docutils transforms and visitor implementations against the correct types.

Worth the install?

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

Provides type hints for the docutils library, enabling static type checkers like mypy and pyright to validate code that uses docutils for document processing and parsing.

Yes, if you use docutils and run a static type checker. It has no runtime cost, no dependencies, and is actively maintained. Install it alongside docutils in your development environment to catch type errors early. Not necessary if you don't use a type checker or don't use docutils.

Install

types-docutils on PyPI

pip

pip install types-docutils

uv

uv add types-docutils

poetry

poetry add types-docutils

Installing types-docutils

Before you install

Low friction; a pure stub package with no runtime dependencies. Actively maintained as part of typeshed, with a recent release (21 days old) tested against mypy 2.3.0 and pyright 1.1.411.

License in practice

Apache-2.0 permissive license; you can use this freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install types-docutils

# In your code, type checkers will now understand docutils imports:
from docutils import nodes
from docutils.parsers.rst import Parser

# mypy or pyright will validate usage against the type stubs

Requires Python 3.10 or later; only useful when running a type checker (mypy, pyright, etc.) as part of your development workflow.

Verify before relying

  • Whether the stubs cover all docutils 0.22.3 APIs or only a subset of the public interface.
  • Compatibility with type checkers other than mypy 2.3.0 and pyright 1.1.411.

Package facts

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

Evidence: types_docutils-0.22.3.20260724-py3-none-any.whl

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs docutilsdocutils type hintsmypy docutils annotationsstatic type checking document processingpyright docutils types
type-stubsstatic-analysis

More Documentation packages