Skip to main content

Search plugin for Sopel IRC bots

Project description

sopel-search

Search plugin for Sopel IRC bots

Installing

Releases are hosted on PyPI, so after installing Sopel, all you need is pip:

$ pip install sopel-search

This plugin is designed for use with Sopel version 8.0+, but may have a higher minimum Python version requirement than Sopel itself due to upstream libraries.

Configuring

The easiest way to configure sopel-search is via Sopel's configuration wizard—simply run sopel-plugins configure search and enter the values for which it prompts you. Available settings are:

  • region: Set this to the primary geographical region of your bot's users, using one of the values from https://duckduckgo.com/params

    Setting this correctly may improve the relevance of both search results and query suggestions using .suggest.

  • safesearch: Controls SafeSearch filtering of .search results; one of 'on', 'moderate', and 'off'.

Using

Two primary functions are available, search and suggest:

  • .search (aliases: .ddg, .g): Perform a text search and return the top result
  • .suggest: Fetch autocomplete suggestions for the stem of a search query

Changelog

1.3.0

  • Migrate DDGS library from 8.x to 9.x (#9)
    • Includes package name change to ddgs; the older duckduckgo_search package is no longer used nor updated.
  • Fixed .suggest and merged it with .gsuggest (#9)

1.2.0

  • Upgrade DDGS library from 6.x to 8.x (#6)
    • This also required raising the minimum Python version to 3.9
  • Update package metadata for PEP 639 (#7)

1.1.0

  • Handle common errors with some amount of grace (#4)
  • Refresh the DDGS client periodically to reduce errors (#5)

1.0.1

Bump DuckDuckGo library minimum version; older releases stopped working.

1.0.0

First release of sopel-search.

This new search plugin apes a lot of behaviors from Sopel's built-in search, with the following notable changes:

  • .bing is no longer available
  • .search is an alias to .ddg, as .g was already
  • Search region and safesearch level are now configurable
  • .suggest uses DuckDuckGo; Google suggestions are still available via the new .gsuggest command (if optional extra dependencies are installed)

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

sopel_search-1.3.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.

sopel_search-1.3.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file sopel_search-1.3.0.tar.gz.

File metadata

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

File hashes

Hashes for sopel_search-1.3.0.tar.gz
Algorithm Hash digest
SHA256 ca5602929fa92b8dfa0073a88ff99a3903fe8ee53c07dbee35c05ed35286acdd
MD5 8b4bc559be836da7272d6d47abc7ed7a
BLAKE2b-256 8f2d5189ff029c9064e73acdd0058e08a8f06836f64a17c809d8c0f242d67dc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sopel_search-1.3.0.tar.gz:

Publisher: trusted-publishing.yml on sopel-irc/sopel-search

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

File details

Details for the file sopel_search-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: sopel_search-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sopel_search-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1073485ce4591e061c34ac5f8a8403d3c6d96b6de27c9cdaac88e2873ca69cc3
MD5 6ef6010f4ff367ed8713b48d9d53a06d
BLAKE2b-256 d039045cda56f7cd6339e7b99437f142b7443c26fcd7f70f22dc5883602049ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for sopel_search-1.3.0-py3-none-any.whl:

Publisher: trusted-publishing.yml on sopel-irc/sopel-search

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