Comparison
bleach vs lxml-html-clean vs nh3
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
An easy safelist-based HTML-sanitizing tool.
Archived. The repository is read-only: no more fixes or releases will come.
$
pip install bleachHTML cleaner from lxml project
Maintained. Last release 5 days ago, commits in 2 of the last 26 weeks. Weaker on commit activity.
$
pip install lxml-html-cleanPython binding to Ammonia HTML sanitizer Rust crate
Actively maintained. Last release 2 weeks ago, commits in 13 of the last 26 weeks. A safe choice.
$
pip install nh3In short
- bleach is archived: avoid it for new projects.
- nh3 is the most used: 44.8M downloads a month.
- nh3 also has the best Pythie’s Index (89).
- nh3 is growing fastest: downloads +13% over the last month.
- Safe default for a new project: nh3.
Side by side
| Metric | bleach | lxml-html-clean | nh3 |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 9 | 62 |