"""
Rhea_search_reactions

Search for biochemical reactions in the Rhea database by compound name, reaction description, or ...
"""

from typing import Any, Optional, Callable
from ._shared_client import get_shared_client


def Rhea_search_reactions(
    query: str,
    limit: Optional[int | Any] = None,
    *,
    stream_callback: Optional[Callable[[str], None]] = None,
    use_cache: bool = False,
    validate: bool = True,
) -> Any:
    """
    Search for biochemical reactions in the Rhea database by compound name, reaction description, or ...

    Parameters
    ----------
    query : str
        Search keyword for reactions. Can be a compound name, reaction term, or gener...
    limit : int | Any
        Maximum number of results (default 20, max 50).
    stream_callback : Callable, optional
        Callback for streaming output
    use_cache : bool, default False
        Enable caching
    validate : bool, default True
        Validate parameters

    Returns
    -------
    Any
    """
    # Handle mutable defaults to avoid B006 linting error

    return get_shared_client().run_one_function(
        {
            "name": "Rhea_search_reactions",
            "arguments": {"query": query, "limit": limit},
        },
        stream_callback=stream_callback,
        use_cache=use_cache,
        validate=validate,
    )


__all__ = ["Rhea_search_reactions"]
