Skip to content
Back to top
View this page
Edit this page

# Valkey DB

Implementation of the valkey client (valkey-py).

This implementation uses the valkey: setup from `settings.yml`. A valkey DB connect can be tested by:

    >>> from searx import valkeydb
    >>> valkeydb.initialize()
    True
    >>> db = valkeydb.client()
    >>> db.set("foo", "bar")
    True
    >>> db.get("foo")
    b'bar'
    >>>

searx.valkeydb.client() → Valkey | None

  Returns SearXNG’s global Valkey DB connector (Valkey client object).