Skip to main content

simdsel

A gigabytes fast HTML parser and selector, powered by Rust and SIMD.

simdsel is the Python binding for simdhtml. It keeps the parsel selector surface while replacing the parsing and selection core with a SIMD-accelerated Rust implementation, so scraping code keeps working with one changed import.

Install

uv add simdsel
# or
pip install simdsel

Wheels are CPython abi3 (Python ≥ 3.9) and self-contained: no Rust toolchain, no libxml2, no lxml.

Full documentation, including the XPath subset and Scrapy integration: https://xbwwj.github.io/simdhtml/.

Quickstart

from simdsel.parsel import Selector

html = """
<div class="item" data-id="1"><h2>First &amp; best</h2><a href="/one">one</a></div>
<div class="item" data-id="2"><h2>Second</h2><a href="/two">two</a></div>
"""

sel = Selector(text=html)
sel.css(".item h2::text").getall()          # ['First & best', 'Second']
sel.css(".item a::attr(href)").getall()     # ['/one', '/two']
sel.xpath("//div[@data-id='2']/h2/text()").get()   # 'Second'
[item.attrib["data-id"] for item in sel.css(".item")]   # ['1', '2']

parsel compatibility

from simdsel.parsel import Selector mirrors parsel.Selector for the subset scraping code actually uses:

API
css(query), xpath(query) return a SelectorList
::text, ::attr(name) pseudo-elements
.get(), .getall() single value / list
.re(pattern), .re_first(pattern) regex extraction
.attrib, .text, .base_url, .namespaces
len(), indexing, iteration, + list behaviour
Selector(text=..., base_url=..., type="html") constructor

type="xml"/"json" and root= (an lxml node) raise NotImplementedError: only HTML is parsed.

Selector(text=..., mode="spec") opts into specification-shaped tree construction (98% WPT conformance) instead of the fast error-recovering default mode="none".

Notes

  • simdsel.__version__ reports the build version.
  • Elements are backed by a flat preorder tape, so iteration and len() are cheap and no lxml node objects are allocated.

License

MIT or Apache 2.0 at your option.

Metadata

Release files for simdsel 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simdsel 0.1.1
File Size Uploaded Provenance Actions
simdsel-0.1.1.tar.gz 169.8 kB With provenance Details for simdsel-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for simdsel 0.1.1
File Actions
simdsel-0.1.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for simdsel-0.1.1-cp39-abi3-win_amd64.whl
simdsel-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for simdsel-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
simdsel-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for simdsel-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
simdsel-0.1.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for simdsel-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
simdsel-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for simdsel-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 3.8 MB

Release files / simdsel-0.1.1.tar.gz

Download URL simdsel-0.1.1.tar.gz
Size 169.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9574b9d0843bbd13e2f16a9a0945e0d41835eeae590f2e86a2062129f0b866fa
BLAKE2b-256 checksum
How to use checksums
2553876eeba70de3c516f683a0be545329b0797bbfe6d12a9c8f9c962daa9b11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / simdsel-0.1.1-cp39-abi3-win_amd64.whl

Download URL simdsel-0.1.1-cp39-abi3-win_amd64.whl
Size 666.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2017e5fdd5067985425bb28297030b28d6340ad44042d5e9f49ff2a857699eb4
BLAKE2b-256 checksum
How to use checksums
b3a77547fa76a1e0aa4119f84d7bcfcca6f8d23f73f647ebeb5b1ab796b5b7ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / simdsel-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL simdsel-0.1.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 772.9 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8266fd2667e03c8ee88e16da90d5754096721963a1c3231ce370f0bd8ca71382
BLAKE2b-256 checksum
How to use checksums
91a83c4041c4a25de64eab5687204bbedb6c400c470196bc64418c88326bd0ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / simdsel-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL simdsel-0.1.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 747.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
431cfb9bdd4ad829ba07d56c4ad4a61bb3f48887e158edd1288d68f194f47051
BLAKE2b-256 checksum
How to use checksums
f9ddd9c4508c72ccc4466f46659749cbada3888ff9812dbea77be1f85dee5746
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / simdsel-0.1.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL simdsel-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Size 706.7 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
04f30cb3f9cc2dceff9acd421d68a8c75a6dd1ac73ce7f4db9a51457222d8dc8
BLAKE2b-256 checksum
How to use checksums
66d3e4ebb8da8cdd328030add9793ec1f3b27f5ecb1af97bb50a030c2badcbe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / simdsel-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL simdsel-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 718.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2ddf82996a81596fbe87379b93977d4cc1d24ffd2ae81579eaf16e63da3c6f4f
BLAKE2b-256 checksum
How to use checksums
f399fb1020e36e62564df340ee1ed096560eb0b4cdf10c1c0882e45628695e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for simdsel 0.1.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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for simdsel-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page