Skip to content

Commit acce0d1

Browse files
authored
Merge pull request #1212 from vibeyclaw/docs/add-async-sdk-link
docs: add async usage section linking to meilisearch-python-sdk
2 parents 59d77d3 + 4af9bda commit acce0d1

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- [🔧 Installation](#-installation)
3333
- [🚀 Getting started](#-getting-started)
3434
- [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch)
35+
- [⚡ Async usage](#-async-usage)
3536
- [💡 Learn more](#-learn-more)
3637
- [⚙️ Contributing](#️-contributing)
3738

@@ -237,6 +238,28 @@ index.search(
237238

238239
This package guarantees compatibility with [version v1.2 and above of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-python/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
239240

241+
## ⚡ Async usage
242+
243+
This SDK (`meilisearch`) is synchronous. If your project requires async/await support, the community-maintained [meilisearch-python-sdk](https://github.com/sanders41/meilisearch-python-sdk) provides a full-featured async (and sync) client with a similar API surface:
244+
245+
```bash
246+
pip install meilisearch-python-sdk
247+
```
248+
249+
```python
250+
import asyncio
251+
from meilisearch_python_sdk import AsyncClient
252+
253+
async def main():
254+
async with AsyncClient("http://127.0.0.1:7700", "masterKey") as client:
255+
index = client.index("movies")
256+
await index.search("wonder woman")
257+
258+
asyncio.run(main())
259+
```
260+
261+
For more details, refer to the [meilisearch-python-sdk documentation](https://meilisearch-python-sdk.paulsanders.dev/).
262+
240263
## 💡 Learn more
241264

242265
The following sections in our main documentation website may interest you:

0 commit comments

Comments
 (0)