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.

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.7.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 turbo-surf 0.7.1
File Size Uploaded Provenance Actions
turbo_surf-0.7.1.tar.gz 1.7 MB Without provenance Details for turbo_surf-0.7.1.tar.gz

Built distributions (wheels)

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

Total release size: 184.3 MB

Release files / turbo_surf-0.7.1.tar.gz

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

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

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

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

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

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

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

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

Download URL turbo_surf-0.7.1-cp38-abi3-macosx_11_0_arm64.whl
Size 43.6 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
242bf4910d4e333139dfbfea90698820b27973fcb55ac5ebfafb4f6a7895c5a3
BLAKE2b-256 checksum
How to use checksums
0a5fc74becd105c1ba98d7ac6d5d9d191279f07edad56d6bd40c306515cd8b06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for turbo-surf 0.7.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.

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