This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.
resion
Minimal tree-based HTML parser built on the stdlib html.parser: an
editable Node tree, basic selectors (tag, #id, .class), readable-text
extraction and minification.
Install
pip install resion
Usage
import resion as rs
doc = rs.parse('<h1 id="t">Title</h1><p class="lead">Hi</p>')
doc.find('#t').text_content() # 'Title'
doc.find_all('p') # [Node p]
doc.find('.lead').get_attr('class') # 'lead'
rs.extract_text(doc) # readable text, boilerplate removed
rs.minify('<div> a </div><!-- x -->')
The tree is editable:
from resion import Node
doc.find('p').replace_with(Node('span'))
node = doc.find('#t')
node.set_attr('id', 'new').unwrap()
doc.to_html()
Settings are a Config or plain dict merged over defaults; a
default.config next to the package is auto-loaded at import (falling back
to built-in defaults when absent):
from resion import Config, Engine, get_config, load_config
engine = Engine({'strict_mode': True})
engine = Engine(load_config('my.config'))
get_config().get('strict_mode', False)
Bytes input is decoded via BOM sniffing and <meta charset> detection;
oversized input and malformed HTML are rejected in strict mode with
PafexError.
Metadata
Release files for resion 22.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resion-22.0.1.tar.gz | 13.3 kB | Without provenance | Details for resion-22.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resion-22.0.1-py3-none-any.whl | Python 3 | none | any | Details for resion-22.0.1-py3-none-any.whl |
Total release size: 25.9 kB
Release files / resion-22.0.1.tar.gz
| Download URL | resion-22.0.1.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
144e52ecb399cb6a149e5bf136cd91eceb1eaa18d3b01c11ff490cb1f7cc2957
|
|
BLAKE2b-256 checksum How to use checksums |
113a13d6037308686fd8de8e623c9ed97f478ca69d84c654d202fe375837156b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.7
|
Release files / resion-22.0.1-py3-none-any.whl
| Download URL | resion-22.0.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
900d432fddb0d4dced107ab13b5aaefb329ba92d42bc1b407fe98590b39d5be0
|
|
BLAKE2b-256 checksum How to use checksums |
46e2fb74a4292eefbf9acaa7f084dd11e883b5dfe61865d174a67c4b3c5a4027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.7
|
Security for resion 22.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.