Skip to main content

xyberos-web-search

Web search abstraction plugin — RFC-0019, M5. One WebSearch contract (search(query, top_k) -> list[Result]), many providers behind it: DuckDuckGo (free, no API key — the default), plus Tavily, Serper, Brave, Exa, Firecrawl. Each adapter is a thin, stdlib-only urllib call; the plugin exposes a single typed web_search tool.

Install

pip install xyberos-web-search         # from PyPI

# development (editable, from this repo):
pip install -e ./web-search

Usage

from xyberos import create_app
from xyberos_web_search import WebSearchPlugin

app = create_app()
app.load_plugin(WebSearchPlugin())   # default: duckduckgo - free, no API key

app.tools.execute("web_search", None, query="xyberos", top_k=5)

Provider + key resolution (explicit args, then env):

Provider provider API key env
DuckDuckGo (default) duckduckgo (free, keyless)
Tavily tavily TAVILY_API_KEY
Serper serper SERPER_API_KEY
Brave brave BRAVE_API_KEY
Exa exa EXA_API_KEY
Firecrawl firecrawl FIRECRAWL_API_KEY

WEB_SEARCH_PROVIDER selects the default provider (default duckduckgo). Paid providers raise a clear ProviderError when their key is missing.

Use the contract directly (provider-agnostic)

from xyberos_web_search import get_web_search

search = get_web_search("serper")   # reads SERPER_API_KEY
for result in search.search("xyberos", top_k=3):
    print(result.title, result.url, result.snippet)

Design

  • ContractWebSearch protocol + SearchResult(title, url, snippet, score, extra).
  • Adapters — thin, dependency-free, with an injectable request transport so tests run without a network.
  • Tool — the plugin registers web_search(query: str, top_k: int = 5) through the public FunctionTool API.

Examples

  • examples/web_search.py — CLI example; needs an API key (see README).

Tests

pip install pytest
pytest tests/

Adapters are tested against canned responses via a fake transport — no network required.

Ship location

Plugin (xyberos.plugins entry point). Depends on M2's HTTP patterns.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xyberos_web_search-0.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xyberos_web_search-0.2.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file xyberos_web_search-0.2.0.tar.gz.

File metadata

  • Download URL: xyberos_web_search-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for xyberos_web_search-0.2.0.tar.gz
Algorithm Hash digest
SHA256 45df195e72cc44bd0f7e6aab7c128a316d4874bf0b219abdd295dcb9249cd0c3
MD5 3ff79854fd50ce2c136820a8203b196f
BLAKE2b-256 19f80eb255a4594eaea20e9be611e0ca3eef7d05b6087e006dfe7af5e8398b67

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_web_search-0.2.0.tar.gz:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xyberos_web_search-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xyberos_web_search-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b592c804ab7db8d02d85f14891492ea13016b43c606253dbaf1113f8baa5bc4
MD5 41033bf1faeacca5131a5b00a6f50f87
BLAKE2b-256 5238a85043ff80ccbb2ad027c61903826cba1c40fd9236a3b1f03a0ba28b18c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_web_search-0.2.0-py3-none-any.whl:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 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