A unified wrapper for search engines like Serper, DuckDuckGo, etc.
Project description
Search Engine Client
Lightweight, async wrappers around multiple search engine APIs (Serper/Google, DuckDuckGo, Bing). This package provides a small, opinionated interface for running text and image searches and returning standardized results.
Features
- Async-first search engine clients implementing a common
BaseSearchEngineinterface. - Built-in engines: Serper (Google), DuckDuckGo, Bing (concrete implementations in
src/search_wrapper/engines). - Concurrent text + image fetching for engines that support both.
Installation
Install for development (editable) and add required dependencies:
pip install -e .
pip install httpx
Quick start
Set the required API key for services that need one (example for Serper/Google):
$env:GOOGLE_SERPER_API_KEY = "your_api_key_here"
Example usage (async):
import asyncio
from search_wrapper import GoogleSearchFromSerper
async def main():
async with GoogleSearchFromSerper(api_key="YOUR_KEY") as client:
results = await client.search("python async http client")
print(results)
asyncio.run(main())
Alternatively import specific engine directly:
from search_wrapper.engines.serper import GoogleSearchFromSerper
Development notes
- Source layout lives under
src/(package name:search_wrapper). Either install the package in editable mode (pip install -e .) or addsrctoPYTHONPATH/VS Codepython.analysis.extraPathsso imports resolve in the editor. - The Serper client uses
httpx.AsyncClient— ensurehttpxis installed in your active environment. - Tests and examples live at the project root (
test_search.py,main.py).
Contributing
Feel free to open issues or PRs. When adding new engines, implement BaseSearchEngine and expose the engine in src/search_wrapper/__init__.py.
Project details
Release history Release notifications | RSS feed
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 osint_search_engine_pkg-0.1.1.tar.gz.
File metadata
- Download URL: osint_search_engine_pkg-0.1.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a20b764a4207236243868673c6014be2c9cf7d37658000ea4302b494c24572d8
|
|
| MD5 |
a877bffc14ca76b86983d2ed532b2359
|
|
| BLAKE2b-256 |
329f8d8a4535177a7a9ce16a684e8f822248d5210f9934c72cb057844709ce7a
|
File details
Details for the file osint_search_engine_pkg-0.1.1-py3-none-any.whl.
File metadata
- Download URL: osint_search_engine_pkg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7321687ac8360b14476f1a848ca315dedd9c5d9905ae2470bc91458aef799dd
|
|
| MD5 |
cce6aba369aed309719c885ffa468ec4
|
|
| BLAKE2b-256 |
53a02d7a051d1b053cdee2f320afffd1930093e19afadc1aab4c411d080f6f6b
|