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.5

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.5
File Size Uploaded Provenance Actions
turbo_surf-0.8.5.tar.gz 2.2 MB Without provenance Details for turbo_surf-0.8.5.tar.gz

Built distributions (wheels)

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

Total release size: 197.5 MB

Release files / turbo_surf-0.8.5.tar.gz

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

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

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

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

Download URL turbo_surf-0.8.5-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
c63e994ca233e3c246f7494de44a73a831a1fdb036b899b2f4c72ef89cc5fb22
BLAKE2b-256 checksum
How to use checksums
38256861085791ac0ac1edd55f5a26175e365261b5bc112d0352285775e84218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL turbo_surf-0.8.5-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
fe1ac6402cd100c9a9a92a0df06fee6c8ae4e4a925d146e26c8367f16a5565e9
BLAKE2b-256 checksum
How to use checksums
ec7f60a5e6f2236780f98fa0d1231bbfdea631ce1e5f6bc6e8c3e85b86e30c4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL turbo_surf-0.8.5-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
738a7c752363516ab4676af5d7d3dc49874b4dba7e64905b93487950040cefc5
BLAKE2b-256 checksum
How to use checksums
f1374062920020c68d77e30d19a3cd3be8e211187a362f3a51739a2b0a79dc01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for turbo-surf 0.8.5

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