rom-runtime
Python bindings for the ROM browser-like runtime.
This package exposes a thin Python API on top of ROM:
eval()eval_async()eval_json()goto()set_content()content()evaluate()wait_for_selector()wait_for_function()click()fill()text_content()inner_html()locator()surface_snapshot()fingerprint_probe()run_fingerprintjs_harness()fingerprintjs_version()
It prefers a native PyO3 extension when available and falls back to the ROM CLI bridge otherwise.
Install
pip install rom-runtime
Usage
from rom import RomRuntime, has_native_binding
runtime = RomRuntime(
{
"href": "https://example.test/",
"referrer": "https://referrer.example/",
"cors_enabled": False,
"proxy_url": None,
}
)
href = runtime.eval_async("(async () => location.href)()")
snapshot = runtime.surface_snapshot()
print("native:", has_native_binding())
print(href)
print(snapshot["fetch"])
runtime.eval_async("(async () => { globalThis.__rom_value = 42; return 'ok'; })()")
print(runtime.eval_async("(async () => String(globalThis.__rom_value))()"))
runtime.set_content(
'<div id="app"><input id="name" /><button id="go">Go</button><span id="out"></span></div>'
'<script>document.querySelector("#go").addEventListener("click",()=>{document.querySelector("#out").textContent=document.querySelector("#name").value;});</script>'
)
runtime.fill("#name", "ROM")
runtime.click("#go")
print(runtime.text_content("#out"))
Config keys use the Rust runtime field names, so use snake_case such as cors_enabled and proxy_url.
cors_enabled is False by default.
When the native extension is loaded, one RomRuntime instance keeps JS globals alive across multiple eval() and eval_async() calls.
The page-like helpers such as goto(), set_content(), click(), and wait_for_selector() require the native extension because CLI bridge mode is stateless across calls.
For cookie seeding, the wrapper accepts serialized cookie_store, a raw cookie header string, or a cookies alias with string/object/array inputs and normalizes them automatically.
For storage seeding, the wrapper accepts local_storage and session_storage as serialized JSON objects, Python dicts, or entry arrays such as [('VerifyAuthToken', 'seeded')].
The default navigator surface is Chrome-like, including navigator.userAgent, navigator.vendor, and navigator.userAgentData.
Optional native build from source
python -m pip install maturin
python -m maturin build --manifest-path bindings/gom-python/Cargo.toml --release
Tagged GitHub releases build and publish wheels for Linux, Windows, and macOS, plus an sdist for source installs.
Common methods
eval()eval_async()eval_json()goto(url, options=None)set_content(html, options=None)content()evaluate(js_expression, arg=None)wait_for_selector(selector, options=None)wait_for_function(js_expression, arg=None, options=None)click(selector, options=None)fill(selector, value, options=None)text_content(selector, options=None)inner_html(selector, options=None)locator(selector)surface_snapshot()fingerprint_probe()run_fingerprintjs_harness()fingerprintjs_version()
Environment
ROM_FORCE_CLI_BRIDGE=1: disable the native path and force CLI fallbackROM_BRIDGE_BIN: explicit path to therom_bridgeexecutableROM_BRIDGE_CWD: working directory used by the CLI fallback
More docs
- Root guide: ../../README.md
- LLM guide: ../../LLMS.md
Metadata
Release files for rom-runtime 0.0.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rom_runtime-0.0.20.tar.gz | 165.6 kB | With provenance | Details for rom_runtime-0.0.20.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| rom_runtime-0.0.20-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for rom_runtime-0.0.20-cp39-abi3-win_amd64.whl |
| rom_runtime-0.0.20-cp39-abi3-manylinux_2_38_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.38+ x86-64 | Details for rom_runtime-0.0.20-cp39-abi3-manylinux_2_38_x86_64.whl |
| rom_runtime-0.0.20-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for rom_runtime-0.0.20-cp39-abi3-macosx_11_0_arm64.whl |
| rom_runtime-0.0.20-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for rom_runtime-0.0.20-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 12.5 MB
Release files / rom_runtime-0.0.20.tar.gz
| Download URL | rom_runtime-0.0.20.tar.gz |
|---|---|
| Size | 165.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d87bef199b9f7b5c031275ca3df49cc08f56787f416df660b1e8f0202dd2a69
|
|
BLAKE2b-256 checksum How to use checksums |
4c51d360780f7c33d354bf713bd092541c7813d4a84c91fbbdecff36a0819f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / rom_runtime-0.0.20-cp39-abi3-win_amd64.whl
| Download URL | rom_runtime-0.0.20-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ba5ece4fcbbac59400ef997efd76e026dddc636afa30a07462ee4e665a13b825
|
|
BLAKE2b-256 checksum How to use checksums |
d07699d1f64c376ccdbebf9e96ce47c9464aec9322390970b329ecd24692ff67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / rom_runtime-0.0.20-cp39-abi3-manylinux_2_38_x86_64.whl
| Download URL | rom_runtime-0.0.20-cp39-abi3-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.9 Linux glibc 2.38+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5810916bc8f0f6d10ae7c2aee65b38ff0e37851a4238f670cf325532cb001dcb
|
|
BLAKE2b-256 checksum How to use checksums |
b5bfb9d1e3fc672a4802e15ab41ff1e99a296228fe63642b74af404bb86783a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / rom_runtime-0.0.20-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | rom_runtime-0.0.20-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
da78d118d082ee95803024a9bed5e7082e1f32918a2f542cb805006eb9c4797c
|
|
BLAKE2b-256 checksum How to use checksums |
2fd5f4b9dfa8224897bb3570b4eecd5aac8478910c31efe11e337c56219a3504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / rom_runtime-0.0.20-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | rom_runtime-0.0.20-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2912a47b9788ba0fe5f0578439538384307e1de6ee2543fccc9f32489347194d
|
|
BLAKE2b-256 checksum How to use checksums |
169425aaf164c3eaa1c98109f6a6fef1b54ed4fd431ad0038bb846170726ef8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logSecurity for rom-runtime 0.0.20
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.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for rom_runtime-0.0.20.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logA 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.