Skip to content

Commit 651fe99

Browse files
Add OpenSearch store support
Implement OpenSearchStore to support Amazon OpenSearch and open-source OpenSearch deployments. This addresses the incompatibility with the Elasticsearch client which rejects OpenSearch servers. Changes: - Add OpenSearchStore with async/sync variants - Implement opensearch-py client integration - Add sanitization strategies for keys and collections - Include comprehensive test suite - Support connection via URL or pre-configured client - Add optional dependency: opensearch-py[async]>=2.0.0 The implementation mirrors the Elasticsearch store architecture but uses the opensearch-py client library to avoid product detection errors. Fixes #209 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: William Easton <[email protected]>
1 parent 7a1780b commit 651fe99

File tree

13 files changed

+1706
-4
lines changed

13 files changed

+1706
-4
lines changed

key-value/key-value-aio/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ valkey = ["valkey-glide>=2.1.0"]
4040
vault = ["hvac>=2.3.0", "types-hvac>=2.3.0"]
4141
memcached = ["aiomcache>=0.8.0"]
4242
elasticsearch = ["elasticsearch>=8.0.0", "aiohttp>=3.12"]
43+
opensearch = ["opensearch-py[async]>=2.0.0"]
4344
dynamodb = ["aioboto3>=13.3.0", "types-aiobotocore-dynamodb>=2.16.0"]
4445
keyring = ["keyring>=25.6.0"]
4546
keyring-linux = ["keyring>=25.6.0", "dbus-python>=1.4.0"]
@@ -67,7 +68,7 @@ env_files = [".env"]
6768

6869
[dependency-groups]
6970
dev = [
70-
"py-key-value-aio[memory,disk,redis,elasticsearch,memcached,mongodb,vault,dynamodb,rocksdb]",
71+
"py-key-value-aio[memory,disk,redis,elasticsearch,opensearch,memcached,mongodb,vault,dynamodb,rocksdb]",
7172
"py-key-value-aio[valkey]; platform_system != 'Windows'",
7273
"py-key-value-aio[keyring]",
7374
"py-key-value-aio[pydantic]",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from key_value.aio.stores.opensearch.store import OpenSearchStore
2+
3+
__all__ = ["OpenSearchStore"]

0 commit comments

Comments
 (0)