$npx skillfedfor your agent

types-beautifulsoup4

Typing stubs for beautifulsoup4

With conditionsPyPI HTMLReleased May 20255.7M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — types_beautifulsoup4-4.12.0.20250516-py3-none-any.whl
v4.12.0.20250516 · released 2025-05-16 · Python >=3.9 · 1 runtime deps: types-html5lib

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

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
Same gist for agents: .md · .json

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.

With conditions

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

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
types-html5lib
MaintenanceActively maintained 455 days since the last release
Last repo commit
First released
Downloads5,656,880 / month, #2,061 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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

Capabilities
beautifulsoup4 type hintsbeautifulsoup4 type stubstype checking html parsingpep 561 stubs beautifulsoupstatic type checking web scrapingbeautifulsoup4 annotationshtml parsing type safety
Topics
type-stubstypeshed

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 Worth it
PyPI · Dynamic Content · released Sep 2025

MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.

BSD-3-Clausecompiled wheel · 3.9+aging
797.1Mdownloads / mo
Jinja2 Worth it
PyPI · Dynamic Content · released Mar 2025

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.

BSD-3-Clausepure Python · 3.7+aging
718.6Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

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.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
lxml Worth it
PyPI · Python Modules · released May 2026

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.

permissive licensecompiled wheel · 3.8+
416.8Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
Markdown Worth it
PyPI · Python Modules · released Jul 2026

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.

BSD-3-Clausepure Python · 3.10+
121.7Mdownloads / mo

See also types-Pillow · types-urllib3 · docutils-stubs · typeapi · types-SQLAlchemy · types-DateTimeRange · types-pyOpenSSL · types-boto · typeshed-client · construct-typing