valkey-glide 1.2.0rc14__cp311-cp311-macosx_11_0_arm64.whl → 2.2.3__cp311-cp311-macosx_11_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.
- glide/__init__.py +169 -104
- glide/async_commands/cluster_commands.py +367 -172
- glide/async_commands/core.py +1808 -1026
- glide/async_commands/{server_modules/ft.py → ft.py} +91 -21
- glide/async_commands/{server_modules/glide_json.py → glide_json.py} +161 -146
- glide/async_commands/standalone_commands.py +204 -136
- glide/glide.cpython-311-darwin.so +0 -0
- glide/glide.pyi +26 -1
- glide/glide_client.py +355 -136
- glide/logger.py +34 -22
- glide/opentelemetry.py +185 -0
- glide_shared/__init__.py +330 -0
- glide_shared/commands/__init__.py +0 -0
- glide/async_commands/transaction.py → glide_shared/commands/batch.py +1845 -1059
- glide_shared/commands/batch_options.py +261 -0
- {glide/async_commands → glide_shared/commands}/bitmap.py +96 -86
- {glide/async_commands → glide_shared/commands}/command_args.py +7 -6
- glide_shared/commands/core_options.py +407 -0
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_aggregate_options.py +18 -11
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_create_options.py +27 -13
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_profile_options.py +16 -11
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_search_options.py +17 -9
- glide_shared/commands/server_modules/json_batch.py +820 -0
- glide_shared/commands/server_modules/json_options.py +93 -0
- {glide/async_commands → glide_shared/commands}/sorted_set.py +42 -32
- {glide/async_commands → glide_shared/commands}/stream.py +95 -88
- glide_shared/config.py +975 -0
- {glide → glide_shared}/constants.py +11 -7
- {glide → glide_shared}/exceptions.py +27 -1
- glide_shared/protobuf/command_request_pb2.py +56 -0
- glide_shared/protobuf/connection_request_pb2.py +56 -0
- {glide → glide_shared}/protobuf/response_pb2.py +6 -6
- {glide → glide_shared}/protobuf_codec.py +7 -6
- glide_shared/routes.py +161 -0
- valkey_glide-2.2.3.dist-info/METADATA +211 -0
- valkey_glide-2.2.3.dist-info/RECORD +40 -0
- {valkey_glide-1.2.0rc14.dist-info → valkey_glide-2.2.3.dist-info}/WHEEL +1 -1
- glide/config.py +0 -521
- glide/protobuf/command_request_pb2.py +0 -54
- glide/protobuf/command_request_pb2.pyi +0 -1161
- glide/protobuf/connection_request_pb2.py +0 -52
- glide/protobuf/connection_request_pb2.pyi +0 -287
- glide/protobuf/response_pb2.pyi +0 -101
- glide/routes.py +0 -114
- valkey_glide-1.2.0rc14.dist-info/METADATA +0 -122
- valkey_glide-1.2.0rc14.dist-info/RECORD +0 -36
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_constants.py +0 -0
glide/__init__.py
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import sys
|
|
4
|
+
import types
|
|
5
|
+
import warnings
|
|
6
|
+
|
|
7
|
+
from glide.glide import (
|
|
8
|
+
ClusterScanCursor,
|
|
9
|
+
OpenTelemetryConfig,
|
|
10
|
+
OpenTelemetryMetricsConfig,
|
|
11
|
+
OpenTelemetryTracesConfig,
|
|
12
|
+
Script,
|
|
13
|
+
)
|
|
14
|
+
from glide_shared import (
|
|
15
|
+
OK,
|
|
16
|
+
TOK,
|
|
17
|
+
AdvancedGlideClientConfiguration,
|
|
18
|
+
AdvancedGlideClusterClientConfiguration,
|
|
19
|
+
AggregationType,
|
|
20
|
+
AllNodes,
|
|
21
|
+
AllPrimaries,
|
|
22
|
+
BackoffStrategy,
|
|
23
|
+
Batch,
|
|
24
|
+
BatchOptions,
|
|
25
|
+
BatchRetryStrategy,
|
|
4
26
|
BitEncoding,
|
|
5
27
|
BitFieldGet,
|
|
6
28
|
BitFieldIncrBy,
|
|
@@ -13,27 +35,26 @@ from glide.async_commands.bitmap import (
|
|
|
13
35
|
BitOffsetMultiplier,
|
|
14
36
|
BitOverflowControl,
|
|
15
37
|
BitwiseOperation,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
from glide.async_commands.core import (
|
|
38
|
+
ByAddressRoute,
|
|
39
|
+
ClosingError,
|
|
40
|
+
ClusterBatch,
|
|
41
|
+
ClusterBatchOptions,
|
|
42
|
+
ClusterTransaction,
|
|
22
43
|
ConditionalChange,
|
|
23
|
-
|
|
44
|
+
ConfigurationError,
|
|
45
|
+
ConnectionError,
|
|
46
|
+
DataType,
|
|
47
|
+
DistanceMetricType,
|
|
48
|
+
ExclusiveIdBound,
|
|
49
|
+
ExecAbortError,
|
|
24
50
|
ExpireOptions,
|
|
25
51
|
ExpiryGetEx,
|
|
26
52
|
ExpirySet,
|
|
27
53
|
ExpiryType,
|
|
28
54
|
ExpiryTypeGetEx,
|
|
55
|
+
Field,
|
|
56
|
+
FieldType,
|
|
29
57
|
FlushMode,
|
|
30
|
-
FunctionRestorePolicy,
|
|
31
|
-
InfoSection,
|
|
32
|
-
InsertPosition,
|
|
33
|
-
UpdateOptions,
|
|
34
|
-
)
|
|
35
|
-
from glide.async_commands.server_modules import ft, glide_json
|
|
36
|
-
from glide.async_commands.server_modules.ft_options.ft_aggregate_options import (
|
|
37
58
|
FtAggregateApply,
|
|
38
59
|
FtAggregateClause,
|
|
39
60
|
FtAggregateFilter,
|
|
@@ -41,59 +62,66 @@ from glide.async_commands.server_modules.ft_options.ft_aggregate_options import
|
|
|
41
62
|
FtAggregateLimit,
|
|
42
63
|
FtAggregateOptions,
|
|
43
64
|
FtAggregateReducer,
|
|
65
|
+
FtAggregateResponse,
|
|
44
66
|
FtAggregateSortBy,
|
|
45
67
|
FtAggregateSortProperty,
|
|
46
|
-
)
|
|
47
|
-
from glide.async_commands.server_modules.ft_options.ft_create_options import (
|
|
48
|
-
DataType,
|
|
49
|
-
DistanceMetricType,
|
|
50
|
-
Field,
|
|
51
|
-
FieldType,
|
|
52
68
|
FtCreateOptions,
|
|
53
|
-
|
|
54
|
-
TagField,
|
|
55
|
-
TextField,
|
|
56
|
-
VectorAlgorithm,
|
|
57
|
-
VectorField,
|
|
58
|
-
VectorFieldAttributes,
|
|
59
|
-
VectorFieldAttributesFlat,
|
|
60
|
-
VectorFieldAttributesHnsw,
|
|
61
|
-
VectorType,
|
|
62
|
-
)
|
|
63
|
-
from glide.async_commands.server_modules.ft_options.ft_profile_options import (
|
|
69
|
+
FtInfoResponse,
|
|
64
70
|
FtProfileOptions,
|
|
65
|
-
|
|
66
|
-
)
|
|
67
|
-
from glide.async_commands.server_modules.ft_options.ft_search_options import (
|
|
71
|
+
FtProfileResponse,
|
|
68
72
|
FtSearchLimit,
|
|
69
73
|
FtSearchOptions,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
from glide.async_commands.server_modules.glide_json import (
|
|
73
|
-
JsonArrIndexOptions,
|
|
74
|
-
JsonArrPopOptions,
|
|
75
|
-
JsonGetOptions,
|
|
76
|
-
)
|
|
77
|
-
from glide.async_commands.sorted_set import (
|
|
78
|
-
AggregationType,
|
|
74
|
+
FtSearchResponse,
|
|
75
|
+
FunctionRestorePolicy,
|
|
79
76
|
GeoSearchByBox,
|
|
80
77
|
GeoSearchByRadius,
|
|
81
78
|
GeoSearchCount,
|
|
82
79
|
GeospatialData,
|
|
83
80
|
GeoUnit,
|
|
81
|
+
GlideClientConfiguration,
|
|
82
|
+
GlideClusterClientConfiguration,
|
|
83
|
+
GlideError,
|
|
84
|
+
HashFieldConditionalChange,
|
|
85
|
+
IamAuthConfig,
|
|
86
|
+
IdBound,
|
|
84
87
|
InfBound,
|
|
88
|
+
InfoSection,
|
|
89
|
+
InsertPosition,
|
|
90
|
+
JsonArrIndexOptions,
|
|
91
|
+
JsonArrPopOptions,
|
|
92
|
+
JsonGetOptions,
|
|
85
93
|
LexBoundary,
|
|
94
|
+
Limit,
|
|
95
|
+
ListDirection,
|
|
96
|
+
MaxId,
|
|
97
|
+
MinId,
|
|
98
|
+
NodeAddress,
|
|
99
|
+
NumericField,
|
|
100
|
+
ObjectType,
|
|
101
|
+
OffsetOptions,
|
|
102
|
+
OnlyIfEqual,
|
|
103
|
+
OrderBy,
|
|
104
|
+
PeriodicChecksManualInterval,
|
|
105
|
+
PeriodicChecksStatus,
|
|
106
|
+
ProtocolVersion,
|
|
107
|
+
PubSubMsg,
|
|
108
|
+
QueryType,
|
|
109
|
+
RandomNode,
|
|
86
110
|
RangeByIndex,
|
|
87
111
|
RangeByLex,
|
|
88
112
|
RangeByScore,
|
|
113
|
+
ReadFrom,
|
|
114
|
+
RequestError,
|
|
115
|
+
ReturnField,
|
|
116
|
+
Route,
|
|
89
117
|
ScoreBoundary,
|
|
90
118
|
ScoreFilter,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
119
|
+
ServerCredentials,
|
|
120
|
+
ServiceType,
|
|
121
|
+
SignedEncoding,
|
|
122
|
+
SlotIdRoute,
|
|
123
|
+
SlotKeyRoute,
|
|
124
|
+
SlotType,
|
|
97
125
|
StreamAddOptions,
|
|
98
126
|
StreamClaimOptions,
|
|
99
127
|
StreamGroupOptions,
|
|
@@ -102,89 +130,123 @@ from glide.async_commands.stream import (
|
|
|
102
130
|
StreamReadGroupOptions,
|
|
103
131
|
StreamReadOptions,
|
|
104
132
|
StreamTrimOptions,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
)
|
|
108
|
-
from glide.async_commands.transaction import (
|
|
109
|
-
ClusterTransaction,
|
|
110
|
-
Transaction,
|
|
111
|
-
TTransaction,
|
|
112
|
-
)
|
|
113
|
-
from glide.config import (
|
|
114
|
-
BackoffStrategy,
|
|
115
|
-
GlideClientConfiguration,
|
|
116
|
-
GlideClusterClientConfiguration,
|
|
117
|
-
NodeAddress,
|
|
118
|
-
PeriodicChecksManualInterval,
|
|
119
|
-
PeriodicChecksStatus,
|
|
120
|
-
ProtocolVersion,
|
|
121
|
-
ReadFrom,
|
|
122
|
-
ServerCredentials,
|
|
123
|
-
)
|
|
124
|
-
from glide.constants import (
|
|
125
|
-
OK,
|
|
126
|
-
TOK,
|
|
127
|
-
FtAggregateResponse,
|
|
128
|
-
FtInfoResponse,
|
|
129
|
-
FtProfileResponse,
|
|
130
|
-
FtSearchResponse,
|
|
133
|
+
TagField,
|
|
134
|
+
TBatch,
|
|
131
135
|
TClusterResponse,
|
|
132
136
|
TEncodable,
|
|
137
|
+
TextField,
|
|
133
138
|
TFunctionListResponse,
|
|
134
139
|
TFunctionStatsFullResponse,
|
|
135
140
|
TFunctionStatsSingleNodeResponse,
|
|
141
|
+
TimeoutError,
|
|
136
142
|
TJsonResponse,
|
|
137
143
|
TJsonUniversalResponse,
|
|
144
|
+
TlsAdvancedConfiguration,
|
|
145
|
+
Transaction,
|
|
138
146
|
TResult,
|
|
147
|
+
TrimByMaxLen,
|
|
148
|
+
TrimByMinId,
|
|
139
149
|
TSingleNodeRoute,
|
|
140
150
|
TXInfoStreamFullResponse,
|
|
141
151
|
TXInfoStreamResponse,
|
|
152
|
+
UnsignedEncoding,
|
|
153
|
+
UpdateOptions,
|
|
154
|
+
VectorAlgorithm,
|
|
155
|
+
VectorField,
|
|
156
|
+
VectorFieldAttributes,
|
|
157
|
+
VectorFieldAttributesFlat,
|
|
158
|
+
VectorFieldAttributesHnsw,
|
|
159
|
+
VectorType,
|
|
160
|
+
json_batch,
|
|
142
161
|
)
|
|
143
|
-
from glide.exceptions import (
|
|
144
|
-
ClosingError,
|
|
145
|
-
ConfigurationError,
|
|
146
|
-
ConnectionError,
|
|
147
|
-
ExecAbortError,
|
|
148
|
-
GlideError,
|
|
149
|
-
RequestError,
|
|
150
|
-
TimeoutError,
|
|
151
|
-
)
|
|
152
|
-
from glide.glide_client import GlideClient, GlideClusterClient, TGlideClient
|
|
153
|
-
from glide.logger import Level as LogLevel
|
|
154
|
-
from glide.logger import Logger
|
|
155
|
-
from glide.routes import (
|
|
156
|
-
AllNodes,
|
|
157
|
-
AllPrimaries,
|
|
158
|
-
ByAddressRoute,
|
|
159
|
-
RandomNode,
|
|
160
|
-
Route,
|
|
161
|
-
SlotIdRoute,
|
|
162
|
-
SlotKeyRoute,
|
|
163
|
-
SlotType,
|
|
164
|
-
)
|
|
165
162
|
|
|
166
|
-
from .
|
|
163
|
+
from .async_commands import ft, glide_json
|
|
164
|
+
from .glide_client import GlideClient, GlideClusterClient, TGlideClient
|
|
165
|
+
from .logger import Level as LogLevel
|
|
166
|
+
from .logger import Logger
|
|
167
|
+
|
|
168
|
+
_glide_module = sys.modules[__name__]
|
|
169
|
+
|
|
170
|
+
_legacy_modules = [
|
|
171
|
+
"glide.exceptions",
|
|
172
|
+
"glide.config",
|
|
173
|
+
"glide.constants",
|
|
174
|
+
"glide.routes",
|
|
175
|
+
"glide.async_commands",
|
|
176
|
+
"glide.async_commands.batch",
|
|
177
|
+
"glide.async_commands.batch_options",
|
|
178
|
+
"glide.async_commands.bitmap",
|
|
179
|
+
"glide.async_commands.command_args",
|
|
180
|
+
"glide.async_commands.server_modules",
|
|
181
|
+
"glide.async_commands.server_modules.ft_options",
|
|
182
|
+
"glide.async_commands.server_modules.ft_options.ft_aggregate_options",
|
|
183
|
+
"glide.async_commands.server_modules.ft_options.ft_create_options",
|
|
184
|
+
"glide.async_commands.server_modules.ft_options.ft_profile_options",
|
|
185
|
+
"glide.async_commands.server_modules.ft_options.ft_search_options",
|
|
186
|
+
"glide.async_commands.server_modules.glide_json",
|
|
187
|
+
"glide.async_commands.sorted_set",
|
|
188
|
+
"glide.async_commands.stream",
|
|
189
|
+
]
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
class _LegacyModule(types.ModuleType):
|
|
193
|
+
"""Proxy for a deprecated module that warns when first accessed."""
|
|
194
|
+
|
|
195
|
+
def __init__(self, name):
|
|
196
|
+
super().__init__(name)
|
|
197
|
+
self._warned = False
|
|
167
198
|
|
|
168
|
-
|
|
199
|
+
def __getattr__(self, name):
|
|
200
|
+
if not self._warned:
|
|
201
|
+
warnings.warn(
|
|
202
|
+
f"Importing from '{self.__name__}' is deprecated. "
|
|
203
|
+
f"Please import directly from 'glide' instead.",
|
|
204
|
+
DeprecationWarning,
|
|
205
|
+
stacklevel=2,
|
|
206
|
+
)
|
|
207
|
+
self._warned = True
|
|
208
|
+
|
|
209
|
+
# Access the attribute from the real top-level glide module
|
|
210
|
+
return getattr(_glide_module, name)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
# Replace old modules with lazy proxy modules
|
|
214
|
+
for old_name in _legacy_modules:
|
|
215
|
+
if old_name not in sys.modules:
|
|
216
|
+
sys.modules[old_name] = _LegacyModule(old_name)
|
|
169
217
|
|
|
170
218
|
__all__ = [
|
|
171
219
|
# Client
|
|
220
|
+
"TGlideClient",
|
|
172
221
|
"GlideClient",
|
|
173
222
|
"GlideClusterClient",
|
|
174
|
-
"
|
|
223
|
+
"Batch",
|
|
224
|
+
"ClusterBatch",
|
|
175
225
|
"ClusterTransaction",
|
|
176
|
-
"
|
|
177
|
-
"
|
|
226
|
+
"Transaction",
|
|
227
|
+
"TBatch",
|
|
228
|
+
# Batch Options
|
|
229
|
+
"BatchOptions",
|
|
230
|
+
"BatchRetryStrategy",
|
|
231
|
+
"ClusterBatchOptions",
|
|
178
232
|
# Config
|
|
233
|
+
"AdvancedGlideClientConfiguration",
|
|
234
|
+
"AdvancedGlideClusterClientConfiguration",
|
|
179
235
|
"GlideClientConfiguration",
|
|
180
236
|
"GlideClusterClientConfiguration",
|
|
181
237
|
"BackoffStrategy",
|
|
182
238
|
"ReadFrom",
|
|
183
239
|
"ServerCredentials",
|
|
240
|
+
"ServiceType",
|
|
241
|
+
"IamAuthConfig",
|
|
184
242
|
"NodeAddress",
|
|
243
|
+
"OpenTelemetryConfig",
|
|
244
|
+
"OpenTelemetryMetricsConfig",
|
|
245
|
+
"OpenTelemetryTracesConfig",
|
|
185
246
|
"ProtocolVersion",
|
|
186
247
|
"PeriodicChecksManualInterval",
|
|
187
248
|
"PeriodicChecksStatus",
|
|
249
|
+
"TlsAdvancedConfiguration",
|
|
188
250
|
# Response
|
|
189
251
|
"OK",
|
|
190
252
|
"TClusterResponse",
|
|
@@ -221,6 +283,7 @@ __all__ = [
|
|
|
221
283
|
"Script",
|
|
222
284
|
"ScoreBoundary",
|
|
223
285
|
"ConditionalChange",
|
|
286
|
+
"OnlyIfEqual",
|
|
224
287
|
"ExpireOptions",
|
|
225
288
|
"ExpiryGetEx",
|
|
226
289
|
"ExpirySet",
|
|
@@ -233,11 +296,11 @@ __all__ = [
|
|
|
233
296
|
"GeoSearchCount",
|
|
234
297
|
"GeoUnit",
|
|
235
298
|
"GeospatialData",
|
|
299
|
+
"HashFieldConditionalChange",
|
|
236
300
|
"AggregationType",
|
|
237
301
|
"InfBound",
|
|
238
302
|
"InfoSection",
|
|
239
303
|
"InsertPosition",
|
|
240
|
-
"ft",
|
|
241
304
|
"LexBoundary",
|
|
242
305
|
"Limit",
|
|
243
306
|
"ListDirection",
|
|
@@ -267,6 +330,7 @@ __all__ = [
|
|
|
267
330
|
"PubSubMsg",
|
|
268
331
|
# Json
|
|
269
332
|
"glide_json",
|
|
333
|
+
"json_batch",
|
|
270
334
|
"JsonGetOptions",
|
|
271
335
|
"JsonArrIndexOptions",
|
|
272
336
|
"JsonArrPopOptions",
|
|
@@ -292,6 +356,7 @@ __all__ = [
|
|
|
292
356
|
"RequestError",
|
|
293
357
|
"TimeoutError",
|
|
294
358
|
# Ft
|
|
359
|
+
"ft",
|
|
295
360
|
"DataType",
|
|
296
361
|
"DistanceMetricType",
|
|
297
362
|
"Field",
|