-
python3-nh3-0.2.17-1.lbn36.x86_64
nh3
Python bindings to the ammonia HTML sanitization library.
Installation
pip install nh3
Usage
See the documentation.
Performance
A quick benchmark showing that nh3 is about 20 times faster than the deprecated bleach package.
Measured on a MacBook Air (M2, 2022).
Python 3.11.0 (main, Oct 25 2022, 16:25:24) [Clang 14.0.0 (clang-1400.0.29.102)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.9.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import requests
In [2]: import bleach
In [3]: import nh3
In [4]: html = requests.get("https:/www.google.com").text
In [5]: %timeit bleach.clean(html)
2.85 ms ± 22.8 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
In [6]: %timeit nh3.clean(html)
138 µs ± 860 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
License
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+all-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in all extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+aws-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in aws extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+clipboard-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in clipboard extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+compression-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in compression extras requires for
python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+computation-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in computation extras requires for
python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+consortium-standard-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in consortium-standard extras requires for
python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+excel-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in excel extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+feather-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in feather extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36
-
python3-pandas+fss-2.2.3-1.lbn36.x86_64
This is a metapackage bringing in fss extras requires for python3-pandas.
It makes sure the dependencies are installed.
Located in
LBN
/
…
/
Data Science
/
BastionLinux 36