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

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.0
File Size Uploaded Provenance Actions
turbo_surf-0.7.0.tar.gz 1.6 MB Without provenance Details for turbo_surf-0.7.0.tar.gz

Built distributions (wheels)

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

Total release size: 183.3 MB

Release files / turbo_surf-0.7.0.tar.gz

Download URL turbo_surf-0.7.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
259b34f21afff8994f9560d2970b83e5095031c38d0d6bccdc304cca47b7e9e1
BLAKE2b-256 checksum
How to use checksums
c898873d4d604937983e2b9e326776339183d5794d95c64a5c4c2718ed4b550c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

Download URL turbo_surf-0.7.0-cp38-abi3-macosx_11_0_arm64.whl
Size 43.4 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b07254771f4b61c184efd46f2a3c99dcad92993b1f4443971243403b3c0162ad
BLAKE2b-256 checksum
How to use checksums
6e26d695f834c24e7e7405b1bbd1ad911032a9d4d28c8db2e652f88990bdc9b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for turbo-surf 0.7.0

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