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

Built distributions (wheels)

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

Total release size: 181.2 MB

Release files / turbo_surf-0.6.0.tar.gz

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

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

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

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

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

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

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

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

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

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