{"id":24026,"library":"meilisearch-python-sdk","title":"Meilisearch Python SDK","description":"A Python client providing both async and sync support for the Meilisearch API. The SDK simplifies interacting with Meilisearch, an open-source, fast, and relevant search engine. Current version 7.1.3 supports Python >=3.10 and features both synchronous and asynchronous clients.","status":"active","version":"7.1.3","language":"python","source_language":"en","source_url":"https://github.com/meilisearch/meilisearch-python-sdk","tags":["search","meilisearch","client","async","sync"],"install":[{"cmd":"pip install meilisearch-python-sdk","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Old package name was 'meilisearch'; new SDK uses 'meilisearch_python_sdk'","wrong":"from meilisearch import Client","symbol":"MeilisearchClient","correct":"from meilisearch_python_sdk import MeilisearchClient"},{"note":"","wrong":"","symbol":"AsyncMeilisearchClient","correct":"from meilisearch_python_sdk import AsyncMeilisearchClient"},{"note":"Sync client is now in sync_client module for SDK >=7.0","wrong":"from meilisearch import Client","symbol":"Client","correct":"from meilisearch_python_sdk.sync_client import Client"}],"quickstart":{"code":"from meilisearch_python_sdk import MeilisearchClient\n\nclient = MeilisearchClient('http://localhost:7700', 'masterKey')\nindex = client.index('movies')\ndocuments = [\n    { 'id': 1, 'title': 'Carol', 'genres': ['Romance', 'Drama'] },\n    { 'id': 2, 'title': 'Wonder Woman', 'genres': ['Action', 'Adventure'] }\n]\nresult = index.add_documents(documents)\nprint(result)","lang":"python","description":"Initialize sync client, add documents to an index."},"warnings":[{"fix":"Install meilisearch-python-sdk and update imports to 'from meilisearch_python_sdk import ...'","message":"Version 7.0 changed the package name from 'meilisearch' to 'meilisearch-python-sdk' and the import path uses 'meilisearch_python_sdk'. Old code with 'meilisearch' will break.","severity":"breaking","affected_versions":"<7.0"},{"fix":"Use 'async with AsyncMeilisearchClient(...) as client:' or call 'await client.close()'.","message":"The async client requires an async context manager or explicit closing. Not closing the client can cause resource leaks.","severity":"gotcha","affected_versions":"all"},{"fix":"Import as: 'from meilisearch_python_sdk.sync_client import Client'","message":"The sync client's Client class is in 'meilisearch_python_sdk.sync_client', not at the top level of the package.","severity":"gotcha","affected_versions":">=7.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install meilisearch-python-sdk","cause":"Old package name not installed; package renamed to meilisearch-python-sdk","error":"ModuleNotFoundError: No module named 'meilisearch'"},{"fix":"Use 'from meilisearch_python_sdk.sync_client import Client'","cause":"Sync client moved to 'meilisearch_python_sdk.sync_client'","error":"ImportError: cannot import name 'Client' from 'meilisearch_python_sdk'"},{"fix":"Use 'index = client.index('movies')' (no need to get/index via request).","cause":"Using old 'meilisearch' package's API. New SDK uses 'client.index(index_name)' on the client instance directly.","error":"AttributeError: 'Client' object has no attribute 'index'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}