valkey-glide 2.0.1__cp313-cp313-macosx_10_7_x86_64.whl → 2.1.0rc1__cp313-cp313-macosx_10_7_x86_64.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.
Potentially problematic release.
This version of valkey-glide might be problematic. Click here for more details.
- glide/__init__.py +95 -119
- glide/async_commands/cluster_commands.py +11 -11
- glide/async_commands/core.py +537 -414
- 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 +9 -11
- glide/glide.cpython-313-darwin.so +0 -0
- glide/glide.pyi +1 -1
- glide/glide_client.py +39 -46
- glide/logger.py +3 -3
- glide/opentelemetry.py +8 -4
- glide_shared/__init__.py +326 -0
- {glide/async_commands → glide_shared/commands}/batch.py +396 -10
- {glide/async_commands → glide_shared/commands}/batch_options.py +1 -1
- 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 +28 -21
- {glide → glide_shared}/constants.py +3 -3
- {glide → glide_shared}/exceptions.py +27 -1
- glide_shared/protobuf/command_request_pb2.py +54 -0
- {glide → glide_shared}/routes.py +29 -15
- {valkey_glide-2.0.1.dist-info → valkey_glide-2.1.0rc1.dist-info}/METADATA +119 -58
- valkey_glide-2.1.0rc1.dist-info/RECORD +39 -0
- glide/protobuf/command_request_pb2.py +0 -54
- glide/protobuf/command_request_pb2.pyi +0 -1193
- glide/protobuf/connection_request_pb2.pyi +0 -299
- glide/protobuf/response_pb2.pyi +0 -106
- valkey_glide-2.0.1.dist-info/RECORD +0 -39
- /glide/py.typed → /glide_shared/commands/__init__.py +0 -0
- {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/connection_request_pb2.py +0 -0
- {glide → glide_shared}/protobuf/response_pb2.py +0 -0
- {glide → glide_shared}/protobuf_codec.py +0 -0
- {valkey_glide-2.0.1.dist-info → valkey_glide-2.1.0rc1.dist-info}/WHEEL +0 -0
glide/__init__.py
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
# Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
2
2
|
|
|
3
|
-
from glide.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
from glide.glide import (
|
|
4
|
+
ClusterScanCursor,
|
|
5
|
+
OpenTelemetryConfig,
|
|
6
|
+
OpenTelemetryMetricsConfig,
|
|
7
|
+
OpenTelemetryTracesConfig,
|
|
8
|
+
Script,
|
|
9
9
|
)
|
|
10
|
-
from
|
|
10
|
+
from glide_shared import (
|
|
11
|
+
OK,
|
|
12
|
+
TOK,
|
|
13
|
+
AdvancedGlideClientConfiguration,
|
|
14
|
+
AdvancedGlideClusterClientConfiguration,
|
|
15
|
+
AggregationType,
|
|
16
|
+
AllNodes,
|
|
17
|
+
AllPrimaries,
|
|
18
|
+
BackoffStrategy,
|
|
19
|
+
Batch,
|
|
11
20
|
BatchOptions,
|
|
12
21
|
BatchRetryStrategy,
|
|
13
|
-
ClusterBatchOptions,
|
|
14
|
-
)
|
|
15
|
-
from glide.async_commands.bitmap import (
|
|
16
22
|
BitEncoding,
|
|
17
23
|
BitFieldGet,
|
|
18
24
|
BitFieldIncrBy,
|
|
@@ -25,28 +31,26 @@ from glide.async_commands.bitmap import (
|
|
|
25
31
|
BitOffsetMultiplier,
|
|
26
32
|
BitOverflowControl,
|
|
27
33
|
BitwiseOperation,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
from glide.async_commands.core import (
|
|
34
|
+
ByAddressRoute,
|
|
35
|
+
ClosingError,
|
|
36
|
+
ClusterBatch,
|
|
37
|
+
ClusterBatchOptions,
|
|
38
|
+
ClusterTransaction,
|
|
34
39
|
ConditionalChange,
|
|
35
|
-
|
|
40
|
+
ConfigurationError,
|
|
41
|
+
ConnectionError,
|
|
42
|
+
DataType,
|
|
43
|
+
DistanceMetricType,
|
|
44
|
+
ExclusiveIdBound,
|
|
45
|
+
ExecAbortError,
|
|
36
46
|
ExpireOptions,
|
|
37
47
|
ExpiryGetEx,
|
|
38
48
|
ExpirySet,
|
|
39
49
|
ExpiryType,
|
|
40
50
|
ExpiryTypeGetEx,
|
|
51
|
+
Field,
|
|
52
|
+
FieldType,
|
|
41
53
|
FlushMode,
|
|
42
|
-
FunctionRestorePolicy,
|
|
43
|
-
InfoSection,
|
|
44
|
-
InsertPosition,
|
|
45
|
-
OnlyIfEqual,
|
|
46
|
-
UpdateOptions,
|
|
47
|
-
)
|
|
48
|
-
from glide.async_commands.server_modules import ft, glide_json, json_batch
|
|
49
|
-
from glide.async_commands.server_modules.ft_options.ft_aggregate_options import (
|
|
50
54
|
FtAggregateApply,
|
|
51
55
|
FtAggregateClause,
|
|
52
56
|
FtAggregateFilter,
|
|
@@ -54,59 +58,64 @@ from glide.async_commands.server_modules.ft_options.ft_aggregate_options import
|
|
|
54
58
|
FtAggregateLimit,
|
|
55
59
|
FtAggregateOptions,
|
|
56
60
|
FtAggregateReducer,
|
|
61
|
+
FtAggregateResponse,
|
|
57
62
|
FtAggregateSortBy,
|
|
58
63
|
FtAggregateSortProperty,
|
|
59
|
-
)
|
|
60
|
-
from glide.async_commands.server_modules.ft_options.ft_create_options import (
|
|
61
|
-
DataType,
|
|
62
|
-
DistanceMetricType,
|
|
63
|
-
Field,
|
|
64
|
-
FieldType,
|
|
65
64
|
FtCreateOptions,
|
|
66
|
-
|
|
67
|
-
TagField,
|
|
68
|
-
TextField,
|
|
69
|
-
VectorAlgorithm,
|
|
70
|
-
VectorField,
|
|
71
|
-
VectorFieldAttributes,
|
|
72
|
-
VectorFieldAttributesFlat,
|
|
73
|
-
VectorFieldAttributesHnsw,
|
|
74
|
-
VectorType,
|
|
75
|
-
)
|
|
76
|
-
from glide.async_commands.server_modules.ft_options.ft_profile_options import (
|
|
65
|
+
FtInfoResponse,
|
|
77
66
|
FtProfileOptions,
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
-
from glide.async_commands.server_modules.ft_options.ft_search_options import (
|
|
67
|
+
FtProfileResponse,
|
|
81
68
|
FtSearchLimit,
|
|
82
69
|
FtSearchOptions,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
from glide.async_commands.server_modules.glide_json import (
|
|
86
|
-
JsonArrIndexOptions,
|
|
87
|
-
JsonArrPopOptions,
|
|
88
|
-
JsonGetOptions,
|
|
89
|
-
)
|
|
90
|
-
from glide.async_commands.sorted_set import (
|
|
91
|
-
AggregationType,
|
|
70
|
+
FtSearchResponse,
|
|
71
|
+
FunctionRestorePolicy,
|
|
92
72
|
GeoSearchByBox,
|
|
93
73
|
GeoSearchByRadius,
|
|
94
74
|
GeoSearchCount,
|
|
95
75
|
GeospatialData,
|
|
96
76
|
GeoUnit,
|
|
77
|
+
GlideClientConfiguration,
|
|
78
|
+
GlideClusterClientConfiguration,
|
|
79
|
+
GlideError,
|
|
80
|
+
HashFieldConditionalChange,
|
|
81
|
+
IdBound,
|
|
97
82
|
InfBound,
|
|
83
|
+
InfoSection,
|
|
84
|
+
InsertPosition,
|
|
85
|
+
JsonArrIndexOptions,
|
|
86
|
+
JsonArrPopOptions,
|
|
87
|
+
JsonGetOptions,
|
|
98
88
|
LexBoundary,
|
|
89
|
+
Limit,
|
|
90
|
+
ListDirection,
|
|
91
|
+
MaxId,
|
|
92
|
+
MinId,
|
|
93
|
+
NodeAddress,
|
|
94
|
+
NumericField,
|
|
95
|
+
ObjectType,
|
|
96
|
+
OffsetOptions,
|
|
97
|
+
OnlyIfEqual,
|
|
98
|
+
OrderBy,
|
|
99
|
+
PeriodicChecksManualInterval,
|
|
100
|
+
PeriodicChecksStatus,
|
|
101
|
+
ProtocolVersion,
|
|
102
|
+
PubSubMsg,
|
|
103
|
+
QueryType,
|
|
104
|
+
RandomNode,
|
|
99
105
|
RangeByIndex,
|
|
100
106
|
RangeByLex,
|
|
101
107
|
RangeByScore,
|
|
108
|
+
ReadFrom,
|
|
109
|
+
RequestError,
|
|
110
|
+
ReturnField,
|
|
111
|
+
Route,
|
|
102
112
|
ScoreBoundary,
|
|
103
113
|
ScoreFilter,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
MinId,
|
|
114
|
+
ServerCredentials,
|
|
115
|
+
SignedEncoding,
|
|
116
|
+
SlotIdRoute,
|
|
117
|
+
SlotKeyRoute,
|
|
118
|
+
SlotType,
|
|
110
119
|
StreamAddOptions,
|
|
111
120
|
StreamClaimOptions,
|
|
112
121
|
StreamGroupOptions,
|
|
@@ -115,84 +124,50 @@ from glide.async_commands.stream import (
|
|
|
115
124
|
StreamReadGroupOptions,
|
|
116
125
|
StreamReadOptions,
|
|
117
126
|
StreamTrimOptions,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
)
|
|
121
|
-
from glide.config import (
|
|
122
|
-
AdvancedGlideClientConfiguration,
|
|
123
|
-
AdvancedGlideClusterClientConfiguration,
|
|
124
|
-
BackoffStrategy,
|
|
125
|
-
GlideClientConfiguration,
|
|
126
|
-
GlideClusterClientConfiguration,
|
|
127
|
-
NodeAddress,
|
|
128
|
-
PeriodicChecksManualInterval,
|
|
129
|
-
PeriodicChecksStatus,
|
|
130
|
-
ProtocolVersion,
|
|
131
|
-
ReadFrom,
|
|
132
|
-
ServerCredentials,
|
|
133
|
-
TlsAdvancedConfiguration,
|
|
134
|
-
)
|
|
135
|
-
from glide.constants import (
|
|
136
|
-
OK,
|
|
137
|
-
TOK,
|
|
138
|
-
FtAggregateResponse,
|
|
139
|
-
FtInfoResponse,
|
|
140
|
-
FtProfileResponse,
|
|
141
|
-
FtSearchResponse,
|
|
127
|
+
TagField,
|
|
128
|
+
TBatch,
|
|
142
129
|
TClusterResponse,
|
|
143
130
|
TEncodable,
|
|
131
|
+
TextField,
|
|
144
132
|
TFunctionListResponse,
|
|
145
133
|
TFunctionStatsFullResponse,
|
|
146
134
|
TFunctionStatsSingleNodeResponse,
|
|
135
|
+
TimeoutError,
|
|
147
136
|
TJsonResponse,
|
|
148
137
|
TJsonUniversalResponse,
|
|
138
|
+
TlsAdvancedConfiguration,
|
|
139
|
+
Transaction,
|
|
149
140
|
TResult,
|
|
141
|
+
TrimByMaxLen,
|
|
142
|
+
TrimByMinId,
|
|
150
143
|
TSingleNodeRoute,
|
|
151
144
|
TXInfoStreamFullResponse,
|
|
152
145
|
TXInfoStreamResponse,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
)
|
|
163
|
-
from glide.glide_client import GlideClient, GlideClusterClient, TGlideClient
|
|
164
|
-
from glide.logger import Level as LogLevel
|
|
165
|
-
from glide.logger import Logger
|
|
166
|
-
from glide.routes import (
|
|
167
|
-
AllNodes,
|
|
168
|
-
AllPrimaries,
|
|
169
|
-
ByAddressRoute,
|
|
170
|
-
RandomNode,
|
|
171
|
-
Route,
|
|
172
|
-
SlotIdRoute,
|
|
173
|
-
SlotKeyRoute,
|
|
174
|
-
SlotType,
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
from .glide import (
|
|
178
|
-
ClusterScanCursor,
|
|
179
|
-
OpenTelemetryConfig,
|
|
180
|
-
OpenTelemetryMetricsConfig,
|
|
181
|
-
OpenTelemetryTracesConfig,
|
|
182
|
-
Script,
|
|
146
|
+
UnsignedEncoding,
|
|
147
|
+
UpdateOptions,
|
|
148
|
+
VectorAlgorithm,
|
|
149
|
+
VectorField,
|
|
150
|
+
VectorFieldAttributes,
|
|
151
|
+
VectorFieldAttributesFlat,
|
|
152
|
+
VectorFieldAttributesHnsw,
|
|
153
|
+
VectorType,
|
|
154
|
+
json_batch,
|
|
183
155
|
)
|
|
184
156
|
|
|
185
|
-
|
|
157
|
+
from .async_commands import ft, glide_json
|
|
158
|
+
from .glide_client import GlideClient, GlideClusterClient, TGlideClient
|
|
159
|
+
from .logger import Level as LogLevel
|
|
160
|
+
from .logger import Logger
|
|
186
161
|
|
|
187
162
|
__all__ = [
|
|
188
163
|
# Client
|
|
164
|
+
"TGlideClient",
|
|
189
165
|
"GlideClient",
|
|
190
166
|
"GlideClusterClient",
|
|
191
167
|
"Batch",
|
|
192
168
|
"ClusterBatch",
|
|
193
169
|
"ClusterTransaction",
|
|
194
170
|
"Transaction",
|
|
195
|
-
"TGlideClient",
|
|
196
171
|
"TBatch",
|
|
197
172
|
# Batch Options
|
|
198
173
|
"BatchOptions",
|
|
@@ -208,11 +183,12 @@ __all__ = [
|
|
|
208
183
|
"ServerCredentials",
|
|
209
184
|
"NodeAddress",
|
|
210
185
|
"OpenTelemetryConfig",
|
|
211
|
-
"OpenTelemetryTracesConfig",
|
|
212
186
|
"OpenTelemetryMetricsConfig",
|
|
187
|
+
"OpenTelemetryTracesConfig",
|
|
213
188
|
"ProtocolVersion",
|
|
214
189
|
"PeriodicChecksManualInterval",
|
|
215
190
|
"PeriodicChecksStatus",
|
|
191
|
+
"TlsAdvancedConfiguration",
|
|
216
192
|
# Response
|
|
217
193
|
"OK",
|
|
218
194
|
"TClusterResponse",
|
|
@@ -224,7 +200,6 @@ __all__ = [
|
|
|
224
200
|
"TJsonUniversalResponse",
|
|
225
201
|
"TOK",
|
|
226
202
|
"TResult",
|
|
227
|
-
"TlsAdvancedConfiguration",
|
|
228
203
|
"TXInfoStreamFullResponse",
|
|
229
204
|
"TXInfoStreamResponse",
|
|
230
205
|
"FtAggregateResponse",
|
|
@@ -263,11 +238,11 @@ __all__ = [
|
|
|
263
238
|
"GeoSearchCount",
|
|
264
239
|
"GeoUnit",
|
|
265
240
|
"GeospatialData",
|
|
241
|
+
"HashFieldConditionalChange",
|
|
266
242
|
"AggregationType",
|
|
267
243
|
"InfBound",
|
|
268
244
|
"InfoSection",
|
|
269
245
|
"InsertPosition",
|
|
270
|
-
"ft",
|
|
271
246
|
"LexBoundary",
|
|
272
247
|
"Limit",
|
|
273
248
|
"ListDirection",
|
|
@@ -323,6 +298,7 @@ __all__ = [
|
|
|
323
298
|
"RequestError",
|
|
324
299
|
"TimeoutError",
|
|
325
300
|
# Ft
|
|
301
|
+
"ft",
|
|
326
302
|
"DataType",
|
|
327
303
|
"DistanceMetricType",
|
|
328
304
|
"Field",
|
|
@@ -4,16 +4,16 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from typing import Dict, List, Mapping, Optional, Union, cast
|
|
6
6
|
|
|
7
|
-
from glide.
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
|
|
7
|
+
from glide.glide import ClusterScanCursor, Script
|
|
8
|
+
from glide_shared.commands.batch import ClusterBatch
|
|
9
|
+
from glide_shared.commands.batch_options import ClusterBatchOptions
|
|
10
|
+
from glide_shared.commands.command_args import ObjectType
|
|
11
|
+
from glide_shared.commands.core_options import (
|
|
12
12
|
FlushMode,
|
|
13
13
|
FunctionRestorePolicy,
|
|
14
14
|
InfoSection,
|
|
15
15
|
)
|
|
16
|
-
from
|
|
16
|
+
from glide_shared.constants import (
|
|
17
17
|
TOK,
|
|
18
18
|
TClusterResponse,
|
|
19
19
|
TEncodable,
|
|
@@ -21,11 +21,11 @@ from glide.constants import (
|
|
|
21
21
|
TFunctionStatsSingleNodeResponse,
|
|
22
22
|
TResult,
|
|
23
23
|
)
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
24
|
+
from glide_shared.exceptions import RequestError
|
|
25
|
+
from glide_shared.protobuf.command_request_pb2 import RequestType
|
|
26
|
+
from glide_shared.routes import Route
|
|
27
27
|
|
|
28
|
-
from
|
|
28
|
+
from .core import CoreCommands
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ClusterCommands(CoreCommands):
|
|
@@ -1421,7 +1421,7 @@ class ClusterCommands(CoreCommands):
|
|
|
1421
1421
|
|
|
1422
1422
|
Examples:
|
|
1423
1423
|
>>> lua_script = Script("return { KEYS[1], ARGV[1] }")
|
|
1424
|
-
>>> await client.invoke_script(lua_script, keys=["foo"], args=["bar"]
|
|
1424
|
+
>>> await client.invoke_script(lua_script, keys=["foo"], args=["bar"])
|
|
1425
1425
|
[b"foo", b"bar"]
|
|
1426
1426
|
"""
|
|
1427
1427
|
return await self._execute_script(script.get_hash(), keys, args)
|