Skip to main content

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 BaseSearchEngine interface.
  • 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 add src to PYTHONPATH/VS Code python.analysis.extraPaths so imports resolve in the editor.
  • The Serper client uses httpx.AsyncClient — ensure httpx is 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


Download files

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

Source Distribution

search_engine_pkg-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

search_engine_pkg-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file search_engine_pkg-0.1.0.tar.gz.

File metadata

  • Download URL: search_engine_pkg-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for search_engine_pkg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b346965066c672d6f47e8c229515f72f7ee35b21854012bdca12c2ce0b9bb3e7
MD5 64fe9b5f0f6f0c91ef724982c65f71f6
BLAKE2b-256 dbb2d54ffb4fd5f81a3b3c34618dab5eb08ef21360d3353a29bad450d6d9b822

See more details on using hashes here.

Provenance

The following attestation bundles were made for search_engine_pkg-0.1.0.tar.gz:

Publisher: python-publish.yml on Pretech-lane/search_engine_client

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

File details

Details for the file search_engine_pkg-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for search_engine_pkg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f15971998cde709eaf1f92618affc001b0170e21bfd096dc639c2b9b48defe5
MD5 8073ed096d4c417d4e59f739e7cf7775
BLAKE2b-256 06be95560f84dd5e226c903937c9c13b67609e175a5fce736b4759ae099f8d3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for search_engine_pkg-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on Pretech-lane/search_engine_client

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page