valkey-glide 1.3.4rc5__cp39-cp39-macosx_11_0_arm64.whl → 2.0.0rc2__cp39-cp39-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.
Potentially problematic release.
This version of valkey-glide might be problematic. Click here for more details.
- glide/__init__.py +11 -7
- glide/async_commands/{transaction.py → batch.py} +1380 -970
- glide/async_commands/bitmap.py +94 -85
- glide/async_commands/cluster_commands.py +301 -122
- glide/async_commands/command_args.py +7 -6
- glide/async_commands/core.py +1281 -696
- glide/async_commands/server_modules/ft.py +83 -14
- glide/async_commands/server_modules/ft_options/ft_aggregate_options.py +15 -8
- glide/async_commands/server_modules/ft_options/ft_create_options.py +23 -11
- glide/async_commands/server_modules/ft_options/ft_profile_options.py +12 -7
- glide/async_commands/server_modules/ft_options/ft_search_options.py +12 -6
- glide/async_commands/server_modules/glide_json.py +134 -43
- glide/async_commands/server_modules/json_batch.py +157 -127
- glide/async_commands/sorted_set.py +39 -29
- glide/async_commands/standalone_commands.py +193 -96
- glide/async_commands/stream.py +94 -87
- glide/config.py +165 -105
- glide/constants.py +8 -4
- glide/glide.cpython-39-darwin.so +0 -0
- glide/glide_client.py +83 -10
- glide/logger.py +1 -1
- glide/protobuf/command_request_pb2.py +15 -15
- glide/protobuf/command_request_pb2.pyi +69 -46
- glide/protobuf/connection_request_pb2.py +15 -13
- glide/protobuf/connection_request_pb2.pyi +57 -29
- glide/protobuf/response_pb2.pyi +8 -9
- glide/protobuf_codec.py +7 -6
- glide/routes.py +16 -8
- {valkey_glide-1.3.4rc5.dist-info → valkey_glide-2.0.0rc2.dist-info}/METADATA +9 -5
- valkey_glide-2.0.0rc2.dist-info/RECORD +37 -0
- valkey_glide-1.3.4rc5.dist-info/RECORD +0 -37
- {valkey_glide-1.3.4rc5.dist-info → valkey_glide-2.0.0rc2.dist-info}/WHEEL +0 -0
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
|
-
|
|
6
5
|
import builtins
|
|
7
6
|
import collections.abc
|
|
8
7
|
import google.protobuf.descriptor
|
|
@@ -89,7 +88,7 @@ Pattern: PubSubChannelType.ValueType # 1
|
|
|
89
88
|
Sharded: PubSubChannelType.ValueType # 2
|
|
90
89
|
global___PubSubChannelType = PubSubChannelType
|
|
91
90
|
|
|
92
|
-
@
|
|
91
|
+
@typing_extensions.final
|
|
93
92
|
class NodeAddress(google.protobuf.message.Message):
|
|
94
93
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
95
94
|
|
|
@@ -103,11 +102,11 @@ class NodeAddress(google.protobuf.message.Message):
|
|
|
103
102
|
host: builtins.str = ...,
|
|
104
103
|
port: builtins.int = ...,
|
|
105
104
|
) -> None: ...
|
|
106
|
-
def ClearField(self, field_name:
|
|
105
|
+
def ClearField(self, field_name: typing_extensions.Literal["host", b"host", "port", b"port"]) -> None: ...
|
|
107
106
|
|
|
108
107
|
global___NodeAddress = NodeAddress
|
|
109
108
|
|
|
110
|
-
@
|
|
109
|
+
@typing_extensions.final
|
|
111
110
|
class AuthenticationInfo(google.protobuf.message.Message):
|
|
112
111
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
113
112
|
|
|
@@ -121,11 +120,11 @@ class AuthenticationInfo(google.protobuf.message.Message):
|
|
|
121
120
|
password: builtins.str = ...,
|
|
122
121
|
username: builtins.str = ...,
|
|
123
122
|
) -> None: ...
|
|
124
|
-
def ClearField(self, field_name:
|
|
123
|
+
def ClearField(self, field_name: typing_extensions.Literal["password", b"password", "username", b"username"]) -> None: ...
|
|
125
124
|
|
|
126
125
|
global___AuthenticationInfo = AuthenticationInfo
|
|
127
126
|
|
|
128
|
-
@
|
|
127
|
+
@typing_extensions.final
|
|
129
128
|
class PeriodicChecksManualInterval(google.protobuf.message.Message):
|
|
130
129
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
131
130
|
|
|
@@ -136,11 +135,11 @@ class PeriodicChecksManualInterval(google.protobuf.message.Message):
|
|
|
136
135
|
*,
|
|
137
136
|
duration_in_sec: builtins.int = ...,
|
|
138
137
|
) -> None: ...
|
|
139
|
-
def ClearField(self, field_name:
|
|
138
|
+
def ClearField(self, field_name: typing_extensions.Literal["duration_in_sec", b"duration_in_sec"]) -> None: ...
|
|
140
139
|
|
|
141
140
|
global___PeriodicChecksManualInterval = PeriodicChecksManualInterval
|
|
142
141
|
|
|
143
|
-
@
|
|
142
|
+
@typing_extensions.final
|
|
144
143
|
class PeriodicChecksDisabled(google.protobuf.message.Message):
|
|
145
144
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
146
145
|
|
|
@@ -150,7 +149,7 @@ class PeriodicChecksDisabled(google.protobuf.message.Message):
|
|
|
150
149
|
|
|
151
150
|
global___PeriodicChecksDisabled = PeriodicChecksDisabled
|
|
152
151
|
|
|
153
|
-
@
|
|
152
|
+
@typing_extensions.final
|
|
154
153
|
class PubSubChannelsOrPatterns(google.protobuf.message.Message):
|
|
155
154
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
156
155
|
|
|
@@ -162,15 +161,15 @@ class PubSubChannelsOrPatterns(google.protobuf.message.Message):
|
|
|
162
161
|
*,
|
|
163
162
|
channels_or_patterns: collections.abc.Iterable[builtins.bytes] | None = ...,
|
|
164
163
|
) -> None: ...
|
|
165
|
-
def ClearField(self, field_name:
|
|
164
|
+
def ClearField(self, field_name: typing_extensions.Literal["channels_or_patterns", b"channels_or_patterns"]) -> None: ...
|
|
166
165
|
|
|
167
166
|
global___PubSubChannelsOrPatterns = PubSubChannelsOrPatterns
|
|
168
167
|
|
|
169
|
-
@
|
|
168
|
+
@typing_extensions.final
|
|
170
169
|
class PubSubSubscriptions(google.protobuf.message.Message):
|
|
171
170
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
172
171
|
|
|
173
|
-
@
|
|
172
|
+
@typing_extensions.final
|
|
174
173
|
class ChannelsOrPatternsByTypeEntry(google.protobuf.message.Message):
|
|
175
174
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
176
175
|
|
|
@@ -185,8 +184,8 @@ class PubSubSubscriptions(google.protobuf.message.Message):
|
|
|
185
184
|
key: builtins.int = ...,
|
|
186
185
|
value: global___PubSubChannelsOrPatterns | None = ...,
|
|
187
186
|
) -> None: ...
|
|
188
|
-
def HasField(self, field_name:
|
|
189
|
-
def ClearField(self, field_name:
|
|
187
|
+
def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ...
|
|
188
|
+
def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...
|
|
190
189
|
|
|
191
190
|
CHANNELS_OR_PATTERNS_BY_TYPE_FIELD_NUMBER: builtins.int
|
|
192
191
|
@property
|
|
@@ -196,11 +195,31 @@ class PubSubSubscriptions(google.protobuf.message.Message):
|
|
|
196
195
|
*,
|
|
197
196
|
channels_or_patterns_by_type: collections.abc.Mapping[builtins.int, global___PubSubChannelsOrPatterns] | None = ...,
|
|
198
197
|
) -> None: ...
|
|
199
|
-
def ClearField(self, field_name:
|
|
198
|
+
def ClearField(self, field_name: typing_extensions.Literal["channels_or_patterns_by_type", b"channels_or_patterns_by_type"]) -> None: ...
|
|
200
199
|
|
|
201
200
|
global___PubSubSubscriptions = PubSubSubscriptions
|
|
202
201
|
|
|
203
|
-
@
|
|
202
|
+
@typing_extensions.final
|
|
203
|
+
class OpenTelemetryConfig(google.protobuf.message.Message):
|
|
204
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
205
|
+
|
|
206
|
+
COLLECTOR_END_POINT_FIELD_NUMBER: builtins.int
|
|
207
|
+
SPAN_FLUSH_INTERVAL_FIELD_NUMBER: builtins.int
|
|
208
|
+
collector_end_point: builtins.str
|
|
209
|
+
span_flush_interval: builtins.int
|
|
210
|
+
def __init__(
|
|
211
|
+
self,
|
|
212
|
+
*,
|
|
213
|
+
collector_end_point: builtins.str = ...,
|
|
214
|
+
span_flush_interval: builtins.int | None = ...,
|
|
215
|
+
) -> None: ...
|
|
216
|
+
def HasField(self, field_name: typing_extensions.Literal["_span_flush_interval", b"_span_flush_interval", "span_flush_interval", b"span_flush_interval"]) -> builtins.bool: ...
|
|
217
|
+
def ClearField(self, field_name: typing_extensions.Literal["_span_flush_interval", b"_span_flush_interval", "collector_end_point", b"collector_end_point", "span_flush_interval", b"span_flush_interval"]) -> None: ...
|
|
218
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_span_flush_interval", b"_span_flush_interval"]) -> typing_extensions.Literal["span_flush_interval"] | None: ...
|
|
219
|
+
|
|
220
|
+
global___OpenTelemetryConfig = OpenTelemetryConfig
|
|
221
|
+
|
|
222
|
+
@typing_extensions.final
|
|
204
223
|
class ConnectionRequest(google.protobuf.message.Message):
|
|
205
224
|
"""IMPORTANT - if you add fields here, you probably need to add them also in client/mod.rs:`sanitized_request_string`."""
|
|
206
225
|
|
|
@@ -222,28 +241,31 @@ class ConnectionRequest(google.protobuf.message.Message):
|
|
|
222
241
|
INFLIGHT_REQUESTS_LIMIT_FIELD_NUMBER: builtins.int
|
|
223
242
|
CLIENT_AZ_FIELD_NUMBER: builtins.int
|
|
224
243
|
CONNECTION_TIMEOUT_FIELD_NUMBER: builtins.int
|
|
244
|
+
OPENTELEMETRY_CONFIG_FIELD_NUMBER: builtins.int
|
|
245
|
+
@property
|
|
246
|
+
def addresses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NodeAddress]: ...
|
|
225
247
|
tls_mode: global___TlsMode.ValueType
|
|
226
248
|
cluster_mode_enabled: builtins.bool
|
|
227
249
|
request_timeout: builtins.int
|
|
228
250
|
read_from: global___ReadFrom.ValueType
|
|
229
|
-
database_id: builtins.int
|
|
230
|
-
protocol: global___ProtocolVersion.ValueType
|
|
231
|
-
client_name: builtins.str
|
|
232
|
-
inflight_requests_limit: builtins.int
|
|
233
|
-
client_az: builtins.str
|
|
234
|
-
connection_timeout: builtins.int
|
|
235
|
-
@property
|
|
236
|
-
def addresses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NodeAddress]: ...
|
|
237
251
|
@property
|
|
238
252
|
def connection_retry_strategy(self) -> global___ConnectionRetryStrategy: ...
|
|
239
253
|
@property
|
|
240
254
|
def authentication_info(self) -> global___AuthenticationInfo: ...
|
|
255
|
+
database_id: builtins.int
|
|
256
|
+
protocol: global___ProtocolVersion.ValueType
|
|
257
|
+
client_name: builtins.str
|
|
241
258
|
@property
|
|
242
259
|
def periodic_checks_manual_interval(self) -> global___PeriodicChecksManualInterval: ...
|
|
243
260
|
@property
|
|
244
261
|
def periodic_checks_disabled(self) -> global___PeriodicChecksDisabled: ...
|
|
245
262
|
@property
|
|
246
263
|
def pubsub_subscriptions(self) -> global___PubSubSubscriptions: ...
|
|
264
|
+
inflight_requests_limit: builtins.int
|
|
265
|
+
client_az: builtins.str
|
|
266
|
+
connection_timeout: builtins.int
|
|
267
|
+
@property
|
|
268
|
+
def opentelemetry_config(self) -> global___OpenTelemetryConfig: ...
|
|
247
269
|
def __init__(
|
|
248
270
|
self,
|
|
249
271
|
*,
|
|
@@ -263,30 +285,36 @@ class ConnectionRequest(google.protobuf.message.Message):
|
|
|
263
285
|
inflight_requests_limit: builtins.int = ...,
|
|
264
286
|
client_az: builtins.str = ...,
|
|
265
287
|
connection_timeout: builtins.int = ...,
|
|
288
|
+
opentelemetry_config: global___OpenTelemetryConfig | None = ...,
|
|
266
289
|
) -> None: ...
|
|
267
|
-
def HasField(self, field_name:
|
|
268
|
-
def ClearField(self, field_name:
|
|
269
|
-
def WhichOneof(self, oneof_group:
|
|
290
|
+
def HasField(self, field_name: typing_extensions.Literal["authentication_info", b"authentication_info", "connection_retry_strategy", b"connection_retry_strategy", "opentelemetry_config", b"opentelemetry_config", "periodic_checks", b"periodic_checks", "periodic_checks_disabled", b"periodic_checks_disabled", "periodic_checks_manual_interval", b"periodic_checks_manual_interval", "pubsub_subscriptions", b"pubsub_subscriptions"]) -> builtins.bool: ...
|
|
291
|
+
def ClearField(self, field_name: typing_extensions.Literal["addresses", b"addresses", "authentication_info", b"authentication_info", "client_az", b"client_az", "client_name", b"client_name", "cluster_mode_enabled", b"cluster_mode_enabled", "connection_retry_strategy", b"connection_retry_strategy", "connection_timeout", b"connection_timeout", "database_id", b"database_id", "inflight_requests_limit", b"inflight_requests_limit", "opentelemetry_config", b"opentelemetry_config", "periodic_checks", b"periodic_checks", "periodic_checks_disabled", b"periodic_checks_disabled", "periodic_checks_manual_interval", b"periodic_checks_manual_interval", "protocol", b"protocol", "pubsub_subscriptions", b"pubsub_subscriptions", "read_from", b"read_from", "request_timeout", b"request_timeout", "tls_mode", b"tls_mode"]) -> None: ...
|
|
292
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["periodic_checks", b"periodic_checks"]) -> typing_extensions.Literal["periodic_checks_manual_interval", "periodic_checks_disabled"] | None: ...
|
|
270
293
|
|
|
271
294
|
global___ConnectionRequest = ConnectionRequest
|
|
272
295
|
|
|
273
|
-
@
|
|
296
|
+
@typing_extensions.final
|
|
274
297
|
class ConnectionRetryStrategy(google.protobuf.message.Message):
|
|
275
298
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
276
299
|
|
|
277
300
|
NUMBER_OF_RETRIES_FIELD_NUMBER: builtins.int
|
|
278
301
|
FACTOR_FIELD_NUMBER: builtins.int
|
|
279
302
|
EXPONENT_BASE_FIELD_NUMBER: builtins.int
|
|
303
|
+
JITTER_PERCENT_FIELD_NUMBER: builtins.int
|
|
280
304
|
number_of_retries: builtins.int
|
|
281
305
|
factor: builtins.int
|
|
282
306
|
exponent_base: builtins.int
|
|
307
|
+
jitter_percent: builtins.int
|
|
283
308
|
def __init__(
|
|
284
309
|
self,
|
|
285
310
|
*,
|
|
286
311
|
number_of_retries: builtins.int = ...,
|
|
287
312
|
factor: builtins.int = ...,
|
|
288
313
|
exponent_base: builtins.int = ...,
|
|
314
|
+
jitter_percent: builtins.int | None = ...,
|
|
289
315
|
) -> None: ...
|
|
290
|
-
def
|
|
316
|
+
def HasField(self, field_name: typing_extensions.Literal["_jitter_percent", b"_jitter_percent", "jitter_percent", b"jitter_percent"]) -> builtins.bool: ...
|
|
317
|
+
def ClearField(self, field_name: typing_extensions.Literal["_jitter_percent", b"_jitter_percent", "exponent_base", b"exponent_base", "factor", b"factor", "jitter_percent", b"jitter_percent", "number_of_retries", b"number_of_retries"]) -> None: ...
|
|
318
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["_jitter_percent", b"_jitter_percent"]) -> typing_extensions.Literal["jitter_percent"] | None: ...
|
|
291
319
|
|
|
292
320
|
global___ConnectionRetryStrategy = ConnectionRetryStrategy
|
glide/protobuf/response_pb2.pyi
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@generated by mypy-protobuf. Do not edit manually!
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
|
-
|
|
6
5
|
import builtins
|
|
7
6
|
import google.protobuf.descriptor
|
|
8
7
|
import google.protobuf.internal.enum_type_wrapper
|
|
@@ -49,7 +48,7 @@ class ConstantResponse(_ConstantResponse, metaclass=_ConstantResponseEnumTypeWra
|
|
|
49
48
|
OK: ConstantResponse.ValueType # 0
|
|
50
49
|
global___ConstantResponse = ConstantResponse
|
|
51
50
|
|
|
52
|
-
@
|
|
51
|
+
@typing_extensions.final
|
|
53
52
|
class RequestError(google.protobuf.message.Message):
|
|
54
53
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
55
54
|
|
|
@@ -63,11 +62,11 @@ class RequestError(google.protobuf.message.Message):
|
|
|
63
62
|
type: global___RequestErrorType.ValueType = ...,
|
|
64
63
|
message: builtins.str = ...,
|
|
65
64
|
) -> None: ...
|
|
66
|
-
def ClearField(self, field_name:
|
|
65
|
+
def ClearField(self, field_name: typing_extensions.Literal["message", b"message", "type", b"type"]) -> None: ...
|
|
67
66
|
|
|
68
67
|
global___RequestError = RequestError
|
|
69
68
|
|
|
70
|
-
@
|
|
69
|
+
@typing_extensions.final
|
|
71
70
|
class Response(google.protobuf.message.Message):
|
|
72
71
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
73
72
|
|
|
@@ -80,10 +79,10 @@ class Response(google.protobuf.message.Message):
|
|
|
80
79
|
callback_idx: builtins.int
|
|
81
80
|
resp_pointer: builtins.int
|
|
82
81
|
constant_response: global___ConstantResponse.ValueType
|
|
83
|
-
closing_error: builtins.str
|
|
84
|
-
is_push: builtins.bool
|
|
85
82
|
@property
|
|
86
83
|
def request_error(self) -> global___RequestError: ...
|
|
84
|
+
closing_error: builtins.str
|
|
85
|
+
is_push: builtins.bool
|
|
87
86
|
def __init__(
|
|
88
87
|
self,
|
|
89
88
|
*,
|
|
@@ -94,8 +93,8 @@ class Response(google.protobuf.message.Message):
|
|
|
94
93
|
closing_error: builtins.str = ...,
|
|
95
94
|
is_push: builtins.bool = ...,
|
|
96
95
|
) -> None: ...
|
|
97
|
-
def HasField(self, field_name:
|
|
98
|
-
def ClearField(self, field_name:
|
|
99
|
-
def WhichOneof(self, oneof_group:
|
|
96
|
+
def HasField(self, field_name: typing_extensions.Literal["closing_error", b"closing_error", "constant_response", b"constant_response", "request_error", b"request_error", "resp_pointer", b"resp_pointer", "value", b"value"]) -> builtins.bool: ...
|
|
97
|
+
def ClearField(self, field_name: typing_extensions.Literal["callback_idx", b"callback_idx", "closing_error", b"closing_error", "constant_response", b"constant_response", "is_push", b"is_push", "request_error", b"request_error", "resp_pointer", b"resp_pointer", "value", b"value"]) -> None: ...
|
|
98
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["value", b"value"]) -> typing_extensions.Literal["resp_pointer", "constant_response", "request_error", "closing_error"] | None: ...
|
|
100
99
|
|
|
101
100
|
global___Response = Response
|
glide/protobuf_codec.py
CHANGED
|
@@ -5,13 +5,13 @@ from typing import List, Tuple, Type
|
|
|
5
5
|
|
|
6
6
|
from google.protobuf import message
|
|
7
7
|
|
|
8
|
-
"""
|
|
9
|
-
Codec for protobuf messages.
|
|
10
|
-
All of the Varint functions were copied from https://github.com/protocolbuffers/protobuf
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
8
|
|
|
14
9
|
class ProtobufCodec:
|
|
10
|
+
"""
|
|
11
|
+
Codec for protobuf messages.
|
|
12
|
+
All of the Varint functions were copied from [protobuf](https://github.com/protocolbuffers/protobuf)
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
15
|
@classmethod
|
|
16
16
|
def _decode_varint_32(cls, buffer, pos):
|
|
17
17
|
decoder_func = cls._varint_decoder((1 << 32) - 1, int)
|
|
@@ -91,7 +91,8 @@ class ProtobufCodec:
|
|
|
91
91
|
# Recieved only partial response
|
|
92
92
|
raise PartialMessageException("Recieved only a partial response")
|
|
93
93
|
offset = new_pos
|
|
94
|
-
|
|
94
|
+
end = offset + msg_len
|
|
95
|
+
msg_buf = read_bytes_view[offset:end]
|
|
95
96
|
offset += msg_len
|
|
96
97
|
message = message_class()
|
|
97
98
|
message.ParseFromString(msg_buf)
|
glide/routes.py
CHANGED
|
@@ -10,9 +10,12 @@ from glide.protobuf.command_request_pb2 import SlotTypes as ProtoSlotTypes
|
|
|
10
10
|
|
|
11
11
|
class SlotType(Enum):
|
|
12
12
|
PRIMARY = 1
|
|
13
|
-
|
|
14
|
-
# will be routed to a replica, even if the strategy is `ALWAYS_FROM_MASTER`.
|
|
13
|
+
|
|
15
14
|
REPLICA = 2
|
|
15
|
+
"""
|
|
16
|
+
`REPLICA` overrides the `read_from_replica` configuration. If it's used the request
|
|
17
|
+
will be routed to a replica, even if the strategy is `ALWAYS_FROM_MASTER`.
|
|
18
|
+
"""
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
class Route:
|
|
@@ -26,6 +29,7 @@ class Route:
|
|
|
26
29
|
class AllNodes(Route):
|
|
27
30
|
"""
|
|
28
31
|
Route request to all nodes.
|
|
32
|
+
|
|
29
33
|
Warning:
|
|
30
34
|
Don't use it with write commands, they could be routed to a replica (RO) node and fail.
|
|
31
35
|
"""
|
|
@@ -40,6 +44,7 @@ class AllPrimaries(Route):
|
|
|
40
44
|
class RandomNode(Route):
|
|
41
45
|
"""
|
|
42
46
|
Route request to a random node.
|
|
47
|
+
|
|
43
48
|
Warning:
|
|
44
49
|
Don't use it with write commands, because they could be randomly routed to a replica (RO) node and fail.
|
|
45
50
|
"""
|
|
@@ -62,13 +67,16 @@ class SlotIdRoute(Route):
|
|
|
62
67
|
|
|
63
68
|
|
|
64
69
|
class ByAddressRoute(Route):
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
"""Routes a request to a node by its address
|
|
71
|
+
|
|
72
|
+
Attributes:
|
|
73
|
+
host (str): The endpoint of the node. If `port` is not provided, should be in the f"{address}:{port}" format,
|
|
74
|
+
where `address` is the preferred endpoint as shown in the output of the `CLUSTER SLOTS` command.
|
|
75
|
+
port (Optional[int]): The port to access on the node. If port is not provided, `host` is assumed to be in
|
|
76
|
+
the format f"{address}:{port}".
|
|
77
|
+
"""
|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
host (str): The endpoint of the node. If `port` is not provided, should be in the f"{address}:{port}" format, where `address` is the preferred endpoint as shown in the output of the `CLUSTER SLOTS` command.
|
|
70
|
-
port (Optional[int]): The port to access on the node. If port is not provided, `host` is assumed to be in the format f"{address}:{port}".
|
|
71
|
-
"""
|
|
79
|
+
def __init__(self, host: str, port: Optional[int] = None) -> None:
|
|
72
80
|
super().__init__()
|
|
73
81
|
if port is None:
|
|
74
82
|
split = host.split(":")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: valkey-glide
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0rc2
|
|
4
4
|
Classifier: Topic :: Database
|
|
5
5
|
Classifier: Topic :: Utilities
|
|
6
6
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -22,6 +22,11 @@ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
|
22
22
|
|
|
23
23
|
Valkey General Language Independent Driver for the Enterprise (GLIDE), is an open-source Valkey client library. Valkey GLIDE is one of the official client libraries for Valkey, and it supports all Valkey commands. Valkey GLIDE supports Valkey 7.2 and above, and Redis open-source 6.2, 7.0 and 7.2. Application programmers use Valkey GLIDE to safely and reliably connect their applications to Valkey- and Redis OSS- compatible services. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. It is sponsored and supported by AWS, and is pre-configured with best practices learned from over a decade of operating Redis OSS-compatible services used by hundreds of thousands of customers. To help ensure consistency in application development and operations, Valkey GLIDE is implemented using a core driver framework, written in Rust, with language specific extensions. This design ensures consistency in features across languages and reduces overall complexity.
|
|
24
24
|
|
|
25
|
+
## Documentation
|
|
26
|
+
|
|
27
|
+
See GLIDE's [documentation site](https://valkey.io/valkey-glide/).
|
|
28
|
+
Visit our [wiki](https://github.com/valkey-io/valkey-glide/wiki/Python-wrapper) for examples and further details on TLS, Read strategy, Timeouts and various other configurations.
|
|
29
|
+
|
|
25
30
|
## Supported Engine Versions
|
|
26
31
|
|
|
27
32
|
Refer to the [Supported Engine Versions table](https://github.com/valkey-io/valkey-glide/blob/main/README.md#supported-engine-versions) for details.
|
|
@@ -34,9 +39,11 @@ The release of Valkey GLIDE was tested on the following platforms:
|
|
|
34
39
|
|
|
35
40
|
Linux:
|
|
36
41
|
|
|
37
|
-
- Ubuntu 22.04.
|
|
42
|
+
- Ubuntu 22.04.5 (x86_64/amd64 and arm64/aarch64)
|
|
38
43
|
- Amazon Linux 2023 (AL2023) (x86_64)
|
|
39
44
|
|
|
45
|
+
**Note: Currently Alpine Linux / MUSL is NOT supported.**
|
|
46
|
+
|
|
40
47
|
macOS:
|
|
41
48
|
|
|
42
49
|
- macOS 14.7 (Apple silicon/aarch_64)
|
|
@@ -113,9 +120,6 @@ Get response is bar
|
|
|
113
120
|
|
|
114
121
|
For complete examples with error handling, please refer to the [cluster example](https://github.com/valkey-io/valkey-glide/blob/main/examples/python/cluster_example.py) and the [standalone example](https://github.com/valkey-io/valkey-glide/blob/main/examples/python/standalone_example.py).
|
|
115
122
|
|
|
116
|
-
## Documentation
|
|
117
|
-
|
|
118
|
-
Visit our [wiki](https://github.com/valkey-io/valkey-glide/wiki/Python-wrapper) for examples and further details on TLS, Read strategy, Timeouts and various other configurations.
|
|
119
123
|
|
|
120
124
|
### Building & Testing
|
|
121
125
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
valkey_glide-2.0.0rc2.dist-info/METADATA,sha256=BY6482FjuTi1kw9ad8cHc0F6qCagKQwohDLmP8tw54A,5091
|
|
2
|
+
valkey_glide-2.0.0rc2.dist-info/WHEEL,sha256=SjFvs0za84r93yXv_seM90QIJLVMin7Qs7nbzy5Blh4,104
|
|
3
|
+
glide/config.py,sha256=1IkmvCPLU9nm7EpwcvYT3URoLWApWGr6eSRmuyPXDyA,28891
|
|
4
|
+
glide/protobuf_codec.py,sha256=xwt4-D4WbvNIY_vjOd-00c73HOyNjWq7nN-Z718PBVA,3667
|
|
5
|
+
glide/constants.py,sha256=Kb-wTQrcshjCivNXcrrOzz7xp7pNL_-Gt6Updiq9k4o,4354
|
|
6
|
+
glide/async_commands/sorted_set.py,sha256=nALPJQNNjW7dAqXMDJIur_xDwnJzQCdqxtx5zXYCRNM,11458
|
|
7
|
+
glide/async_commands/batch.py,sha256=oInDvW-7XPQtm9kJYWMdILCEjzlKCv6H--SeG-fDjcg,229669
|
|
8
|
+
glide/async_commands/__init__.py,sha256=_tbTAFATlzp4L2qe-H77PpAQK-16VsV-y7uKNUKLC_o,136
|
|
9
|
+
glide/async_commands/core.py,sha256=ydb0dFsJN6KLttSdbjOLMcK5RahUBIsX7X5QxgyooIg,316222
|
|
10
|
+
glide/async_commands/server_modules/glide_json.py,sha256=cf93MG6GioA7hFLPn1vNMjipoUt6G-qJ2oK9E91KRkw,63120
|
|
11
|
+
glide/async_commands/server_modules/json_batch.py,sha256=XBySnoRJnm1ABPYBnajHmPK6C-Wr9uk3gjNg2s7wVm8,36631
|
|
12
|
+
glide/async_commands/server_modules/ft.py,sha256=xOV22Znj9z9clKK5XZUL8UhthSbiA1F2H11EOKtMJCg,16840
|
|
13
|
+
glide/async_commands/server_modules/ft_options/ft_search_options.py,sha256=q72JVuLMFIVWXDOe0IQWTYFZYNiPSE6Yo3fKIn27hTA,4855
|
|
14
|
+
glide/async_commands/server_modules/ft_options/ft_aggregate_options.py,sha256=hnutaOAZB5iFNJ_GKK2K48gm-iiuR-rhaCFUOD6VtBM,9919
|
|
15
|
+
glide/async_commands/server_modules/ft_options/ft_create_options.py,sha256=hz-H8so5VC4ZsNxJgj1EqyMlFCnSx4II_lTIino8bkA,13721
|
|
16
|
+
glide/async_commands/server_modules/ft_options/ft_profile_options.py,sha256=19t7pHHFu-Vbp_1e5XSNHHDjnssU4kI49wglE0YskDk,4273
|
|
17
|
+
glide/async_commands/server_modules/ft_options/ft_constants.py,sha256=r9uLAExg2qThjwOBC8LxqXBITF0fwa5xfnD7EXnyPrw,1704
|
|
18
|
+
glide/async_commands/stream.py,sha256=y3tmuOc-Ndnjvc__xybBcf2wqoNUQ1H1hPXYerpwNA8,15582
|
|
19
|
+
glide/async_commands/standalone_commands.py,sha256=_7WN5eBc_-oQ1j3BHW4X4JVqEMkL2Eihdl5_0MEPvUU,38991
|
|
20
|
+
glide/async_commands/cluster_commands.py,sha256=tD45_xUV0nyxuEDDhgTVenREx-O_l-yAY277UTv1xEI,61537
|
|
21
|
+
glide/async_commands/command_args.py,sha256=55vpSxeQr8wFU7olkFTEecl66wPk1g6vWxVYj16UvXs,2529
|
|
22
|
+
glide/async_commands/bitmap.py,sha256=ZHGLcKBP7RADtANqIR7PWdIW_gfDBFgpkIsQ-T4QFBQ,10125
|
|
23
|
+
glide/__init__.py,sha256=nCbDQf344sIuXbaCsivrjBjkQ3kaP_ArT3IQnzTUFx8,7372
|
|
24
|
+
glide/glide.pyi,sha256=K2CeC-F0E8vlr-rbko-E0PofzFoWl4da-xUQSuvuFDo,1105
|
|
25
|
+
glide/glide_client.py,sha256=0TfwGdSzYVikqyCL-289Lfc1y6Dl7yD1fRsj6K1bbEQ,28705
|
|
26
|
+
glide/logger.py,sha256=IhlrmIDF4IufCOszQu2WnMZeyBfH21kVr8KwDlBqDP0,3800
|
|
27
|
+
glide/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
+
glide/exceptions.py,sha256=ZI_LwIduoR-1jHm9-6jWZkx90AqCJLRtjbv4iESIEEA,1194
|
|
29
|
+
glide/protobuf/response_pb2.pyi,sha256=f7E-n7cba9UsVVVFn5YuetEvS1_aME70aeNt5n4Kwm8,4152
|
|
30
|
+
glide/protobuf/connection_request_pb2.pyi,sha256=UlNOIN_nQLad8LIXOCBJnuET72TtI9iB-LIorgAxV-E,14575
|
|
31
|
+
glide/protobuf/command_request_pb2.py,sha256=Kl07aQBGu8i3oFqbT-uZByWVaTCjYuDeYb0OOQ4ejaE,18871
|
|
32
|
+
glide/protobuf/connection_request_pb2.py,sha256=rqnCM3pR4X74eEJzBFhsQ27SKxdtYI5vS-mbWFaQ7js,5706
|
|
33
|
+
glide/protobuf/command_request_pb2.pyi,sha256=DYnPAmwzyygCdCpW1R1CDGZB_O6zQRJp51K8Wr4CpFc,52470
|
|
34
|
+
glide/protobuf/response_pb2.py,sha256=r3_OFhf8HZvEmBSigSyBzG7S7kWl7CCgVMog4HgMFXM,2025
|
|
35
|
+
glide/routes.py,sha256=Y958gbY-o53cG4-SqaN-enrZXByZyp8BYVkOk5YeB8U,3725
|
|
36
|
+
glide/glide.cpython-39-darwin.so,sha256=RvqLGa8JkRo3JLXiFKFr8k9JXEDCvhR8HCTaT0Ppx1s,6592256
|
|
37
|
+
valkey_glide-2.0.0rc2.dist-info/RECORD,,
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
valkey_glide-1.3.4rc5.dist-info/METADATA,sha256=5eU4wa9C4n2peB9W_Ef_gs9T3p9Ww5GF8xJ4biT_x4I,4950
|
|
2
|
-
valkey_glide-1.3.4rc5.dist-info/WHEEL,sha256=SjFvs0za84r93yXv_seM90QIJLVMin7Qs7nbzy5Blh4,104
|
|
3
|
-
glide/config.py,sha256=5kpn5OKkuzNHaRe7kpmLxlJNZ3D8V_H2t3k4DnVqAEQ,27648
|
|
4
|
-
glide/protobuf_codec.py,sha256=3tQnc3L-y1VoNLggN6FyYFR4POkgZLfu-xYAKE2dN8M,3623
|
|
5
|
-
glide/constants.py,sha256=B_mMzUS48ulnpQhv4h_NecRNTTENl6CuEl6OuJURYEI,4346
|
|
6
|
-
glide/async_commands/sorted_set.py,sha256=swS10R7AwEY8cNI3XlxUkfvlV_R9kx9fvN2encofmUg,11384
|
|
7
|
-
glide/async_commands/transaction.py,sha256=f3U5e3qtppXvsXLdIlwYCZFckyxtsVowQlCZjjBWHxE,222911
|
|
8
|
-
glide/async_commands/__init__.py,sha256=_tbTAFATlzp4L2qe-H77PpAQK-16VsV-y7uKNUKLC_o,136
|
|
9
|
-
glide/async_commands/core.py,sha256=9M09GMvxCIcyN9c93_qUwG_gFi6O-bn5J9Cro-74Fec,308681
|
|
10
|
-
glide/async_commands/server_modules/glide_json.py,sha256=JAoPqjtJH0XDWCKVigHwwghMJGYTTSYKTLT80W89WWw,61278
|
|
11
|
-
glide/async_commands/server_modules/json_batch.py,sha256=wBGOplaOp9ALJsAUJkTlrTmvO2ZWu044_4LKJqQd7Cg,36786
|
|
12
|
-
glide/async_commands/server_modules/ft.py,sha256=ysNIKNSU69j2pbl-_lWWxznklId2_4G88_bX4UyeUiQ,15507
|
|
13
|
-
glide/async_commands/server_modules/ft_options/ft_search_options.py,sha256=PN1m9gJ1V6CZrFLb3Espoa7THr6puk1J8H-lH_yEUeI,4759
|
|
14
|
-
glide/async_commands/server_modules/ft_options/ft_aggregate_options.py,sha256=No9LxyQ25-x7943guocs0vrwnzx-ruq8Oi7GWAlezww,9849
|
|
15
|
-
glide/async_commands/server_modules/ft_options/ft_create_options.py,sha256=9VCsI47tyyG5ai4Gy1mOl3HCha8AMK7mI1GMGCfJkeM,13529
|
|
16
|
-
glide/async_commands/server_modules/ft_options/ft_profile_options.py,sha256=s4XSiKpjFjBbtC5oCf6ddNYImf6ag7KvFcgOk2dNbYs,4185
|
|
17
|
-
glide/async_commands/server_modules/ft_options/ft_constants.py,sha256=r9uLAExg2qThjwOBC8LxqXBITF0fwa5xfnD7EXnyPrw,1704
|
|
18
|
-
glide/async_commands/stream.py,sha256=U7n2HPmHpcK1mmbI68szphZqjAoGPJTLOZscgw0WEK0,15791
|
|
19
|
-
glide/async_commands/standalone_commands.py,sha256=RrumL-O2rt6yPYS9QtftY1rebAcqxoshLsQvf_8GCMo,34742
|
|
20
|
-
glide/async_commands/cluster_commands.py,sha256=JjYuJbIkipQGllzwSJGvWzM88frFQenk1LTFY2qJueI,54315
|
|
21
|
-
glide/async_commands/command_args.py,sha256=Lz-Rl9pXtEcQ4hhcRns23x0dVPQ0shpqQw1a0vxFGAI,2561
|
|
22
|
-
glide/async_commands/bitmap.py,sha256=eYKfA1Xuikr7nXxCVGRsZ9RFKJOU_QN4nLXXTRtBSgU,10325
|
|
23
|
-
glide/__init__.py,sha256=2YpdncnGRo9mHjXVPBvLn2MuvllaMp7-HemVgQYmbA0,7328
|
|
24
|
-
glide/glide.pyi,sha256=K2CeC-F0E8vlr-rbko-E0PofzFoWl4da-xUQSuvuFDo,1105
|
|
25
|
-
glide/glide_client.py,sha256=tWaixDuhTAXZHfSp4g08RF6Yd5YZb1gpGMvflw_U82c,24366
|
|
26
|
-
glide/logger.py,sha256=zP_ENonH15lEvXlAYo1yg0QoJmHyZgEkI8H2-kO_QuY,3804
|
|
27
|
-
glide/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
glide/exceptions.py,sha256=ZI_LwIduoR-1jHm9-6jWZkx90AqCJLRtjbv4iESIEEA,1194
|
|
29
|
-
glide/protobuf/response_pb2.pyi,sha256=1US9ekAXkanJnzwArqHzj4NezV8TJl36QADmiAFqlKg,4076
|
|
30
|
-
glide/protobuf/connection_request_pb2.pyi,sha256=uwyWm81mAjtKnGGJFUoJVGr9_ou0xAxYd_ERgM7OXTw,12391
|
|
31
|
-
glide/protobuf/command_request_pb2.py,sha256=7BYmHeBKF76Yk911Nmeq5jwEGzjiOaHFnka08L6DOkI,18481
|
|
32
|
-
glide/protobuf/connection_request_pb2.py,sha256=LcB4WVCmhQEJ7n7Rx6VZyr6dIAh3zdF0PuYga6EeQBA,5221
|
|
33
|
-
glide/protobuf/command_request_pb2.pyi,sha256=QnRKhSy1jPbPBtHJsdbQyFWYGQkNZ8CVyG1IsZBYPBk,49860
|
|
34
|
-
glide/protobuf/response_pb2.py,sha256=r3_OFhf8HZvEmBSigSyBzG7S7kWl7CCgVMog4HgMFXM,2025
|
|
35
|
-
glide/routes.py,sha256=riaUkzI36tq4Lhsn11H7uSBdx7HfSvdT9YXxNabMNKk,3699
|
|
36
|
-
glide/glide.cpython-39-darwin.so,sha256=WsXVQnbxFdTbr86WGPdQXEEwOgOGJTgW4DZNul9HY34,4104256
|
|
37
|
-
valkey_glide-1.3.4rc5.dist-info/RECORD,,
|
|
File without changes
|