valkey-glide 1.3.4rc1__cp313-cp313-macosx_11_0_arm64.whl → 2.0.0rc6__cp313-cp313-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.

Files changed (32) hide show
  1. glide/__init__.py +11 -7
  2. glide/async_commands/{transaction.py → batch.py} +1413 -987
  3. glide/async_commands/bitmap.py +94 -85
  4. glide/async_commands/cluster_commands.py +308 -123
  5. glide/async_commands/command_args.py +7 -6
  6. glide/async_commands/core.py +1304 -714
  7. glide/async_commands/server_modules/ft.py +83 -14
  8. glide/async_commands/server_modules/ft_options/ft_aggregate_options.py +15 -8
  9. glide/async_commands/server_modules/ft_options/ft_create_options.py +23 -11
  10. glide/async_commands/server_modules/ft_options/ft_profile_options.py +12 -7
  11. glide/async_commands/server_modules/ft_options/ft_search_options.py +12 -6
  12. glide/async_commands/server_modules/glide_json.py +134 -43
  13. glide/async_commands/server_modules/json_batch.py +157 -127
  14. glide/async_commands/sorted_set.py +39 -29
  15. glide/async_commands/standalone_commands.py +199 -95
  16. glide/async_commands/stream.py +94 -87
  17. glide/config.py +165 -105
  18. glide/constants.py +8 -4
  19. glide/glide.cpython-313-darwin.so +0 -0
  20. glide/glide_client.py +273 -94
  21. glide/logger.py +1 -1
  22. glide/protobuf/command_request_pb2.py +15 -15
  23. glide/protobuf/command_request_pb2.pyi +69 -46
  24. glide/protobuf/connection_request_pb2.py +15 -13
  25. glide/protobuf/connection_request_pb2.pyi +57 -29
  26. glide/protobuf/response_pb2.pyi +8 -9
  27. glide/protobuf_codec.py +7 -6
  28. glide/routes.py +41 -8
  29. {valkey_glide-1.3.4rc1.dist-info → valkey_glide-2.0.0rc6.dist-info}/METADATA +29 -8
  30. valkey_glide-2.0.0rc6.dist-info/RECORD +37 -0
  31. valkey_glide-1.3.4rc1.dist-info/RECORD +0 -37
  32. {valkey_glide-1.3.4rc1.dist-info → valkey_glide-2.0.0rc6.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
- @typing.final
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: typing.Literal["host", b"host", "port", b"port"]) -> None: ...
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
- @typing.final
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: typing.Literal["password", b"password", "username", b"username"]) -> None: ...
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
- @typing.final
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: typing.Literal["duration_in_sec", b"duration_in_sec"]) -> None: ...
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
- @typing.final
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
- @typing.final
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: typing.Literal["channels_or_patterns", b"channels_or_patterns"]) -> None: ...
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
- @typing.final
168
+ @typing_extensions.final
170
169
  class PubSubSubscriptions(google.protobuf.message.Message):
171
170
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
172
171
 
173
- @typing.final
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: typing.Literal["value", b"value"]) -> builtins.bool: ...
189
- def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
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: typing.Literal["channels_or_patterns_by_type", b"channels_or_patterns_by_type"]) -> None: ...
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
- @typing.final
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: typing.Literal["authentication_info", b"authentication_info", "connection_retry_strategy", b"connection_retry_strategy", "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: ...
268
- def ClearField(self, field_name: typing.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", "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: ...
269
- def WhichOneof(self, oneof_group: typing.Literal["periodic_checks", b"periodic_checks"]) -> typing.Literal["periodic_checks_manual_interval", "periodic_checks_disabled"] | None: ...
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
- @typing.final
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 ClearField(self, field_name: typing.Literal["exponent_base", b"exponent_base", "factor", b"factor", "number_of_retries", b"number_of_retries"]) -> None: ...
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
@@ -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
- @typing.final
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: typing.Literal["message", b"message", "type", b"type"]) -> None: ...
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
- @typing.final
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: typing.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: ...
98
- def ClearField(self, field_name: typing.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: ...
99
- def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["resp_pointer", "constant_response", "request_error", "closing_error"] | None: ...
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
- msg_buf = read_bytes_view[offset : offset + msg_len]
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,17 @@ from glide.protobuf.command_request_pb2 import SlotTypes as ProtoSlotTypes
10
10
 
11
11
  class SlotType(Enum):
12
12
  PRIMARY = 1
13
- # `REPLICA` overrides the `read_from_replica` configuration. If it's used the request
14
- # will be routed to a replica, even if the strategy is `ALWAYS_FROM_MASTER`.
13
+ """
14
+ Address a primary node.
15
+ """
16
+
15
17
  REPLICA = 2
18
+ """
19
+ Address a replica node.
20
+
21
+ `REPLICA` overrides the `read_from_replica` configuration. If it's used the request
22
+ will be routed to a replica, even if the strategy is `ALWAYS_FROM_MASTER`.
23
+ """
16
24
 
17
25
 
18
26
  class Route:
@@ -26,6 +34,7 @@ class Route:
26
34
  class AllNodes(Route):
27
35
  """
28
36
  Route request to all nodes.
37
+
29
38
  Warning:
30
39
  Don't use it with write commands, they could be routed to a replica (RO) node and fail.
31
40
  """
@@ -34,12 +43,17 @@ class AllNodes(Route):
34
43
 
35
44
 
36
45
  class AllPrimaries(Route):
46
+ """
47
+ Route request to all primary nodes.
48
+ """
49
+
37
50
  pass
38
51
 
39
52
 
40
53
  class RandomNode(Route):
41
54
  """
42
55
  Route request to a random node.
56
+
43
57
  Warning:
44
58
  Don't use it with write commands, because they could be randomly routed to a replica (RO) node and fail.
45
59
  """
@@ -48,6 +62,13 @@ class RandomNode(Route):
48
62
 
49
63
 
50
64
  class SlotKeyRoute(Route):
65
+ """Routes a request to a node by its slot key
66
+
67
+ Attributes:
68
+ slot_type (SlotType): Defines type of the node being addressed.
69
+ slot_key (str): The request will be sent to nodes managing this key.
70
+ """
71
+
51
72
  def __init__(self, slot_type: SlotType, slot_key: str) -> None:
52
73
  super().__init__()
53
74
  self.slot_type = slot_type
@@ -55,6 +76,15 @@ class SlotKeyRoute(Route):
55
76
 
56
77
 
57
78
  class SlotIdRoute(Route):
79
+ """Routes a request to a node by its slot ID
80
+
81
+ Attributes:
82
+ slot_type (SlotType): Defines type of the node being addressed.
83
+ slot_id (int): Slot number. There are 16384 slots in a Valkey cluster, and each shard
84
+ manages a slot range. Unless the slot is known, it's better to route using
85
+ `SlotType.PRIMARY`
86
+ """
87
+
58
88
  def __init__(self, slot_type: SlotType, slot_id: int) -> None:
59
89
  super().__init__()
60
90
  self.slot_type = slot_type
@@ -62,13 +92,16 @@ class SlotIdRoute(Route):
62
92
 
63
93
 
64
94
  class ByAddressRoute(Route):
65
- def __init__(self, host: str, port: Optional[int] = None) -> None:
66
- """Routes a request to a node by its address
95
+ """Routes a request to a node by its address
67
96
 
68
- Args:
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
- """
97
+ Attributes:
98
+ host (str): The endpoint of the node. If `port` is not provided, should be in the f"{address}:{port}" format,
99
+ where `address` is the preferred endpoint as shown in the output of the `CLUSTER SLOTS` command.
100
+ port (Optional[int]): The port to access on the node. If port is not provided, `host` is assumed to be in
101
+ the format f"{address}:{port}".
102
+ """
103
+
104
+ def __init__(self, host: str, port: Optional[int] = None) -> None:
72
105
  super().__init__()
73
106
  if port is None:
74
107
  split = host.split(":")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: valkey-glide
3
- Version: 1.3.4rc1
3
+ Version: 2.0.0rc6
4
4
  Classifier: Topic :: Database
5
5
  Classifier: Topic :: Utilities
6
6
  Classifier: License :: OSI Approved :: Apache Software License
@@ -9,7 +9,7 @@ Classifier: Topic :: Software Development
9
9
  Classifier: Programming Language :: Rust
10
10
  Classifier: Programming Language :: Python :: Implementation :: CPython
11
11
  Classifier: Programming Language :: Python :: Implementation :: PyPy
12
- Requires-Dist: async-timeout>=4.0.2; python_version < '3.11'
12
+ Requires-Dist: anyio>=4.9.0
13
13
  Requires-Dist: typing-extensions>=4.8.0; python_version < '3.11'
14
14
  Requires-Dist: protobuf>=3.20
15
15
  Summary: An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0, 7.2 and 8.0.
@@ -18,9 +18,24 @@ License: Apache-2.0
18
18
  Requires-Python: >=3.9
19
19
  Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
20
 
21
- # Valkey GLIDE
21
+ # Welcome to Valkey GLIDE!
22
22
 
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.
23
+ Valkey General Language Independent Driver for the Enterprise (GLIDE) is the official open-source Valkey client library, proudly part of the Valkey organization. Our mission is to make your experience with Valkey and Redis OSS seamless and enjoyable. Whether you're a seasoned developer or just starting out, Valkey GLIDE is here to support you every step of the way.
24
+
25
+ # Why Choose Valkey GLIDE?
26
+
27
+ - **Community and Open Source**: Join our vibrant community and contribute to the project. We are always here to respond, and the client is for the community.
28
+ - **Reliability**: Built with best practices learned from over a decade of operating Redis OSS-compatible services.
29
+ - **Performance**: Optimized for high performance and low latency.
30
+ - **High Availability**: Designed to ensure your applications are always up and running.
31
+ - **Cross-Language Support**: Implemented using a core driver framework written in Rust, with language-specific extensions to ensure consistency and reduce complexity.
32
+ - **Stability and Fault Tolerance**: We brought our years of experience to create a bulletproof client.
33
+ - **Backed and Supported by AWS and GCP**: Ensuring robust support and continuous improvement of the project.
34
+
35
+ ## Documentation
36
+
37
+ See GLIDE's [documentation site](https://valkey.io/valkey-glide/).
38
+ 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.
24
39
 
25
40
  ## Supported Engine Versions
26
41
 
@@ -34,12 +49,15 @@ The release of Valkey GLIDE was tested on the following platforms:
34
49
 
35
50
  Linux:
36
51
 
37
- - Ubuntu 22.04.1 (x86_64 and aarch64)
52
+ - Ubuntu 22.04.5 (x86_64/amd64 and arm64/aarch64)
38
53
  - Amazon Linux 2023 (AL2023) (x86_64)
39
54
 
55
+ **Note: Currently Alpine Linux / MUSL is NOT supported.**
56
+
40
57
  macOS:
41
58
 
42
59
  - macOS 14.7 (Apple silicon/aarch_64)
60
+ - macOS 13.7 (x86_64/amd64)
43
61
 
44
62
  ## Python Supported Versions
45
63
 
@@ -51,6 +69,8 @@ macOS:
51
69
  | 3.12 |
52
70
  | 3.13 |
53
71
 
72
+ Valkey GLIDE transparently supports both the `asyncio` and `trio` concurrency frameworks.
73
+
54
74
  ## Installation and Setup
55
75
 
56
76
  ### Installing via Package Manager (pip)
@@ -113,11 +133,12 @@ Get response is bar
113
133
 
114
134
  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
135
 
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
136
 
120
137
  ### Building & Testing
121
138
 
122
139
  Development instructions for local building & testing the package are in the [DEVELOPER.md](https://github.com/valkey-io/valkey-glide/blob/main/python/DEVELOPER.md#build-from-source) file.
123
140
 
141
+ ## Community and Feedback
142
+
143
+ We encourage you to join our community to support, share feedback, and ask questions. You can approach us for anything on our Valkey Slack: [Join Valkey Slack](https://join.slack.com/t/valkey-oss-developer/shared_invite/zt-2nxs51chx-EB9hu9Qdch3GMfRcztTSkQ).
144
+
@@ -0,0 +1,37 @@
1
+ valkey_glide-2.0.0rc6.dist-info/METADATA,sha256=yOI45wSVq6bfF0HKNWungAYTiHdVrsLyn_lf57cznRg,5650
2
+ valkey_glide-2.0.0rc6.dist-info/WHEEL,sha256=FabLtVAh6wjYVuVsk3fFy2vDHzt-2LksyDpo-NsnDNY,106
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=MMNXtdY7cOCXuFCkHoliZIejZZJb0ApJWxJuXXinGsU,230704
8
+ glide/async_commands/__init__.py,sha256=_tbTAFATlzp4L2qe-H77PpAQK-16VsV-y7uKNUKLC_o,136
9
+ glide/async_commands/core.py,sha256=ZYjUwpf7DJBlBC7KPHSiRjbA6lbWcBbY8xEGxkJXRno,316713
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=vfqXTIU5YLMsHUD9MD3Qi1vccD9QMSQuH38mpo_5rjU,39510
20
+ glide/async_commands/cluster_commands.py,sha256=trG0vZCMZxrkziYBFlFvLZ3nMUvfS6r-BRkRwb9Gif0,61994
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=E6bS-Yu9XNKERD9QjWm4ukbdjMPD17KtWPXLddhBvXQ,31880
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=ZcLV_HrMzAYxHJW7uk905gdhOZbchBDSHlG1LVF7BJ4,4439
36
+ glide/glide.cpython-313-darwin.so,sha256=TT6hABoRa35r5i5vwIrO--j5RIoEMwNDcwbkjguOzOE,6625328
37
+ valkey_glide-2.0.0rc6.dist-info/RECORD,,
@@ -1,37 +0,0 @@
1
- valkey_glide-1.3.4rc1.dist-info/METADATA,sha256=TxdIRGyTUQdhPml8nm5v0qZVasLwgDFGXYK4ervg5s0,4950
2
- valkey_glide-1.3.4rc1.dist-info/WHEEL,sha256=FabLtVAh6wjYVuVsk3fFy2vDHzt-2LksyDpo-NsnDNY,106
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-313-darwin.so,sha256=F9o7NbOm563-XapXH4_zmA2eRCC06ZIJIyp2toCllFM,4104176
37
- valkey_glide-1.3.4rc1.dist-info/RECORD,,