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

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.5.4
File Size Uploaded Provenance Actions
turbo_surf-0.5.4.tar.gz 2.0 MB Without provenance Details for turbo_surf-0.5.4.tar.gz

Built distributions (wheels)

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

Total release size: 167.8 MB

Release files / turbo_surf-0.5.4.tar.gz

Download URL turbo_surf-0.5.4.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
21e26c83b5018b182e5ef1a1ad783e2c0a12efc8038f012892b7c88bb2527ba8
BLAKE2b-256 checksum
How to use checksums
299cc4b456ed17c4ef85f4b8c7d31ac18ea408d75bd459fe2f334e7d24fd16b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

Security for turbo-surf 0.5.4

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