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
- Contract —
WebSearchprotocol +SearchResult(title, url, snippet, score, extra). - Adapters — thin, dependency-free, with an injectable
requesttransport so tests run without a network. - Tool — the plugin registers
web_search(query: str, top_k: int = 5)through the publicFunctionToolAPI.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45df195e72cc44bd0f7e6aab7c128a316d4874bf0b219abdd295dcb9249cd0c3
|
|
| MD5 |
3ff79854fd50ce2c136820a8203b196f
|
|
| BLAKE2b-256 |
19f80eb255a4594eaea20e9be611e0ca3eef7d05b6087e006dfe7af5e8398b67
|
Provenance
The following attestation bundles were made for xyberos_web_search-0.2.0.tar.gz:
Publisher:
pypi-plugins.yml on xyberos/xyberos-plugins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_web_search-0.2.0.tar.gz -
Subject digest:
45df195e72cc44bd0f7e6aab7c128a316d4874bf0b219abdd295dcb9249cd0c3 - Sigstore transparency entry: 2623963591
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@e9d67b2197a0473978694887a31a3d18fddad2c5 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@e9d67b2197a0473978694887a31a3d18fddad2c5 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file xyberos_web_search-0.2.0-py3-none-any.whl.
File metadata
- Download URL: xyberos_web_search-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b592c804ab7db8d02d85f14891492ea13016b43c606253dbaf1113f8baa5bc4
|
|
| MD5 |
41033bf1faeacca5131a5b00a6f50f87
|
|
| BLAKE2b-256 |
5238a85043ff80ccbb2ad027c61903826cba1c40fd9236a3b1f03a0ba28b18c8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xyberos_web_search-0.2.0-py3-none-any.whl -
Subject digest:
8b592c804ab7db8d02d85f14891492ea13016b43c606253dbaf1113f8baa5bc4 - Sigstore transparency entry: 2623963611
- Sigstore integration time:
-
Permalink:
xyberos/xyberos-plugins@e9d67b2197a0473978694887a31a3d18fddad2c5 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/xyberos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-plugins.yml@e9d67b2197a0473978694887a31a3d18fddad2c5 -
Trigger Event:
workflow_dispatch
-
Statement type: