--- id: types-html5lib version: "1.1.11.20260518" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-html5lib — Typing stubs for html5lib License: permissive · Maintenance: active · Downloads: 10.2M/mo ## 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 above — 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 pip install types-html5lib uv add types-html5lib 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("") 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_current - Install friction: low - Maintenance: active - Downloads: 10.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs html5lib, html5lib type hints, mypy html5lib typing, static type checking html parser, typeshed html5lib stubs, type-stubs, typeshed [View on SkillFed](https://skillfed.io/packages/types-html5lib) · [View on PyPI](https://pypi.org/project/types-html5lib/)