types-bleach
Typing stubs for bleach
Decision gist · record as of 2026-08-14
Yes, if you use bleach and want static type checking. Install it alongside your type checker (mypy, pyright, or ty) in development or CI environments. The package is lightweight, actively maintained, has no known vulnerabilities, and carries a permissive license. It is only useful if you are already using a static type checker; it adds no runtime value.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; type stubs are only useful when used with a type checker like mypy, pyright, or ty.
- Low friction installation with a single runtime dependency on types-html5lib.
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restrictions.
last release 2026-07-28 (17 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,849,346 downloads/mo, #3,493 on PyPI
Alternatives
Verify before relying
pip install types-bleach
# In your code, type checkers will now understand bleach imports:
import bleach
result: str = bleach.clean('<p>Hello</p>')- Whether the stubs cover all bleach 6.4.* APIs or only a subset of the public surface.
- Whether installing this package is necessary or if bleach itself now ships inline type hints.
What it is and what it does
types-bleach is a type stub package that provides static type information for the bleach HTML sanitization library. It allows type checkers like mypy, pyright, and ty to understand and validate code that calls bleach functions, catching type errors at development time rather than runtime. The stubs are maintained as part of the typeshed project and are generated from the official typeshed repository.
This package is a pure typing aid—it contains no runtime code and does not replace bleach itself. It is useful when you want strict type checking in projects that use bleach but do not want to add bleach as a direct dependency to your type-checking environment, or when bleach does not yet ship its own inline type hints. The package depends on types-html5lib to provide types for bleach's HTML parsing dependency.
Use it for
- Add type checking to a project that uses bleach for HTML sanitization without installing bleach in your type-checking environment.
- Validate bleach function calls and return types in a mypy or pyright configuration before runtime.
- Ensure type safety when passing user input through bleach.clean() or other bleach sanitization functions.
- Integrate bleach into a strictly typed codebase that enforces type checking in CI/CD pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use bleach and want static type checking.
Install it alongside your type checker (mypy, pyright, or ty) in development or CI environments. The package is lightweight, actively maintained, has no known vulnerabilities, and carries a permissive license. It is only useful if you are already using a static type checker; it adds no runtime value.
Install
types-bleach on PyPI
Before you install
Low friction installation with a single runtime dependency on types-html5lib. The package is actively maintained with a recent release and no known vulnerabilities.
Requires Python 3.10 or later; type stubs are only useful when used with a type checker like mypy, pyright, or ty.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restrictions.
Quickstart
pip install types-bleach
# In your code, type checkers will now understand bleach imports:
import bleach
result: str = bleach.clean('<p>Hello</p>')
Verify before relying
- Whether the stubs cover all bleach 6.4.* APIs or only a subset of the public surface.
- Whether installing this package is necessary or if bleach itself now ships inline type hints.
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 packagetypes-html5lib |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,849,346 / month, #3,493 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_bleach-6.4.0.20260728-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 › “type stubs for bleach”
- types-bleachProvides type stubs for the bleach HTML sanitization library,…
- bleach-allowlistProvides curated allowlists of HTML tags, attributes, and CSS styles…
- django-markdownifyA Django template filter that converts Markdown text to sanitized…
Give your agent the search over MCP, or paste the wish link into any chat.
More Quality Assurance packages
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Ruff is a Python linter and code formatter written in Rust that combines linting, formatting, and code fixing into a single tool, replacing Flake8, Black, isort, and related utilities.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Black reformats Python source code to a consistent style by parsing entire files and rewriting them according to an opinionated, deterministic set of rules, eliminating manual formatting decisions.
pytest-xdist distributes pytest tests across multiple CPU cores or machines to speed up test execution, with the simplest usage being `pytest -n auto` to spawn workers equal to available CPUs.
Install it if your test suite takes long enough that parallelization would save meaningful time.
Validates AWS CloudFormation templates in YAML or JSON format against resource provider schemas and best practices, checking property values and configuration correctness.
Install it if you work with CloudFormation templates.
See also types-boltons · types-Deprecated · types-shapely · types-dateparser · types-yt-dlp · types-gunicorn · bleach · bleach-allowlist · types-pyflakes · types-antlr4-python3-runtime