{"library":"openmock","title":"openmock - OpenSearch Mock for Python Testing","description":"A Python library for mocking OpenSearch (Elasticsearch) operations in unit tests. Provides a lightweight in-memory mock that simulates OpenSearch behaviors without needing a real cluster. Current version: 3.2.0, requires Python >=3.10. Release cadence irregular.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install openmock"],"cli":null},"imports":["from openmock import OpenMock"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from openmock import OpenMock\nfrom opensearchpy import OpenSearch\n\nwith OpenMock():\n    client = OpenSearch()\n    # index a document\n    client.index(index='my-index', body={'title': 'Test'})\n    # search\n    result = client.search(index='my-index', body={'query': {'match_all': {}}})\n    print(result['hits']['hits'][0]['_source']['title'])  # Output: Test","lang":"python","description":"Basic usage: use OpenMock as a context manager to mock OpenSearch client calls.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}