types-docutils
Typing stubs for docutils
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-docutilsuv
uv add types-docutilspoetry
poetry add types-docutilsInstalling 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
Tags
More Documentation packages
Docutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
griffeGriffe extracts the complete structure and…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
types-fpdf2Provides type stubs for the fpdf2 PDF…
permissive · top 15,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-yt-dlpProvides type hints for yt-dlp, enabling static…
permissive · top 15,000 on PyPI
types-zstdProvides type hints for the zstd compression…
permissive · top 15,000 on PyPI
types-paramikoProvides type hints for paramiko, enabling…
permissive · top 1,000 on PyPI
types-psycopg2Provides type hints for psycopg2, enabling…
permissive · top 5,000 on PyPI
types-PygmentsProvides type hints for the Pygments syntax…
permissive · top 5,000 on PyPI
types-python-dateutilProvides type annotations for the…
permissive · top 1,000 on PyPI
types-pycurlProvides type hints for the pycurl HTTP client…
permissive · top 15,000 on PyPI
types-pyRFC3339Provides type hints for pyRFC3339, enabling…
permissive · top 15,000 on PyPI