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.
- glide/__init__.py +11 -7
- glide/async_commands/{transaction.py → batch.py} +1413 -987
- glide/async_commands/bitmap.py +94 -85
- glide/async_commands/cluster_commands.py +308 -123
- glide/async_commands/command_args.py +7 -6
- glide/async_commands/core.py +1304 -714
- 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 +199 -95
- glide/async_commands/stream.py +94 -87
- glide/config.py +165 -105
- glide/constants.py +8 -4
- glide/glide.cpython-313-darwin.so +0 -0
- glide/glide_client.py +273 -94
- 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 +41 -8
- {valkey_glide-1.3.4rc1.dist-info → valkey_glide-2.0.0rc6.dist-info}/METADATA +29 -8
- valkey_glide-2.0.0rc6.dist-info/RECORD +37 -0
- valkey_glide-1.3.4rc1.dist-info/RECORD +0 -37
- {valkey_glide-1.3.4rc1.dist-info → valkey_glide-2.0.0rc6.dist-info}/WHEEL +0 -0
|
@@ -15,14 +15,18 @@ class InfBound(Enum):
|
|
|
15
15
|
POS_INF = {"score_arg": "+inf", "lex_arg": "+"}
|
|
16
16
|
"""
|
|
17
17
|
Positive infinity bound for sorted set.
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
`score_arg`: represents numeric positive infinity (+inf).
|
|
20
|
+
|
|
21
|
+
`lex_arg`: represents lexicographic positive infinity (+).
|
|
20
22
|
"""
|
|
21
23
|
NEG_INF = {"score_arg": "-inf", "lex_arg": "-"}
|
|
22
24
|
"""
|
|
23
25
|
Negative infinity bound for sorted set.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
|
|
27
|
+
`score_arg`: represents numeric negative infinity (-inf).
|
|
28
|
+
|
|
29
|
+
`lex_arg`: represents lexicographic negative infinity (-).
|
|
26
30
|
"""
|
|
27
31
|
|
|
28
32
|
|
|
@@ -49,8 +53,8 @@ class ScoreFilter(Enum):
|
|
|
49
53
|
"""
|
|
50
54
|
Defines which elements to pop from a sorted set.
|
|
51
55
|
|
|
52
|
-
ScoreFilter is a mandatory option for ZMPOP
|
|
53
|
-
and BZMPOP
|
|
56
|
+
ScoreFilter is a mandatory option for [ZMPOP](https://valkey.io/commands/zmpop)
|
|
57
|
+
and [BZMPOP](https://valkey.io/commands/bzmpop).
|
|
54
58
|
"""
|
|
55
59
|
|
|
56
60
|
MIN = "MIN"
|
|
@@ -97,7 +101,7 @@ class RangeByIndex:
|
|
|
97
101
|
|
|
98
102
|
The `start` and `end` arguments represent zero-based indexes.
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
Attributes:
|
|
101
105
|
start (int): The start index of the range.
|
|
102
106
|
end (int): The end index of the range.
|
|
103
107
|
"""
|
|
@@ -113,10 +117,11 @@ class RangeByScore:
|
|
|
113
117
|
|
|
114
118
|
The `start` and `end` arguments represent score boundaries.
|
|
115
119
|
|
|
116
|
-
|
|
120
|
+
Attributes:
|
|
117
121
|
start (Union[InfBound, ScoreBoundary]): The start score boundary.
|
|
118
122
|
end (Union[InfBound, ScoreBoundary]): The end score boundary.
|
|
119
|
-
limit (Optional[Limit]): The limit argument for a range query. Defaults to None. See `Limit`
|
|
123
|
+
limit (Optional[Limit]): The limit argument for a range query. Defaults to None. See `Limit`
|
|
124
|
+
class for more information.
|
|
120
125
|
"""
|
|
121
126
|
|
|
122
127
|
def __init__(
|
|
@@ -126,9 +131,9 @@ class RangeByScore:
|
|
|
126
131
|
limit: Optional[Limit] = None,
|
|
127
132
|
):
|
|
128
133
|
self.start = (
|
|
129
|
-
start.value["score_arg"] if
|
|
134
|
+
start.value["score_arg"] if isinstance(start, InfBound) else start.value
|
|
130
135
|
)
|
|
131
|
-
self.end = end.value["score_arg"] if
|
|
136
|
+
self.end = end.value["score_arg"] if isinstance(end, InfBound) else end.value
|
|
132
137
|
self.limit = limit
|
|
133
138
|
|
|
134
139
|
|
|
@@ -138,10 +143,11 @@ class RangeByLex:
|
|
|
138
143
|
|
|
139
144
|
The `start` and `end` arguments represent lexicographical boundaries.
|
|
140
145
|
|
|
141
|
-
|
|
146
|
+
Attributes:
|
|
142
147
|
start (Union[InfBound, LexBoundary]): The start lexicographic boundary.
|
|
143
148
|
end (Union[InfBound, LexBoundary]): The end lexicographic boundary.
|
|
144
|
-
limit (Optional[Limit]): The limit argument for a range query. Defaults to None. See `Limit` class
|
|
149
|
+
limit (Optional[Limit]): The limit argument for a range query. Defaults to None. See `Limit` class
|
|
150
|
+
for more information.
|
|
145
151
|
"""
|
|
146
152
|
|
|
147
153
|
def __init__(
|
|
@@ -150,24 +156,28 @@ class RangeByLex:
|
|
|
150
156
|
end: Union[InfBound, LexBoundary],
|
|
151
157
|
limit: Optional[Limit] = None,
|
|
152
158
|
):
|
|
153
|
-
self.start =
|
|
154
|
-
|
|
159
|
+
self.start = (
|
|
160
|
+
start.value["lex_arg"] if isinstance(start, InfBound) else start.value
|
|
161
|
+
)
|
|
162
|
+
self.end = end.value["lex_arg"] if isinstance(end, InfBound) else end.value
|
|
155
163
|
self.limit = limit
|
|
156
164
|
|
|
157
165
|
|
|
158
166
|
class GeospatialData:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
Represents a geographic position defined by longitude and latitude.
|
|
167
|
+
"""
|
|
168
|
+
Represents a geographic position defined by longitude and latitude.
|
|
162
169
|
|
|
163
|
-
|
|
164
|
-
- Valid longitudes are from -180 to 180 degrees.
|
|
165
|
-
- Valid latitudes are from -85.05112878 to 85.05112878 degrees.
|
|
170
|
+
The exact limits, as specified by EPSG:900913 / EPSG:3785 / OSGEO:41001 are the following:
|
|
166
171
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
- Valid longitudes are from -180 to 180 degrees.
|
|
173
|
+
- Valid latitudes are from -85.05112878 to 85.05112878 degrees.
|
|
174
|
+
|
|
175
|
+
Attributes:
|
|
176
|
+
longitude (float): The longitude coordinate.
|
|
177
|
+
latitude (float): The latitude coordinate.
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
def __init__(self, longitude: float, latitude: float):
|
|
171
181
|
self.longitude = longitude
|
|
172
182
|
self.latitude = latitude
|
|
173
183
|
|
|
@@ -199,7 +209,7 @@ class GeoSearchByRadius:
|
|
|
199
209
|
"""
|
|
200
210
|
Represents search criteria of searching within a certain radius from a specified point.
|
|
201
211
|
|
|
202
|
-
|
|
212
|
+
Attributes:
|
|
203
213
|
radius (float): Radius of the search area.
|
|
204
214
|
unit (GeoUnit): Unit of the radius. See `GeoUnit`.
|
|
205
215
|
"""
|
|
@@ -225,7 +235,7 @@ class GeoSearchByBox:
|
|
|
225
235
|
"""
|
|
226
236
|
Represents search criteria of searching within a specified rectangular area.
|
|
227
237
|
|
|
228
|
-
|
|
238
|
+
Attributes:
|
|
229
239
|
width (float): Width of the bounding box.
|
|
230
240
|
height (float): Height of the bounding box
|
|
231
241
|
unit (GeoUnit): Unit of the radius. See `GeoUnit`.
|
|
@@ -253,10 +263,10 @@ class GeoSearchCount:
|
|
|
253
263
|
"""
|
|
254
264
|
Represents the count option for limiting the number of results in a GeoSearch.
|
|
255
265
|
|
|
256
|
-
|
|
266
|
+
Attributes:
|
|
257
267
|
count (int): The maximum number of results to return.
|
|
258
268
|
any_option (bool): Whether to allow returning as enough matches are found.
|
|
259
|
-
|
|
269
|
+
This means that the results returned may not be the ones closest to the specified point. Default to False.
|
|
260
270
|
"""
|
|
261
271
|
|
|
262
272
|
def __init__(self, count: int, any_option: bool = False):
|