from meilisearch_python_sdk import AsyncClient as Client from Christmas.config import ChristmasConfig class Search: def __init__(self): self.config = ChristmasConfig() async def connect(self): self.client = Client(self.config.SEARCH_ENGINE["HOST"], self.config.SEARCH_ENGINE["KEY"]) self.index = self.client.index(self.config.SEARCH_ENGINE["INDEX"]) return self.index async def close(self): await self.client.aclose()