# Darsman Search Library

## Requirements

- Python (== 3.10)
- grpcio-tools (>=1.62.1)

## Installation

Run the following command using pip:

```bash
pip install dmse
```

## Sample code

```python
import asyncio
from dmse import IndexedContent, ResponseCodeError
from typing import List

indexed_content = IndexedContent()

async def main():
    try:
      create_response = await indexed_content.create_blog(
          title="rust",
          content="rust is a programming lang",
          item_identifier="rest_blog_id",  # should be str or UUID
          keywords=["rust", "programming language"],  # optional, can skip or pass a list
      )
      print(create_response)
    except ResponseCodeError as err:
        print(err)

    search_response = await indexed_content.search_blog(search_phrase="rust")
    print(search_response)

asyncio.run(main())

```
