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

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.2
File Size Uploaded Provenance Actions
turbo_surf-0.8.2.tar.gz 1.8 MB Without provenance Details for turbo_surf-0.8.2.tar.gz

Built distributions (wheels)

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

Total release size: 193.2 MB

Release files / turbo_surf-0.8.2.tar.gz

Download URL turbo_surf-0.8.2.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
8e1cbfc7f01af8ed4f7bbb31821bb1f5a80f424c6c8414e58f7d7acbd4b9b6f2
BLAKE2b-256 checksum
How to use checksums
e5db34dbde3b736c5082a414ec76e2e93babc0a062633240efc4a5e4c2f99736
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

Security for turbo-surf 0.8.2

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