gllm-datastore-binary 0.5.50__cp312-cp312-macosx_13_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. gllm_datastore/__init__.pyi +0 -0
  2. gllm_datastore/cache/__init__.pyi +4 -0
  3. gllm_datastore/cache/base.pyi +84 -0
  4. gllm_datastore/cache/cache.pyi +137 -0
  5. gllm_datastore/cache/hybrid_cache/__init__.pyi +5 -0
  6. gllm_datastore/cache/hybrid_cache/file_system_hybrid_cache.pyi +50 -0
  7. gllm_datastore/cache/hybrid_cache/hybrid_cache.pyi +115 -0
  8. gllm_datastore/cache/hybrid_cache/in_memory_hybrid_cache.pyi +29 -0
  9. gllm_datastore/cache/hybrid_cache/key_matcher/__init__.pyi +5 -0
  10. gllm_datastore/cache/hybrid_cache/key_matcher/exact_key_matcher.pyi +44 -0
  11. gllm_datastore/cache/hybrid_cache/key_matcher/fuzzy_key_matcher.pyi +70 -0
  12. gllm_datastore/cache/hybrid_cache/key_matcher/key_matcher.pyi +60 -0
  13. gllm_datastore/cache/hybrid_cache/key_matcher/semantic_key_matcher.pyi +93 -0
  14. gllm_datastore/cache/hybrid_cache/redis_hybrid_cache.pyi +34 -0
  15. gllm_datastore/cache/hybrid_cache/utils.pyi +36 -0
  16. gllm_datastore/cache/utils.pyi +34 -0
  17. gllm_datastore/cache/vector_cache/__init__.pyi +0 -0
  18. gllm_datastore/cache/vector_cache/eviction_manager/__init__.pyi +0 -0
  19. gllm_datastore/cache/vector_cache/eviction_manager/asyncio_eviction_manager.pyi +48 -0
  20. gllm_datastore/cache/vector_cache/eviction_manager/eviction_manager.pyi +38 -0
  21. gllm_datastore/cache/vector_cache/eviction_strategy/__init__.pyi +0 -0
  22. gllm_datastore/cache/vector_cache/eviction_strategy/eviction_strategy.pyi +34 -0
  23. gllm_datastore/cache/vector_cache/eviction_strategy/ttl_eviction_strategy.pyi +34 -0
  24. gllm_datastore/cache/vector_cache/vector_cache.pyi +99 -0
  25. gllm_datastore/constants.pyi +66 -0
  26. gllm_datastore/core/__init__.pyi +7 -0
  27. gllm_datastore/core/capabilities/__init__.pyi +7 -0
  28. gllm_datastore/core/capabilities/encryption_capability.pyi +21 -0
  29. gllm_datastore/core/capabilities/fulltext_capability.pyi +73 -0
  30. gllm_datastore/core/capabilities/graph_capability.pyi +70 -0
  31. gllm_datastore/core/capabilities/hybrid_capability.pyi +184 -0
  32. gllm_datastore/core/capabilities/vector_capability.pyi +90 -0
  33. gllm_datastore/core/filters/__init__.pyi +4 -0
  34. gllm_datastore/core/filters/filter.pyi +340 -0
  35. gllm_datastore/core/filters/schema.pyi +149 -0
  36. gllm_datastore/data_store/__init__.pyi +8 -0
  37. gllm_datastore/data_store/_elastic_core/__init__.pyi +0 -0
  38. gllm_datastore/data_store/_elastic_core/client_factory.pyi +66 -0
  39. gllm_datastore/data_store/_elastic_core/constants.pyi +27 -0
  40. gllm_datastore/data_store/_elastic_core/elastic_like_core.pyi +115 -0
  41. gllm_datastore/data_store/_elastic_core/index_manager.pyi +37 -0
  42. gllm_datastore/data_store/_elastic_core/query_translator.pyi +89 -0
  43. gllm_datastore/data_store/base.pyi +176 -0
  44. gllm_datastore/data_store/chroma/__init__.pyi +4 -0
  45. gllm_datastore/data_store/chroma/_chroma_import.pyi +13 -0
  46. gllm_datastore/data_store/chroma/data_store.pyi +201 -0
  47. gllm_datastore/data_store/chroma/fulltext.pyi +134 -0
  48. gllm_datastore/data_store/chroma/query.pyi +266 -0
  49. gllm_datastore/data_store/chroma/query_translator.pyi +41 -0
  50. gllm_datastore/data_store/chroma/vector.pyi +197 -0
  51. gllm_datastore/data_store/elasticsearch/__init__.pyi +5 -0
  52. gllm_datastore/data_store/elasticsearch/data_store.pyi +147 -0
  53. gllm_datastore/data_store/elasticsearch/fulltext.pyi +238 -0
  54. gllm_datastore/data_store/elasticsearch/query.pyi +118 -0
  55. gllm_datastore/data_store/elasticsearch/query_translator.pyi +18 -0
  56. gllm_datastore/data_store/elasticsearch/vector.pyi +180 -0
  57. gllm_datastore/data_store/exceptions.pyi +35 -0
  58. gllm_datastore/data_store/in_memory/__init__.pyi +5 -0
  59. gllm_datastore/data_store/in_memory/data_store.pyi +71 -0
  60. gllm_datastore/data_store/in_memory/fulltext.pyi +131 -0
  61. gllm_datastore/data_store/in_memory/query.pyi +175 -0
  62. gllm_datastore/data_store/in_memory/vector.pyi +174 -0
  63. gllm_datastore/data_store/opensearch/__init__.pyi +5 -0
  64. gllm_datastore/data_store/opensearch/data_store.pyi +160 -0
  65. gllm_datastore/data_store/opensearch/fulltext.pyi +240 -0
  66. gllm_datastore/data_store/opensearch/query.pyi +89 -0
  67. gllm_datastore/data_store/opensearch/query_translator.pyi +18 -0
  68. gllm_datastore/data_store/opensearch/vector.pyi +211 -0
  69. gllm_datastore/data_store/redis/__init__.pyi +5 -0
  70. gllm_datastore/data_store/redis/data_store.pyi +153 -0
  71. gllm_datastore/data_store/redis/fulltext.pyi +128 -0
  72. gllm_datastore/data_store/redis/query.pyi +428 -0
  73. gllm_datastore/data_store/redis/query_translator.pyi +37 -0
  74. gllm_datastore/data_store/redis/vector.pyi +131 -0
  75. gllm_datastore/data_store/sql/__init__.pyi +4 -0
  76. gllm_datastore/data_store/sql/constants.pyi +5 -0
  77. gllm_datastore/data_store/sql/data_store.pyi +201 -0
  78. gllm_datastore/data_store/sql/fulltext.pyi +164 -0
  79. gllm_datastore/data_store/sql/query.pyi +81 -0
  80. gllm_datastore/data_store/sql/query_translator.pyi +51 -0
  81. gllm_datastore/data_store/sql/schema.pyi +16 -0
  82. gllm_datastore/encryptor/__init__.pyi +4 -0
  83. gllm_datastore/encryptor/aes_gcm_encryptor.pyi +45 -0
  84. gllm_datastore/encryptor/capability/__init__.pyi +3 -0
  85. gllm_datastore/encryptor/capability/mixin.pyi +32 -0
  86. gllm_datastore/encryptor/encryptor.pyi +52 -0
  87. gllm_datastore/encryptor/key_ring/__init__.pyi +3 -0
  88. gllm_datastore/encryptor/key_ring/in_memory_key_ring.pyi +52 -0
  89. gllm_datastore/encryptor/key_ring/key_ring.pyi +45 -0
  90. gllm_datastore/encryptor/key_rotating_encryptor.pyi +60 -0
  91. gllm_datastore/graph_data_store/__init__.pyi +6 -0
  92. gllm_datastore/graph_data_store/graph_data_store.pyi +151 -0
  93. gllm_datastore/graph_data_store/graph_rag_data_store.pyi +29 -0
  94. gllm_datastore/graph_data_store/light_rag_data_store.pyi +93 -0
  95. gllm_datastore/graph_data_store/light_rag_postgres_data_store.pyi +96 -0
  96. gllm_datastore/graph_data_store/llama_index_graph_rag_data_store.pyi +49 -0
  97. gllm_datastore/graph_data_store/llama_index_neo4j_graph_rag_data_store.pyi +78 -0
  98. gllm_datastore/graph_data_store/mixins/__init__.pyi +3 -0
  99. gllm_datastore/graph_data_store/mixins/agentic_graph_tools_mixin.pyi +175 -0
  100. gllm_datastore/graph_data_store/nebula_graph_data_store.pyi +206 -0
  101. gllm_datastore/graph_data_store/neo4j_graph_data_store.pyi +182 -0
  102. gllm_datastore/graph_data_store/schema.pyi +27 -0
  103. gllm_datastore/graph_data_store/utils/__init__.pyi +6 -0
  104. gllm_datastore/graph_data_store/utils/constants.pyi +21 -0
  105. gllm_datastore/graph_data_store/utils/light_rag_em_invoker_adapter.pyi +56 -0
  106. gllm_datastore/graph_data_store/utils/light_rag_lm_invoker_adapter.pyi +43 -0
  107. gllm_datastore/graph_data_store/utils/llama_index_em_invoker_adapter.pyi +45 -0
  108. gllm_datastore/graph_data_store/utils/llama_index_lm_invoker_adapter.pyi +169 -0
  109. gllm_datastore/signature/__init__.pyi +0 -0
  110. gllm_datastore/signature/webhook_signature.pyi +31 -0
  111. gllm_datastore/sql_data_store/__init__.pyi +4 -0
  112. gllm_datastore/sql_data_store/adapter/__init__.pyi +0 -0
  113. gllm_datastore/sql_data_store/adapter/sqlalchemy_adapter.pyi +38 -0
  114. gllm_datastore/sql_data_store/constants.pyi +6 -0
  115. gllm_datastore/sql_data_store/sql_data_store.pyi +86 -0
  116. gllm_datastore/sql_data_store/sqlalchemy_sql_data_store.pyi +216 -0
  117. gllm_datastore/sql_data_store/types.pyi +31 -0
  118. gllm_datastore/utils/__init__.pyi +6 -0
  119. gllm_datastore/utils/converter.pyi +51 -0
  120. gllm_datastore/utils/dict.pyi +21 -0
  121. gllm_datastore/utils/ttl.pyi +25 -0
  122. gllm_datastore/utils/types.pyi +32 -0
  123. gllm_datastore/vector_data_store/__init__.pyi +6 -0
  124. gllm_datastore/vector_data_store/chroma_vector_data_store.pyi +259 -0
  125. gllm_datastore/vector_data_store/elasticsearch_vector_data_store.pyi +357 -0
  126. gllm_datastore/vector_data_store/in_memory_vector_data_store.pyi +179 -0
  127. gllm_datastore/vector_data_store/mixin/__init__.pyi +0 -0
  128. gllm_datastore/vector_data_store/mixin/cache_compatible_mixin.pyi +145 -0
  129. gllm_datastore/vector_data_store/redis_vector_data_store.pyi +191 -0
  130. gllm_datastore/vector_data_store/vector_data_store.pyi +146 -0
  131. gllm_datastore.build/.gitignore +1 -0
  132. gllm_datastore.cpython-312-darwin.so +0 -0
  133. gllm_datastore.pyi +178 -0
  134. gllm_datastore_binary-0.5.50.dist-info/METADATA +185 -0
  135. gllm_datastore_binary-0.5.50.dist-info/RECORD +137 -0
  136. gllm_datastore_binary-0.5.50.dist-info/WHEEL +5 -0
  137. gllm_datastore_binary-0.5.50.dist-info/top_level.txt +1 -0
@@ -0,0 +1,153 @@
1
+ from _typeshed import Incomplete
2
+ from gllm_datastore.core.filters.schema import FilterClause as FilterClause, QueryFilter as QueryFilter
3
+ from gllm_datastore.data_store.base import BaseDataStore as BaseDataStore, CapabilityType as CapabilityType
4
+ from gllm_datastore.data_store.redis.fulltext import RedisFulltextCapability as RedisFulltextCapability
5
+ from gllm_datastore.data_store.redis.query import get_filterable_fields_from_index as get_filterable_fields_from_index
6
+ from gllm_datastore.data_store.redis.query_translator import RedisQueryTranslator as RedisQueryTranslator
7
+ from gllm_datastore.data_store.redis.vector import RedisVectorCapability as RedisVectorCapability
8
+ from gllm_inference.em_invoker.em_invoker import BaseEMInvoker
9
+ from redis.asyncio.client import Redis
10
+
11
+ class RedisDataStore(BaseDataStore):
12
+ """Redis data store with fulltext capability support.
13
+
14
+ Attributes:
15
+ index_name (str): Name for the Redis index.
16
+ client (Redis): Redis client instance.
17
+ """
18
+ client: Incomplete
19
+ index_name: Incomplete
20
+ def __init__(self, index_name: str, url: str | None = None, client: Redis | None = None) -> None:
21
+ """Initialize the Redis data store.
22
+
23
+ Args:
24
+ index_name (str): Name of the Redis index to use.
25
+ url (str | None, optional): URL for Redis connection. Defaults to None.
26
+ Format: redis://[[username]:[password]]@host:port/database
27
+ client (Redis | None, optional): Redis client instance to use. Defaults to None.
28
+ in which case the url parameter will be used to create a new Redis client.
29
+
30
+ Raises:
31
+ ValueError: If neither `url` nor `client` is provided, or if URL is invalid.
32
+ TypeError: If `client` is not a Redis instance.
33
+ ConnectionError: If Redis connection fails.
34
+ """
35
+ @property
36
+ def supported_capabilities(self) -> list[CapabilityType]:
37
+ """Return list of currently supported capabilities.
38
+
39
+ Returns:
40
+ list[CapabilityType]: List of capability names that are supported.
41
+ """
42
+ @property
43
+ def fulltext(self) -> RedisFulltextCapability:
44
+ """Access fulltext capability if registered.
45
+
46
+ This method uses the logic of its parent class to return the fulltext capability handler.
47
+ This method overrides the parent class to return the RedisFulltextCapability handler for better
48
+ type hinting.
49
+
50
+ Returns:
51
+ RedisFulltextCapability: Fulltext capability handler.
52
+
53
+ Raises:
54
+ NotRegisteredException: If fulltext capability is not registered.
55
+ """
56
+ @property
57
+ def vector(self) -> RedisVectorCapability:
58
+ """Access vector capability if registered.
59
+
60
+ This method uses the logic of its parent class to return the vector capability handler.
61
+ This method overrides the parent class to return the RedisVectorCapability handler for better
62
+ type hinting.
63
+
64
+ Returns:
65
+ RedisVectorCapability: Vector capability handler.
66
+
67
+ Raises:
68
+ NotRegisteredException: If vector capability is not registered.
69
+ """
70
+ def with_fulltext(self, index_name: str | None = None) -> RedisDataStore:
71
+ """Configure fulltext capability and return datastore instance.
72
+
73
+ Schema will be automatically inferred from chunks when creating a new index,
74
+ or auto-detected from an existing index when performing operations.
75
+
76
+ Args:
77
+ index_name (str | None, optional): The name of the Redis index. Defaults to None,
78
+ in which case the default class attribute will be utilized.
79
+
80
+ Returns:
81
+ RedisDataStore: RedisDataStore instance for method chaining.
82
+ """
83
+ def with_vector(self, em_invoker: BaseEMInvoker, index_name: str | None = None) -> RedisDataStore:
84
+ """Configure vector capability and return datastore instance.
85
+
86
+ Schema will be automatically inferred from chunks when creating a new index,
87
+ or auto-detected from an existing index when performing operations.
88
+
89
+ Args:
90
+ em_invoker (BaseEMInvoker): The embedding model to perform vectorization.
91
+ index_name (str | None, optional): The name of the Redis index. Defaults to None,
92
+ in which case the default class attribute will be utilized.
93
+
94
+ Returns:
95
+ RedisDataStore: RedisDataStore instance for method chaining.
96
+
97
+ Raises:
98
+ ValueError: If em_invoker is not provided.
99
+ """
100
+ def translate_query_filter(self, query_filter: FilterClause | QueryFilter) -> str:
101
+ '''Translate QueryFilter or FilterClause to Redis native filter syntax.
102
+
103
+ This method delegates to the existing RedisQueryTranslator in the
104
+ redis.query_translator module and returns the result as a string.
105
+ It uses the instance\'s index_name and client to detect field types
106
+ for accurate Redis Search query syntax.
107
+
108
+ Examples:
109
+ ```python
110
+ from gllm_datastore.core.filters import filter as F
111
+
112
+ # Create datastore instance
113
+ datastore = RedisDataStore(index_name="my_index", url="redis://localhost:6379")
114
+
115
+ # Single FilterClause (field types detected from index schema)
116
+ clause = F.eq("metadata.status", "active")
117
+ result = datastore.translate_query_filter(clause)
118
+ # Returns: "@metadata_status:{active}" if status is a TAG field
119
+ # Returns: "@metadata_status:active" if status is a TEXT field
120
+
121
+ # QueryFilter with multiple clauses (AND condition)
122
+ filter_obj = F.and_(
123
+ F.eq("metadata.status", "active"),
124
+ F.gt("metadata.age", 25),
125
+ )
126
+ result = datastore.translate_query_filter(filter_obj)
127
+ # Returns: "@metadata_status:{active} @metadata_age:[(25 +inf]"
128
+
129
+ # QueryFilter with OR condition
130
+ filter_obj = F.or_(
131
+ F.eq("metadata.status", "active"),
132
+ F.eq("metadata.status", "pending"),
133
+ )
134
+ result = datastore.translate_query_filter(filter_obj)
135
+ # Returns: "@metadata_status:{active} | @metadata_status:{pending}"
136
+
137
+ # IN operator (produces parentheses syntax)
138
+ filter_obj = F.in_("metadata.category", ["tech", "science"])
139
+ result = datastore.translate_query_filter(filter_obj)
140
+ # Returns: "@metadata_category:(tech|science)"
141
+
142
+ # Empty filter returns None
143
+ result = datastore.translate_query_filter(None)
144
+ # Returns: None
145
+ ```
146
+
147
+ Args:
148
+ query_filter (FilterClause | QueryFilter): The filter to translate.
149
+ Can be a single FilterClause or a QueryFilter with multiple clauses.
150
+
151
+ Returns:
152
+ str: The translated filter as a Redis Search query string.
153
+ '''
@@ -0,0 +1,128 @@
1
+ from _typeshed import Incomplete
2
+ from gllm_core.schema.chunk import Chunk
3
+ from gllm_datastore.constants import CHUNK_KEYS as CHUNK_KEYS, FIELD_CONFIG_NAME as FIELD_CONFIG_NAME, FIELD_CONFIG_TYPE as FIELD_CONFIG_TYPE, FieldType as FieldType
4
+ from gllm_datastore.core.filters import FilterClause as FilterClause, QueryFilter as QueryFilter, QueryOptions as QueryOptions
5
+ from gllm_datastore.data_store.redis.query import apply_options_to_query as apply_options_to_query, check_index_exists as check_index_exists, collect_document_ids as collect_document_ids, delete_keys_batched as delete_keys_batched, execute_search_query as execute_search_query, get_doc_ids_for_deletion as get_doc_ids_for_deletion, get_filterable_fields_from_index as get_filterable_fields_from_index, infer_filterable_fields_from_chunks as infer_filterable_fields_from_chunks, normalize_field_name_for_schema as normalize_field_name_for_schema, parse_redis_documents as parse_redis_documents, prepare_chunk_document as prepare_chunk_document, process_doc_ids_in_batches as process_doc_ids_in_batches, process_update_batch as process_update_batch, sanitize_key as sanitize_key, strip_index_prefix as strip_index_prefix, validate_chunk_content as validate_chunk_content, validate_chunk_list as validate_chunk_list, validate_metadata_fields as validate_metadata_fields
6
+ from gllm_datastore.data_store.redis.query_translator import RedisQueryTranslator as RedisQueryTranslator
7
+ from redis.asyncio.client import Redis
8
+ from typing import Any
9
+
10
+ FUZZY_MATCH_MAX_DISTANCE: int
11
+
12
+ class DefaultBatchSize:
13
+ """Default batch sizes for Redis operations."""
14
+ DELETE: int
15
+ UPDATE: int
16
+
17
+ class RedisFulltextCapability:
18
+ """Redis implementation of FulltextCapability protocol.
19
+
20
+ Attributes:
21
+ index_name (str): Name of the Redis index.
22
+ client (Redis): Redis client instance.
23
+ """
24
+ index_name: Incomplete
25
+ client: Incomplete
26
+ def __init__(self, index_name: str, client: Redis) -> None:
27
+ """Initialize the Redis fulltext capability.
28
+
29
+ Schema will be automatically inferred from chunks when creating a new index,
30
+ or auto-detected from an existing index when performing operations.
31
+
32
+ Args:
33
+ index_name (str): Name of the Redis index.
34
+ client (Redis): Redis client instance.
35
+ """
36
+ async def create(self, data: Chunk | list[Chunk]) -> None:
37
+ '''Create new records in the datastore.
38
+
39
+ If the index does not exist and no filterable_fields were provided,
40
+ the schema will be inferred from the chunks being created.
41
+
42
+ Examples:
43
+ Create a new chunk.
44
+ ```python
45
+ await fulltext_capability.create(Chunk(content="Test chunk", metadata={"category": "test"}))
46
+ ```
47
+
48
+ Args:
49
+ data (Chunk | list[Chunk]): Data to create (single item or collection).
50
+
51
+ Raises:
52
+ ValueError: If data structure is invalid or chunk content is invalid.
53
+ '''
54
+ async def retrieve(self, filters: FilterClause | QueryFilter | None = None, options: QueryOptions | None = None) -> list[Chunk]:
55
+ """Read records from the datastore with optional filtering.
56
+
57
+ Args:
58
+ filters (FilterClause | QueryFilter | None, optional): Query filters to apply. Defaults to None.
59
+ options (QueryOptions | None, optional): Query options for sorting and pagination. Defaults to None,
60
+ in which case the default limit of 10 is used.
61
+
62
+ Returns:
63
+ list[Chunk]: List of matched chunks after applying filters and options.
64
+ """
65
+ async def retrieve_fuzzy(self, query: str, max_distance: int = 2, filters: FilterClause | QueryFilter | None = None, options: QueryOptions | None = None) -> list[Chunk]:
66
+ """Find records that fuzzy match the query within distance threshold.
67
+
68
+ Args:
69
+ query (str): Text to fuzzy match against.
70
+ max_distance (int): Maximum edit distance for matches. Defaults to 2.
71
+ Maximum value is 3 (limitation of Redis Vector Search).
72
+ filters (FilterClause | QueryFilter | None, optional): Optional metadata filters to apply.
73
+ Defaults to None.
74
+ options (QueryOptions | None, optional): Query options, only limit is used here. Defaults to None.
75
+
76
+ Returns:
77
+ list[Chunk]: Matched chunks ordered by relevance/distance.
78
+
79
+ Raises:
80
+ ValueError: If max_distance is greater than 3.
81
+
82
+ Note:
83
+ Maximum fuzzy distance is 3. This is a limitation of the Redis Search module.
84
+ """
85
+ async def update(self, update_values: dict[str, Any], filters: FilterClause | QueryFilter | None = None) -> None:
86
+ '''Update existing records in the datastore.
87
+
88
+ Processes updates in batches to avoid loading all matching documents into memory.
89
+ 1. Get document IDs matching the filters.
90
+ 2. In batch, get document data via document IDs.
91
+ 3. In batch, update the document data.
92
+
93
+ Examples:
94
+ Update certain metadata of a chunk with specific filters.
95
+ ```python
96
+ from gllm_datastore.core.filters import filter as F
97
+
98
+ await fulltext_capability.update(
99
+ update_values={"metadata": {"status": "published"}},
100
+ filters=F.eq("metadata.status", "draft"),
101
+ )
102
+ ```
103
+
104
+ Args:
105
+ update_values (dict[str, Any]): Mapping of fields to new values to apply.
106
+ filters (FilterClause | QueryFilter | None, optional): Filters to select records to update.
107
+ Defaults to None.
108
+
109
+ Raises:
110
+ Exception: If Redis operations fail.
111
+ '''
112
+ async def delete(self, filters: FilterClause | QueryFilter | None = None, options: QueryOptions | None = None) -> None:
113
+ """Delete records from the datastore.
114
+
115
+ Processes deletions in batches to avoid loading all matching documents into memory.
116
+ For delete operations, only document IDs are retrieved (not full content) to minimize memory usage.
117
+
118
+ Args:
119
+ filters (FilterClause | QueryFilter | None, optional): Filters to select records to delete.
120
+ Defaults to None.
121
+ options (QueryOptions | None, optional): Query options for sorting and limiting deletions
122
+ (for eviction-like operations). Defaults to None.
123
+
124
+ Raises:
125
+ Exception: If Redis operations fail.
126
+ """
127
+ async def clear(self) -> None:
128
+ """Clear all records from the datastore."""