--- id: lxml-stubs version: "0.5.1" license: unclear license_treatment: permissive maintenance: abandoned --- # lxml-stubs — Type annotations for the lxml package License: permissive · Maintenance: abandoned · Downloads: 4.5M/mo ## What it is and what it does lxml-stubs is a package of external type annotations for lxml, the popular XML and HTML processing library. It allows developers using mypy or other PEP 484-compatible type checkers to catch type errors in code that uses lxml. The stubs were originally part of typeshed but were extracted into a separate repository because lxml's annotations are still incomplete and the maintainers wanted to avoid false positives from partial annotations. The package installs as a wheel with no runtime dependencies and integrates automatically with mypy. However, the repository is now archived and abandoned, with the last commit on 2026-05-13 and no releases for 947 days. This means type annotations may not reflect recent changes to lxml itself, and gaps in coverage are unlikely to be filled. Use it for: - Enable mypy type checking on projects that depend on lxml for XML/HTML parsing - Catch type errors in lxml API calls during development rather than at runtime - Integrate lxml into a fully typed codebase without treating it as untyped ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type annotations for the lxml package to enable static type checking with mypy and other type checkers. Yes, if you are actively using mypy with lxml and can tolerate incomplete type coverage and no ongoing maintenance. The permissive license and zero runtime dependencies make installation safe. However, be aware that the abandoned status means type annotations will not be updated for new lxml features or API changes. ## Install pip install lxml-stubs uv add lxml-stubs poetry add lxml-stubs ## Installing lxml-stubs Before you install: Low install friction with no runtime dependencies. However, the repository is archived and abandoned as of the last commit on 2026-05-13, with no releases for 947 days. License in practice: Licensed under Apache Software License (permissive), allowing use in commercial and private projects with minimal restrictions. Quickstart: pip install lxml-stubs Then mypy will automatically use the type annotations when checking code that imports lxml. Verify before relying: - Current completeness of type annotations relative to lxml's full API surface - Compatibility with recent lxml versions and mypy releases - Whether the abandoned status affects ongoing type stub maintenance ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 4.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags lxml type stubs, type annotations lxml, mypy lxml support, static type checking xml, lxml type hints, pep 484 lxml, type-stubs, mypy [View on SkillFed](https://skillfed.io/packages/lxml-stubs) · [View on PyPI](https://pypi.org/project/lxml-stubs/)