Skip to main content

turbo-surf (Python)

Browserless, native-speed web crawler + extractor with a real V8 JS-render tier — a PyO3 binding over the turbo-surf Rust engine. Fetch-free: you pass a page's HTML in, and get a view out (Markdown, visible text, links, a typed extraction, an accessibility tree). For JS-gated pages, the engine runs the page's own scripts in a true V8 isolate over a native DOM — no headless Chromium.

import turbo_surf as ts

html = open("page.html").read()

ts.markdown(html, base_url="https://example.com/")   # -> Markdown str
ts.text(html)                                        # -> visible text
ts.links(html, base_url="https://example.com/")      # -> list[str]

# Typed extraction: a JSON schema maps field names to selector specs.
schema = '{"title": {"selector": "h1"}, "prices": {"selector": ".price", "list": true}}'
ts.extract(html, schema, base_url="https://example.com/")   # -> JSON str

# JS-gated page: run its own scripts, read the hydrated DOM.
hydrated = ts.render(html, script, base_url="https://example.com/")

Fatal faults (malformed schema JSON, a render-tier failure) raise turbo_surf.TurboSurfError; the non-JS views never raise.

Install

pip install turbo-surf

Prebuilt abi3 wheels (CPython 3.8+) are published for Linux (x86_64/aarch64), macOS (arm64), and Windows (x64). Linux wheels require glibc 2.28 or later (manylinux_2_28). The CPython 3.8+ abi3 contract is unchanged; it does not imply compatibility with older Linux C libraries.

Source builds and feature profile

Use Rust 1.98.0 and maturin (the build backend requires >=1.9.3,<2.0; release CI uses 1.15.0). From the repository root:

maturin build --release --manifest-path rust/crates/turbo-surf-py/Cargo.toml
# Or install into an active virtual environment:
maturin develop --release --manifest-path rust/crates/turbo-surf-py/Cargo.toml

The crate defaults to avif and jxl screenshot pixel decoders. Its independent resource client uses reqwest/rustls: view/render disable core's default impersonation feature. A workspace build that also selects MCP/NAPI can unify BoringSSL back in, so validate a standalone wheel separately. Native V8 and C++20 audio still need their build toolchains; this is not a pure-Python wheel.

pyproject.toml enables pyo3/extension-module for wheel construction, while the crate selects abi3-py38. Keep the extension-module feature out of ordinary workspace test/link assumptions. The Python test extra installs pytest; it does not change the engine's Cargo features.

Optional gpu-metal, coretext and native-sdk-frame-read forward to the raster/render crates. They are off in the stock wheel workflow. Python exposes synthetic raster screenshot functions, but its current evaluate/render initialization does not install guest canvas or WebGL execution callbacks. Enabling a raster feature alone therefore does not establish a guest GPU bridge. See Build features for all defaults, forwarding, platform/toolchain requirements and GPU bridge for the execution boundary.

API

function returns notes
markdown(html, base_url="") str Markdown render
text(html) str visible text
title(html) str document <title>
html(html) str re-serialized HTML
links(html, base_url="") list[str] resolved hyperlink targets
interactive_elements(html, base_url="") JSON str links/buttons/inputs
accessibility_tree(html) JSON str a11y tree
hydration_state(html) JSON str hydration probe
detect(html) JSON str is the page JS-gated?
query(html, selector, kind=None) JSON str kind = "css"/"xpath"/auto
extract(html, schema_json, base_url="") JSON str typed extraction
evaluate(html, script) str run script over the DOM (sync)
render(html, script, base_url="") str hydrated HTML after page scripts run
transform(src, ts=False, jsx=False) str TS/JSX → classic JS (swc)

MIT licensed.

Metadata

Release files for turbo-surf 0.8.6

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

Source distribution (sdist)

Source distribution for turbo-surf 0.8.6
File Size Uploaded Provenance Actions
turbo_surf-0.8.6.tar.gz 2.2 MB Without provenance Details for turbo_surf-0.8.6.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for turbo-surf 0.8.6
File Actions
turbo_surf-0.8.6-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for turbo_surf-0.8.6-cp38-abi3-win_amd64.whl
turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_x86_64.whl CPython 3.8 abi3 Linux glibc 2.28+ x86-64 Details for turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_x86_64.whl
turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_aarch64.whl CPython 3.8 abi3 Linux glibc 2.28+ ARM64 Details for turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_aarch64.whl
turbo_surf-0.8.6-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for turbo_surf-0.8.6-cp38-abi3-macosx_11_0_arm64.whl

Total release size: 197.5 MB

Release files / turbo_surf-0.8.6.tar.gz

Download URL turbo_surf-0.8.6.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c97e857f4279bae930bbe5b2a1a015736e17e98875444f54f53e6fd8b278d5f8
BLAKE2b-256 checksum
How to use checksums
5b2bf42e1ae5a22e0d9b832d3f1762833c2ef9868696060aaaa8d7a5a24cbc4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / turbo_surf-0.8.6-cp38-abi3-win_amd64.whl

Download URL turbo_surf-0.8.6-cp38-abi3-win_amd64.whl
Size 45.7 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
66b464b2ab500ac1b3b44dcc5a6cd69e53501558d81cd41cfff5bac45ab88a2f
BLAKE2b-256 checksum
How to use checksums
071a0f9ed248a8fa16f8973f737b2c65ff7142aa1f64859ceca349fb9d9a7934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_x86_64.whl

Download URL turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_x86_64.whl
Size 50.3 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b9d0ef8fc62348ee6ff0cfcb57764ed05ae1a6cbed64a71229f87c8b1c5d38d5
BLAKE2b-256 checksum
How to use checksums
e25cc494118e7f9413b6212896af60b8b193849f4aa896c1264beb51e72346d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_aarch64.whl

Download URL turbo_surf-0.8.6-cp38-abi3-manylinux_2_28_aarch64.whl
Size 52.6 MB
Tags CPython 3.8 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f86006fec14affcea73cddd2490d4f8050b630e0584f72e1430b3b699f0c4b04
BLAKE2b-256 checksum
How to use checksums
dcfe6b617c56ef9878edb575841a69275e14d7bad3637bb1e66b34126879f881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / turbo_surf-0.8.6-cp38-abi3-macosx_11_0_arm64.whl

Download URL turbo_surf-0.8.6-cp38-abi3-macosx_11_0_arm64.whl
Size 46.7 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7d6b3b0d8aeb04f50a85c34b97654b993b42f51263a4a5dc9dc7f406af90dc23
BLAKE2b-256 checksum
How to use checksums
20ee718a1106c3fb11eff8f32bd28e53f4707e0ec5215611b675b0f69e998a36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for turbo-surf 0.8.6

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.

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