You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-1
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,38 @@ OpenSearch Python Client
12
12
13
13
**opensearch-py** is [a community-driven, open source fork](https://aws.amazon.com/blogs/opensource/introducing-opensearch/) of elasticsearch-py licensed under the [Apache v2.0 License](LICENSE.txt). For more information, see [opensearch.org](https://opensearch.org/).
14
14
15
+
## Example use
16
+
17
+
```python
18
+
19
+
>>>from datetime import datetime
20
+
>>>from opensearch import OpenSearch
21
+
22
+
# by default we connect to localhost:9200
23
+
>>> client = OpenSearch()
24
+
25
+
# create an index in OpenSearch, ignore status code 400 (index already exists)
0 commit comments