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