valkey-glide 2.0.0rc3__cp310-cp310-macosx_11_0_arm64.whl → 2.2.1rc3__cp310-cp310-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 +160 -106
- glide/async_commands/cluster_commands.py +108 -105
- glide/async_commands/core.py +637 -444
- glide/async_commands/{server_modules/ft.py → ft.py} +8 -7
- glide/async_commands/{server_modules/glide_json.py → glide_json.py} +15 -92
- glide/async_commands/standalone_commands.py +27 -58
- glide/glide.cpython-310-darwin.so +0 -0
- glide/glide.pyi +26 -1
- glide/glide_client.py +269 -125
- glide/logger.py +33 -21
- glide/opentelemetry.py +185 -0
- glide_shared/__init__.py +330 -0
- glide_shared/commands/__init__.py +0 -0
- {glide/async_commands → glide_shared/commands}/batch.py +476 -64
- glide_shared/commands/batch_options.py +261 -0
- glide_shared/commands/core_options.py +407 -0
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_aggregate_options.py +3 -3
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_create_options.py +4 -2
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_profile_options.py +4 -4
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_search_options.py +4 -2
- {glide/async_commands → glide_shared/commands}/server_modules/json_batch.py +4 -4
- glide_shared/commands/server_modules/json_options.py +93 -0
- {glide/async_commands → glide_shared/commands}/sorted_set.py +2 -2
- {glide/async_commands → glide_shared/commands}/stream.py +1 -1
- {glide → glide_shared}/config.py +386 -61
- {glide → glide_shared}/constants.py +3 -3
- {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}/routes.py +54 -15
- valkey_glide-2.2.1rc3.dist-info/METADATA +210 -0
- valkey_glide-2.2.1rc3.dist-info/RECORD +40 -0
- glide/protobuf/command_request_pb2.py +0 -54
- glide/protobuf/command_request_pb2.pyi +0 -1187
- glide/protobuf/connection_request_pb2.py +0 -54
- glide/protobuf/connection_request_pb2.pyi +0 -320
- glide/protobuf/response_pb2.pyi +0 -100
- valkey_glide-2.0.0rc3.dist-info/METADATA +0 -127
- valkey_glide-2.0.0rc3.dist-info/RECORD +0 -37
- {glide/async_commands → glide_shared/commands}/bitmap.py +0 -0
- {glide/async_commands → glide_shared/commands}/command_args.py +0 -0
- {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_constants.py +0 -0
- {glide → glide_shared}/protobuf_codec.py +0 -0
- {valkey_glide-2.0.0rc3.dist-info → valkey_glide-2.2.1rc3.dist-info}/WHEEL +0 -0
glide/__init__.py
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
# Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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,
|
|
9
13
|
)
|
|
10
|
-
from
|
|
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,
|
|
11
26
|
BitEncoding,
|
|
12
27
|
BitFieldGet,
|
|
13
28
|
BitFieldIncrBy,
|
|
@@ -20,28 +35,26 @@ from glide.async_commands.bitmap import (
|
|
|
20
35
|
BitOffsetMultiplier,
|
|
21
36
|
BitOverflowControl,
|
|
22
37
|
BitwiseOperation,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
from glide.async_commands.core import (
|
|
38
|
+
ByAddressRoute,
|
|
39
|
+
ClosingError,
|
|
40
|
+
ClusterBatch,
|
|
41
|
+
ClusterBatchOptions,
|
|
42
|
+
ClusterTransaction,
|
|
29
43
|
ConditionalChange,
|
|
30
|
-
|
|
44
|
+
ConfigurationError,
|
|
45
|
+
ConnectionError,
|
|
46
|
+
DataType,
|
|
47
|
+
DistanceMetricType,
|
|
48
|
+
ExclusiveIdBound,
|
|
49
|
+
ExecAbortError,
|
|
31
50
|
ExpireOptions,
|
|
32
51
|
ExpiryGetEx,
|
|
33
52
|
ExpirySet,
|
|
34
53
|
ExpiryType,
|
|
35
54
|
ExpiryTypeGetEx,
|
|
55
|
+
Field,
|
|
56
|
+
FieldType,
|
|
36
57
|
FlushMode,
|
|
37
|
-
FunctionRestorePolicy,
|
|
38
|
-
InfoSection,
|
|
39
|
-
InsertPosition,
|
|
40
|
-
OnlyIfEqual,
|
|
41
|
-
UpdateOptions,
|
|
42
|
-
)
|
|
43
|
-
from glide.async_commands.server_modules import ft, glide_json, json_batch
|
|
44
|
-
from glide.async_commands.server_modules.ft_options.ft_aggregate_options import (
|
|
45
58
|
FtAggregateApply,
|
|
46
59
|
FtAggregateClause,
|
|
47
60
|
FtAggregateFilter,
|
|
@@ -49,59 +62,66 @@ from glide.async_commands.server_modules.ft_options.ft_aggregate_options import
|
|
|
49
62
|
FtAggregateLimit,
|
|
50
63
|
FtAggregateOptions,
|
|
51
64
|
FtAggregateReducer,
|
|
65
|
+
FtAggregateResponse,
|
|
52
66
|
FtAggregateSortBy,
|
|
53
67
|
FtAggregateSortProperty,
|
|
54
|
-
)
|
|
55
|
-
from glide.async_commands.server_modules.ft_options.ft_create_options import (
|
|
56
|
-
DataType,
|
|
57
|
-
DistanceMetricType,
|
|
58
|
-
Field,
|
|
59
|
-
FieldType,
|
|
60
68
|
FtCreateOptions,
|
|
61
|
-
|
|
62
|
-
TagField,
|
|
63
|
-
TextField,
|
|
64
|
-
VectorAlgorithm,
|
|
65
|
-
VectorField,
|
|
66
|
-
VectorFieldAttributes,
|
|
67
|
-
VectorFieldAttributesFlat,
|
|
68
|
-
VectorFieldAttributesHnsw,
|
|
69
|
-
VectorType,
|
|
70
|
-
)
|
|
71
|
-
from glide.async_commands.server_modules.ft_options.ft_profile_options import (
|
|
69
|
+
FtInfoResponse,
|
|
72
70
|
FtProfileOptions,
|
|
73
|
-
|
|
74
|
-
)
|
|
75
|
-
from glide.async_commands.server_modules.ft_options.ft_search_options import (
|
|
71
|
+
FtProfileResponse,
|
|
76
72
|
FtSearchLimit,
|
|
77
73
|
FtSearchOptions,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
from glide.async_commands.server_modules.glide_json import (
|
|
81
|
-
JsonArrIndexOptions,
|
|
82
|
-
JsonArrPopOptions,
|
|
83
|
-
JsonGetOptions,
|
|
84
|
-
)
|
|
85
|
-
from glide.async_commands.sorted_set import (
|
|
86
|
-
AggregationType,
|
|
74
|
+
FtSearchResponse,
|
|
75
|
+
FunctionRestorePolicy,
|
|
87
76
|
GeoSearchByBox,
|
|
88
77
|
GeoSearchByRadius,
|
|
89
78
|
GeoSearchCount,
|
|
90
79
|
GeospatialData,
|
|
91
80
|
GeoUnit,
|
|
81
|
+
GlideClientConfiguration,
|
|
82
|
+
GlideClusterClientConfiguration,
|
|
83
|
+
GlideError,
|
|
84
|
+
HashFieldConditionalChange,
|
|
85
|
+
IamAuthConfig,
|
|
86
|
+
IdBound,
|
|
92
87
|
InfBound,
|
|
88
|
+
InfoSection,
|
|
89
|
+
InsertPosition,
|
|
90
|
+
JsonArrIndexOptions,
|
|
91
|
+
JsonArrPopOptions,
|
|
92
|
+
JsonGetOptions,
|
|
93
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,
|
|
94
110
|
RangeByIndex,
|
|
95
111
|
RangeByLex,
|
|
96
112
|
RangeByScore,
|
|
113
|
+
ReadFrom,
|
|
114
|
+
RequestError,
|
|
115
|
+
ReturnField,
|
|
116
|
+
Route,
|
|
97
117
|
ScoreBoundary,
|
|
98
118
|
ScoreFilter,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
119
|
+
ServerCredentials,
|
|
120
|
+
ServiceType,
|
|
121
|
+
SignedEncoding,
|
|
122
|
+
SlotIdRoute,
|
|
123
|
+
SlotKeyRoute,
|
|
124
|
+
SlotType,
|
|
105
125
|
StreamAddOptions,
|
|
106
126
|
StreamClaimOptions,
|
|
107
127
|
StreamGroupOptions,
|
|
@@ -110,78 +130,105 @@ from glide.async_commands.stream import (
|
|
|
110
130
|
StreamReadGroupOptions,
|
|
111
131
|
StreamReadOptions,
|
|
112
132
|
StreamTrimOptions,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
)
|
|
116
|
-
from glide.config import (
|
|
117
|
-
AdvancedGlideClientConfiguration,
|
|
118
|
-
AdvancedGlideClusterClientConfiguration,
|
|
119
|
-
BackoffStrategy,
|
|
120
|
-
GlideClientConfiguration,
|
|
121
|
-
GlideClusterClientConfiguration,
|
|
122
|
-
NodeAddress,
|
|
123
|
-
PeriodicChecksManualInterval,
|
|
124
|
-
PeriodicChecksStatus,
|
|
125
|
-
ProtocolVersion,
|
|
126
|
-
ReadFrom,
|
|
127
|
-
ServerCredentials,
|
|
128
|
-
)
|
|
129
|
-
from glide.constants import (
|
|
130
|
-
OK,
|
|
131
|
-
TOK,
|
|
132
|
-
FtAggregateResponse,
|
|
133
|
-
FtInfoResponse,
|
|
134
|
-
FtProfileResponse,
|
|
135
|
-
FtSearchResponse,
|
|
133
|
+
TagField,
|
|
134
|
+
TBatch,
|
|
136
135
|
TClusterResponse,
|
|
137
136
|
TEncodable,
|
|
137
|
+
TextField,
|
|
138
138
|
TFunctionListResponse,
|
|
139
139
|
TFunctionStatsFullResponse,
|
|
140
140
|
TFunctionStatsSingleNodeResponse,
|
|
141
|
+
TimeoutError,
|
|
141
142
|
TJsonResponse,
|
|
142
143
|
TJsonUniversalResponse,
|
|
144
|
+
TlsAdvancedConfiguration,
|
|
145
|
+
Transaction,
|
|
143
146
|
TResult,
|
|
147
|
+
TrimByMaxLen,
|
|
148
|
+
TrimByMinId,
|
|
144
149
|
TSingleNodeRoute,
|
|
145
150
|
TXInfoStreamFullResponse,
|
|
146
151
|
TXInfoStreamResponse,
|
|
152
|
+
UnsignedEncoding,
|
|
153
|
+
UpdateOptions,
|
|
154
|
+
VectorAlgorithm,
|
|
155
|
+
VectorField,
|
|
156
|
+
VectorFieldAttributes,
|
|
157
|
+
VectorFieldAttributesFlat,
|
|
158
|
+
VectorFieldAttributesHnsw,
|
|
159
|
+
VectorType,
|
|
160
|
+
json_batch,
|
|
147
161
|
)
|
|
148
|
-
from glide.exceptions import (
|
|
149
|
-
ClosingError,
|
|
150
|
-
ConfigurationError,
|
|
151
|
-
ConnectionError,
|
|
152
|
-
ExecAbortError,
|
|
153
|
-
GlideError,
|
|
154
|
-
RequestError,
|
|
155
|
-
TimeoutError,
|
|
156
|
-
)
|
|
157
|
-
from glide.glide_client import GlideClient, GlideClusterClient, TGlideClient
|
|
158
|
-
from glide.logger import Level as LogLevel
|
|
159
|
-
from glide.logger import Logger
|
|
160
|
-
from glide.routes import (
|
|
161
|
-
AllNodes,
|
|
162
|
-
AllPrimaries,
|
|
163
|
-
ByAddressRoute,
|
|
164
|
-
RandomNode,
|
|
165
|
-
Route,
|
|
166
|
-
SlotIdRoute,
|
|
167
|
-
SlotKeyRoute,
|
|
168
|
-
SlotType,
|
|
169
|
-
)
|
|
170
162
|
|
|
171
|
-
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
|
|
198
|
+
|
|
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)
|
|
172
211
|
|
|
173
|
-
|
|
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)
|
|
174
217
|
|
|
175
218
|
__all__ = [
|
|
176
219
|
# Client
|
|
220
|
+
"TGlideClient",
|
|
177
221
|
"GlideClient",
|
|
178
222
|
"GlideClusterClient",
|
|
179
223
|
"Batch",
|
|
180
224
|
"ClusterBatch",
|
|
181
225
|
"ClusterTransaction",
|
|
182
226
|
"Transaction",
|
|
183
|
-
"TGlideClient",
|
|
184
227
|
"TBatch",
|
|
228
|
+
# Batch Options
|
|
229
|
+
"BatchOptions",
|
|
230
|
+
"BatchRetryStrategy",
|
|
231
|
+
"ClusterBatchOptions",
|
|
185
232
|
# Config
|
|
186
233
|
"AdvancedGlideClientConfiguration",
|
|
187
234
|
"AdvancedGlideClusterClientConfiguration",
|
|
@@ -190,10 +237,16 @@ __all__ = [
|
|
|
190
237
|
"BackoffStrategy",
|
|
191
238
|
"ReadFrom",
|
|
192
239
|
"ServerCredentials",
|
|
240
|
+
"ServiceType",
|
|
241
|
+
"IamAuthConfig",
|
|
193
242
|
"NodeAddress",
|
|
243
|
+
"OpenTelemetryConfig",
|
|
244
|
+
"OpenTelemetryMetricsConfig",
|
|
245
|
+
"OpenTelemetryTracesConfig",
|
|
194
246
|
"ProtocolVersion",
|
|
195
247
|
"PeriodicChecksManualInterval",
|
|
196
248
|
"PeriodicChecksStatus",
|
|
249
|
+
"TlsAdvancedConfiguration",
|
|
197
250
|
# Response
|
|
198
251
|
"OK",
|
|
199
252
|
"TClusterResponse",
|
|
@@ -243,11 +296,11 @@ __all__ = [
|
|
|
243
296
|
"GeoSearchCount",
|
|
244
297
|
"GeoUnit",
|
|
245
298
|
"GeospatialData",
|
|
299
|
+
"HashFieldConditionalChange",
|
|
246
300
|
"AggregationType",
|
|
247
301
|
"InfBound",
|
|
248
302
|
"InfoSection",
|
|
249
303
|
"InsertPosition",
|
|
250
|
-
"ft",
|
|
251
304
|
"LexBoundary",
|
|
252
305
|
"Limit",
|
|
253
306
|
"ListDirection",
|
|
@@ -303,6 +356,7 @@ __all__ = [
|
|
|
303
356
|
"RequestError",
|
|
304
357
|
"TimeoutError",
|
|
305
358
|
# Ft
|
|
359
|
+
"ft",
|
|
306
360
|
"DataType",
|
|
307
361
|
"DistanceMetricType",
|
|
308
362
|
"Field",
|