python-nh3
Port variant v14
Summary Leverage ammonia HTML sanitization library (3.14)
Package version 0.3.8
Homepage No known homepage
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v15
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 27 NOV 2026, 01:15:48 UTC
Port created 14 JAN 2025, 19:34:39 UTC
Subpackage Descriptions
single # nh3 ![CI] [PyPI] [Documentation Status] Python bindings to the [ammonia] HTML sanitization library. ## Installation `bash 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). ```ipython 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.
Configuration Switches (platform-specific settings discarded)
PY314 ON Build using Python 3.14 PY315 OFF Build using Python 3.15
Package Dependencies by Type
Build (only) python-maturin:single:v14
rust:single:std
python314:dev:std
python-pip:single:v14
python-setuptools:single:v14
python-wheel:single:v14
python-build:single:v14
python-installer:single:v14
autoselect-python:single:std
Build and Runtime python314:primary:std
Runtime (only) ravensys-gcc:libs:std (single subpackage)
Download groups
main mirror://PYPI/n/nh3
cr01 mirror://CRATES/aliasable:0.1.3
cr02 mirror://CRATES/ammonia:4.2.5
cr03 mirror://CRATES/bitflags:2.13.2
cr04 mirror://CRATES/cfg-if:1.0.5
cr05 mirror://CRATES/cssparser:0.38.0
cr06 mirror://CRATES/displaydoc:0.2.7
cr07 mirror://CRATES/dtoa:1.0.11
cr08 mirror://CRATES/dtoa-short:0.3.5
cr09 mirror://CRATES/fastrand:2.5.0
cr10 mirror://CRATES/form_urlencoded:1.2.2
cr11 mirror://CRATES/heck:0.4.1
cr12 mirror://CRATES/heck:0.5.0
cr13 mirror://CRATES/html5ever:0.40.1
cr14 mirror://CRATES/icu_collections:2.4.0
cr15 mirror://CRATES/icu_locale_core:2.4.0
cr16 mirror://CRATES/icu_normalizer:2.4.0
cr17 mirror://CRATES/icu_normalizer_data:2.4.0
cr18 mirror://CRATES/icu_properties:2.4.0
cr19 mirror://CRATES/icu_properties_data:2.4.0
cr20 mirror://CRATES/icu_provider:2.4.0
cr21 mirror://CRATES/idna:1.1.0
cr22 mirror://CRATES/idna_adapter:1.2.2
cr23 mirror://CRATES/itoa:1.0.19
cr24 mirror://CRATES/libc:0.2.191
cr25 mirror://CRATES/litemap:0.8.3
cr26 mirror://CRATES/lock_api:0.4.14
cr27 mirror://CRATES/log:0.4.35
cr28 mirror://CRATES/maplit:1.0.2
cr29 mirror://CRATES/markup5ever:0.40.0
cr30 mirror://CRATES/memchr:2.8.3
cr31 mirror://CRATES/new_debug_unreachable:1.0.6
cr32 mirror://CRATES/once_cell:1.21.4
cr33 mirror://CRATES/ouroboros:0.18.5
cr34 mirror://CRATES/ouroboros_macro:0.18.5
cr35 mirror://CRATES/parking_lot:0.12.5
cr36 mirror://CRATES/parking_lot_core:0.9.12
cr37 mirror://CRATES/percent-encoding:2.3.2
cr38 mirror://CRATES/phf:0.14.0
cr39 mirror://CRATES/phf_codegen:0.14.0
cr40 mirror://CRATES/phf_generator:0.14.0
cr41 mirror://CRATES/phf_shared:0.14.0
cr42 mirror://CRATES/portable-atomic:1.15.0
cr43 mirror://CRATES/potential_utf:0.1.6
cr44 mirror://CRATES/precomputed-hash:0.1.1
cr45 mirror://CRATES/proc-macro2:1.0.107
cr46 mirror://CRATES/proc-macro2-diagnostics:0.10.1
cr47 mirror://CRATES/pyo3:0.30.1
cr48 mirror://CRATES/pyo3-build-config:0.30.1
cr49 mirror://CRATES/pyo3-ffi:0.30.1
cr50 mirror://CRATES/pyo3-macros:0.30.1
cr51 mirror://CRATES/pyo3-macros-backend:0.30.1
cr52 mirror://CRATES/quote:1.0.47
cr53 mirror://CRATES/redox_syscall:0.5.18
cr54 mirror://CRATES/scopeguard:1.2.0
cr55 mirror://CRATES/serde:1.0.229
cr56 mirror://CRATES/serde_core:1.0.229
cr57 mirror://CRATES/serde_derive:1.0.229
cr58 mirror://CRATES/siphasher:1.0.4
cr59 mirror://CRATES/smallvec:1.16.5
cr60 mirror://CRATES/stable_deref_trait:1.2.1
cr61 mirror://CRATES/static_assertions:1.1.0
cr62 mirror://CRATES/string_cache:0.11.0
cr63 mirror://CRATES/string_cache_codegen:0.11.2
cr64 mirror://CRATES/syn:2.0.119
cr65 mirror://CRATES/syn:3.0.10
cr66 mirror://CRATES/synstructure:0.14.0
cr67 mirror://CRATES/target-lexicon:0.13.6
cr68 mirror://CRATES/tendril:0.5.1
cr69 mirror://CRATES/tinystr:0.8.5
cr70 mirror://CRATES/unicode-ident:1.0.27
cr71 mirror://CRATES/url:2.5.8
cr72 mirror://CRATES/utf8_iter:1.1.0
cr73 mirror://CRATES/utf_types:1.0.0
cr74 mirror://CRATES/version_check:0.9.5
cr75 mirror://CRATES/web_atoms:0.3.0
cr76 mirror://CRATES/windows-link:0.2.1
cr77 mirror://CRATES/writeable:0.6.4
cr78 mirror://CRATES/yansi:1.0.1
cr79 mirror://CRATES/yoke:0.8.4
cr80 mirror://CRATES/yoke-derive:0.8.4
cr81 mirror://CRATES/zerofrom:0.1.8
cr82 mirror://CRATES/zerofrom-derive:0.1.8
cr83 mirror://CRATES/zerotrie:0.2.5
cr84 mirror://CRATES/zerovec:0.11.9
cr85 mirror://CRATES/zerovec-derive:0.11.7
Distribution File Information
5c5a315abc2e9d5d78ce1ba6b592a1ef8cbc7e535dfb1e641966768e87870fe3 26670 rust/crates/nh3-0.3.8.tar.gz 250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd 6169 rust/crates/aliasable-0.1.3.tar.gz b34ca49e407c06daac53f0c4debe8ff5df9cc2a4e9369d164a5d86ef8c219319 65134 rust/crates/ammonia-4.2.5.tar.gz 3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06 51678 rust/crates/bitflags-2.13.2.tar.gz 4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600 9578 rust/crates/cfg-if-1.0.5.tar.gz 11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59 57272 rust/crates/cssparser-0.38.0.tar.gz c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8 21343 rust/crates/displaydoc-0.2.7.tar.gz 4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590 21122 rust/crates/dtoa-1.0.11.tar.gz cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87 8287 rust/crates/dtoa-short-0.3.5.tar.gz da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223 20782 rust/crates/fastrand-2.5.0.tar.gz cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf 9347 rust/crates/form_urlencoded-1.2.2.tar.gz 95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8 11567 rust/crates/heck-0.4.1.tar.gz 2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea 11517 rust/crates/heck-0.5.0.tar.gz 456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130 86221 rust/crates/html5ever-0.40.1.tar.gz fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd 102334 rust/crates/icu_collections-2.4.0.tar.gz 25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0 80269 rust/crates/icu_locale_core-2.4.0.tar.gz 404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599 536741 rust/crates/icu_normalizer-2.4.0.tar.gz 20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc 68011 rust/crates/icu_normalizer_data-2.4.0.tar.gz 2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f 146217 rust/crates/icu_properties-2.4.0.tar.gz b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf 186846 rust/crates/icu_properties_data-2.4.0.tar.gz 413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514 52461 rust/crates/icu_provider-2.4.0.tar.gz 3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de 148747 rust/crates/idna-1.1.0.tar.gz cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714 10444 rust/crates/idna_adapter-1.2.2.tar.gz 3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4 16014 rust/crates/itoa-1.0.19.tar.gz 65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a 855401 rust/crates/libc-0.2.191.tar.gz 47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae 35045 rust/crates/litemap-0.8.3.tar.gz 224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965 29249 rust/crates/lock_api-0.4.14.tar.gz 5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c 54093 rust/crates/log-0.4.35.tar.gz 3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d 8871 rust/crates/maplit-1.0.2.tar.gz 0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842 19195 rust/crates/markup5ever-0.40.0.tar.gz cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98 99165 rust/crates/memchr-2.8.3.tar.gz 650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086 2582 rust/crates/new_debug_unreachable-1.0.6.tar.gz 9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50 35010 rust/crates/once_cell-1.21.4.tar.gz 1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59 11678 rust/crates/ouroboros-0.18.5.tar.gz 3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0 22021 rust/crates/ouroboros_macro-0.18.5.tar.gz 93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a 46735 rust/crates/parking_lot-0.12.5.tar.gz 2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1 34110 rust/crates/parking_lot_core-0.9.12.tar.gz 9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220 11583 rust/crates/percent-encoding-2.3.2.tar.gz 010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6 27393 rust/crates/phf-0.14.0.tar.gz 41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe 17417 rust/crates/phf_codegen-0.14.0.tar.gz aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100 20446 rust/crates/phf_generator-0.14.0.tar.gz c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89 20291 rust/crates/phf_shared-0.14.0.tar.gz 05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85 202705 rust/crates/portable-atomic-1.15.0.tar.gz d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661 10420 rust/crates/potential_utf-0.1.6.tar.gz 925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c 1640 rust/crates/precomputed-hash-0.1.1.tar.gz 985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9 59588 rust/crates/proc-macro2-1.0.107.tar.gz af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8 12219 rust/crates/proc-macro2-diagnostics-0.10.1.tar.gz 229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4 1345706 rust/crates/pyo3-0.30.1.tar.gz 70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700 42996 rust/crates/pyo3-build-config-0.30.1.tar.gz 5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4 93717 rust/crates/pyo3-ffi-0.30.1.tar.gz c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60 9055 rust/crates/pyo3-macros-0.30.1.tar.gz 38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b 97593 rust/crates/pyo3-macros-backend-0.30.1.tar.gz 1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001 31622 rust/crates/quote-1.0.47.tar.gz ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d 30747 rust/crates/redox_syscall-0.5.18.tar.gz 94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49 11619 rust/crates/scopeguard-1.2.0.tar.gz 4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba 83669 rust/crates/serde-1.0.229.tar.gz 67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48 63100 rust/crates/serde_core-1.0.229.tar.gz e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348 59864 rust/crates/serde_derive-1.0.229.tar.gz 33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256 16131 rust/crates/siphasher-1.0.4.tar.gz 149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46 34819 rust/crates/smallvec-1.16.5.tar.gz 6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596 8186 rust/crates/stable_deref_trait-1.2.1.tar.gz a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f 18480 rust/crates/static_assertions-1.1.0.tar.gz ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6 18195 rust/crates/string_cache-0.11.0.tar.gz 928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc 10124 rust/crates/string_cache_codegen-0.11.2.tar.gz 872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297 307407 rust/crates/syn-2.0.119.tar.gz 4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79 314214 rust/crates/syn-3.0.10.tar.gz 901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02 19010 rust/crates/synstructure-0.14.0.tar.gz 8c447be3a2abfa84b2d91680c56600bd6b2873866de27b36ec911be705e291da 27375 rust/crates/target-lexicon-0.13.6.tar.gz 5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08 45663 rust/crates/tendril-0.5.1.tar.gz abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a 25049 rust/crates/tinystr-0.8.5.tar.gz a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563 48807 rust/crates/unicode-ident-1.0.27.tar.gz ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed 86512 rust/crates/url-2.5.8.tar.gz af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0 14981 rust/crates/utf8_iter-1.1.0.tar.gz 3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6 19371 rust/crates/utf_types-1.0.0.tar.gz 0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a 15554 rust/crates/version_check-0.9.5.tar.gz 7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada 27901 rust/crates/web_atoms-0.3.0.tar.gz f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5 6133 rust/crates/windows-link-0.2.1.tar.gz 3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc 31222 rust/crates/writeable-0.6.4.tar.gz cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049 75497 rust/crates/yansi-1.0.1.tar.gz 417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3 33270 rust/crates/yoke-0.8.4.tar.gz ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71 15054 rust/crates/yoke-derive-0.8.4.tar.gz 0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272 6156 rust/crates/zerofrom-0.1.8.tar.gz f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a 8834 rust/crates/zerofrom-derive-0.1.8.tar.gz 4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f 84204 rust/crates/zerotrie-0.2.5.tar.gz f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40 132005 rust/crates/zerovec-0.11.9.tar.gz c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a 23232 rust/crates/zerovec-derive-0.11.7.tar.gz
Ports that require python-nh3:v14
NetBox:std Flexible IPAM and DCIM tool with plugin support