types-beautifulsoup4
Typing stubs for beautifulsoup4
Decision gist · record as of 2026-08-14
Yes, if you use beautifulsoup4 4.12.* and want static type checking. Install only if your project targets beautifulsoup4 4.12; uninstall if you upgrade to 4.13.0 or later, which includes native type annotations. No security vulnerabilities and low install friction make it a safe addition to type-checking workflows.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires beautifulsoup4 to be installed separately; intended for beautifulsoup4 versions 4.12.* only.
- beautifulsoup4 4.13.0+ includes its own type annotations, making this package redundant for newer versions.
- Low friction; a pure-Python stub package with a single runtime dependency on types-html5lib.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions, making it safe to include in most projects.
last release 2025-05-16 (455 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,656,880 downloads/mo, #2,061 on PyPI
Alternatives
Verify before relying
pip install types-beautifulsoup4
# Type checker now understands beautifulsoup4 types when checking your code- Whether the stub package remains compatible with beautifulsoup4 4.12.x releases beyond the latest tested version
- Coverage completeness of type annotations relative to beautifulsoup4's full API surface
- Which type checkers (mypy, pyright, pytype, Pyre, PyCharm) are actively tested against this version
What it is and what it does
types-beautifulsoup4 is a PEP 561 type stub package that adds static type information to beautifulsoup4, allowing type checkers to understand and validate code that uses beautifulsoup4. It's part of the typeshed project and targets beautifulsoup4 version 4.12.*.
The package is marked as partial, meaning some type annotations may be incomplete or missing. It's designed as a bridge for users of beautifulsoup4 4.12 who want type-checking support; users of beautifulsoup4 4.13.0 or later should uninstall this package since those versions include built-in type annotations.
Use it for
- Enable type checkers to validate web scraping code that uses beautifulsoup4 4.12
- Catch type errors in HTML parsing logic before runtime in a CI/CD pipeline
- Provide IDE autocomplete and type hints for BeautifulSoup objects in development
- Validate code that chains beautifulsoup4 method calls for correctness
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use beautifulsoup4 4.12.* and want static type checking.
Install only if your project targets beautifulsoup4 4.12; uninstall if you upgrade to 4.13.0 or later, which includes native type annotations. No security vulnerabilities and low install friction make it a safe addition to type-checking workflows.
Install
types-beautifulsoup4 on PyPI
Before you install
Low friction; a pure-Python stub package with a single runtime dependency on types-html5lib. Actively maintained as part of typeshed, with recent releases tracking beautifulsoup4 4.12.* versions.
Requires beautifulsoup4 to be installed separately; intended for beautifulsoup4 versions 4.12.* only. beautifulsoup4 4.13.0+ includes its own type annotations, making this package redundant for newer versions.
License in practice
Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions, making it safe to include in most projects.
Quickstart
pip install types-beautifulsoup4
# Type checker now understands beautifulsoup4 types when checking your code
Verify before relying
- Whether the stub package remains compatible with beautifulsoup4 4.12.x releases beyond the latest tested version
- Coverage completeness of type annotations relative to beautifulsoup4's full API surface
- Which type checkers (mypy, pyright, pytype, Pyre, PyCharm) are actively tested against this version
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetypes-html5lib |
| Maintenance | Actively maintained 455 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,656,880 / month, #2,061 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_beautifulsoup4-4.12.0.20250516-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “beautifulsoup4 type hints”
- types-beautifulsoup4Provides type hints for beautifulsoup4 code via PEP 561 stubs,…
- bs4This package is a placeholder that redirects users to install…
- sphinx-toolboxSphinx-toolbox extends Sphinx with a collection of utility extensions…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also types-Pillow · types-urllib3 · docutils-stubs · typeapi · types-SQLAlchemy · types-DateTimeRange · types-pyOpenSSL · types-boto · typeshed-client · construct-typing