skillfed

types-html5lib

Typing stubs for html5lib

types-html5lib v1.1.11.20260518 10.2M downloads/30d#1,472 on PyPI37
Permissive license Apache-2.0 Active released

What it is and what it does

types-html5lib is a type stub package that bridges the gap between the html5lib HTML parser and static type checkers. It provides type annotations for html5lib's public API, allowing mypy, pyright, and other type checkers to validate code that uses html5lib without runtime overhead. The stubs are maintained as part of the typeshed project and are tested against current versions of major type checkers.

When installed alongside html5lib, this package enables developers to catch type-related bugs during development rather than at runtime. It targets html5lib version 1.1.x and requires Python 3.10 or later. The package has a single runtime dependency (types-webencodings) and is distributed as a pure wheel, making installation straightforward.

Use it for:

  • Enable mypy or pyright to type-check code that parses HTML with html5lib in a CI/CD pipeline.
  • Develop HTML parsing applications with IDE autocomplete and type hints for html5lib methods and classes.
  • Validate type safety in projects that combine html5lib with other typed libraries in a large codebase.
  • Ensure compatibility between html5lib usage and strict type-checking configurations.

Worth the install?

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

Provides type hints for the html5lib HTML parser, enabling static type checkers like mypy and pyright to validate code that uses html5lib.

Yes, if you use html5lib and run static type checking. It has no runtime cost, low install friction, and is actively maintained as part of typeshed. If you don't use a type checker or don't use html5lib, it provides no value. Apache-2.0 licensing poses no restrictions.

Install

types-html5lib on PyPI

pip

pip install types-html5lib

uv

uv add types-html5lib

poetry

poetry add types-html5lib

Installing types-html5lib

Before you install

Low install friction; a pure-Python wheel with a single lightweight runtime dependency (types-webencodings). Maintained actively as part of the typeshed project with recent commits.

License in practice

Apache-2.0 permissive license allows use in most projects without restriction; suitable for both open-source and commercial work.

Quickstart

pip install types-html5lib

# In your code, import html5lib normally; type checkers will use the stubs
import html5lib
parser = html5lib.HTMLParser()
doc = parser.parse("<html></html>")

Requires Python 3.10 or later; only provides type information, not runtime functionality—html5lib itself must be installed separately.

Verify before relying

  • Coverage of html5lib 1.1.x API surface completeness beyond the tested type checkers (mypy 2.1.0, pyright 1.1.409).
  • Whether stubs remain synchronized with html5lib releases after the typeshed commit date.

Package facts

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

Evidence: types_html5lib-1.1.11.20260518-py3-none-any.whl

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

Tags

type stubs html5libhtml5lib type hintsmypy html5lib typingstatic type checking html parsertypeshed html5lib stubs
type-stubstypeshed

More HTML packages