Skip to main content

Nomad SDK — Python

Nomad is a zero-overhead headless browser engine. 5 MB binary, 6 MB RSS, 550 req/s. This package connects to a running Nomad daemon over a Unix Domain Socket.

pip install nomad-sdk

Quickstart

Make sure the Nomad daemon is running:

MALLOC_ARENA_MAX=1 nomad-daemon &

Then scrape a page in 2 lines:

from nomad_sdk import NomadClient

with NomadClient() as client:
    page = client.navigate("https://news.ycombinator.com")
    print(f"Title: {page.title}")
    print(f"Links: {len(page.find_all(tag='a'))}")

API

NomadClient(socket_path="/tmp/nomad-daemon.sock")

Method Description
navigate(url, fmt=3) Fetch and parse a page
snapshot(tab_id) Get current page state without re-fetching
click(entity_id) Click an element by entity ID
input_text(entity_id, value) Type text into an input field
find(query) Find elements by role, tag, intent, text
evaluate(js) Execute arbitrary JavaScript
scroll(dx, dy) Scroll the viewport
resize(w, h) Resize the viewport
health() Daemon health info
get_action_log(tab_id) Tab action history

Output formats (fmt)

ID Name Use
0 RawBincode Machine IPC
1 JSON Debug
2 Markdown Human read
3 AgentJson LLM (full entities)
4 Summary LLM (~150 bytes)
5 TokenMinimal LLM (shortest)
6--10 Section/Accessibility/Reader/Form Specialized

Page methods

page.find_one(role="button", text="Sign In")  # first match
page.find_all(tag="a", intent="navigation")    # all matches

Example — Click a button

from nomad_sdk import NomadClient

with NomadClient() as client:
    page = client.navigate("https://example.com/login")
    btn = page.find_one(role="button", text="Submit")
    if btn:
        client.click(btn.id)

Requirements

  • Python ≥ 3.10
  • Nomad daemon running (UDS socket at /tmp/nomad-daemon.sock)

Metadata

Release files for nomad-sdk 0.1.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 nomad-sdk 0.1.0
File Size Uploaded
nomad_sdk-0.1.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nomad-sdk 0.1.0
File Interpreter ABI Platform
nomad_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / nomad_sdk-0.1.0.tar.gz

Download URL nomad_sdk-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9656acbc2a6eb49608d6828975309a59af57e179152f1e36f558006e6dd36d6f
BLAKE2b-256 checksum
How to use checksums
fbd116e5e2376166b7dce80c1489acfeaed0a751ba55934cfe702a16c3cbc5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / nomad_sdk-0.1.0-py3-none-any.whl

Download URL nomad_sdk-0.1.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b60bef421c342ef1c2bb33f85629ad2f133eb5e36fb3a909f100a8fedff723d
BLAKE2b-256 checksum
How to use checksums
6dab0f7f27d56135cfa52d8d9c933308395d1f2dc784744411c469f7faceb878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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