valkey-glide 2.0.1__cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 2.1.0rc1__cp311-cp311-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.

Potentially problematic release.


This version of valkey-glide might be problematic. Click here for more details.

Files changed (44) hide show
  1. glide/__init__.py +95 -119
  2. glide/async_commands/cluster_commands.py +11 -11
  3. glide/async_commands/core.py +537 -414
  4. glide/async_commands/{server_modules/ft.py → ft.py} +8 -7
  5. glide/async_commands/{server_modules/glide_json.py → glide_json.py} +15 -92
  6. glide/async_commands/standalone_commands.py +9 -11
  7. glide/glide.cpython-311-aarch64-linux-gnu.so +0 -0
  8. glide/glide.pyi +1 -1
  9. glide/glide_client.py +39 -46
  10. glide/logger.py +3 -3
  11. glide/opentelemetry.py +8 -4
  12. glide_shared/__init__.py +326 -0
  13. {glide/async_commands → glide_shared/commands}/batch.py +396 -10
  14. {glide/async_commands → glide_shared/commands}/batch_options.py +1 -1
  15. glide_shared/commands/core_options.py +407 -0
  16. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_aggregate_options.py +3 -3
  17. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_create_options.py +4 -2
  18. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_profile_options.py +4 -4
  19. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_search_options.py +4 -2
  20. {glide/async_commands → glide_shared/commands}/server_modules/json_batch.py +4 -4
  21. glide_shared/commands/server_modules/json_options.py +93 -0
  22. {glide/async_commands → glide_shared/commands}/sorted_set.py +2 -2
  23. {glide/async_commands → glide_shared/commands}/stream.py +1 -1
  24. {glide → glide_shared}/config.py +28 -21
  25. {glide → glide_shared}/constants.py +3 -3
  26. {glide → glide_shared}/exceptions.py +27 -1
  27. glide_shared/protobuf/command_request_pb2.py +54 -0
  28. {glide → glide_shared}/routes.py +29 -15
  29. valkey_glide-2.1.0rc1.dist-info/METADATA +210 -0
  30. valkey_glide-2.1.0rc1.dist-info/RECORD +39 -0
  31. {valkey_glide-2.0.1.dist-info → valkey_glide-2.1.0rc1.dist-info}/WHEEL +1 -1
  32. glide/protobuf/command_request_pb2.py +0 -54
  33. glide/protobuf/command_request_pb2.pyi +0 -1193
  34. glide/protobuf/connection_request_pb2.pyi +0 -299
  35. glide/protobuf/response_pb2.pyi +0 -106
  36. valkey_glide-2.0.1.dist-info/METADATA +0 -149
  37. valkey_glide-2.0.1.dist-info/RECORD +0 -39
  38. /glide/py.typed → /glide_shared/commands/__init__.py +0 -0
  39. {glide/async_commands → glide_shared/commands}/bitmap.py +0 -0
  40. {glide/async_commands → glide_shared/commands}/command_args.py +0 -0
  41. {glide/async_commands → glide_shared/commands}/server_modules/ft_options/ft_constants.py +0 -0
  42. {glide → glide_shared}/protobuf/connection_request_pb2.py +0 -0
  43. {glide → glide_shared}/protobuf/response_pb2.py +0 -0
  44. {glide → glide_shared}/protobuf_codec.py +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.async_commands.batch import (
4
- Batch,
5
- ClusterBatch,
6
- ClusterTransaction,
7
- TBatch,
8
- Transaction,
3
+ from glide.glide import (
4
+ ClusterScanCursor,
5
+ OpenTelemetryConfig,
6
+ OpenTelemetryMetricsConfig,
7
+ OpenTelemetryTracesConfig,
8
+ Script,
9
9
  )
10
- from glide.async_commands.batch_options import (
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
- OffsetOptions,
29
- SignedEncoding,
30
- UnsignedEncoding,
31
- )
32
- from glide.async_commands.command_args import Limit, ListDirection, ObjectType, OrderBy
33
- from glide.async_commands.core import (
34
+ ByAddressRoute,
35
+ ClosingError,
36
+ ClusterBatch,
37
+ ClusterBatchOptions,
38
+ ClusterTransaction,
34
39
  ConditionalChange,
35
- CoreCommands,
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
- NumericField,
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
- QueryType,
79
- )
80
- from glide.async_commands.server_modules.ft_options.ft_search_options import (
67
+ FtProfileResponse,
81
68
  FtSearchLimit,
82
69
  FtSearchOptions,
83
- ReturnField,
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
- from glide.async_commands.stream import (
106
- ExclusiveIdBound,
107
- IdBound,
108
- MaxId,
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
- TrimByMaxLen,
119
- TrimByMinId,
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
- from glide.exceptions import (
155
- ClosingError,
156
- ConfigurationError,
157
- ConnectionError,
158
- ExecAbortError,
159
- GlideError,
160
- RequestError,
161
- TimeoutError,
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
- PubSubMsg = CoreCommands.PubSubMsg
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.async_commands.batch import ClusterBatch
8
- from glide.async_commands.batch_options import ClusterBatchOptions
9
- from glide.async_commands.command_args import ObjectType
10
- from glide.async_commands.core import (
11
- CoreCommands,
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 glide.constants import (
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 glide.exceptions import RequestError
25
- from glide.protobuf.command_request_pb2 import RequestType
26
- from glide.routes import Route
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 ..glide import ClusterScanCursor, Script
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)