valkey-glide 1.3.5rc2__pp39-pypy39_pp73-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.

Files changed (37) hide show
  1. glide/__init__.py +330 -0
  2. glide/async_commands/__init__.py +5 -0
  3. glide/async_commands/bitmap.py +311 -0
  4. glide/async_commands/cluster_commands.py +1294 -0
  5. glide/async_commands/command_args.py +102 -0
  6. glide/async_commands/core.py +7040 -0
  7. glide/async_commands/server_modules/ft.py +395 -0
  8. glide/async_commands/server_modules/ft_options/ft_aggregate_options.py +293 -0
  9. glide/async_commands/server_modules/ft_options/ft_constants.py +84 -0
  10. glide/async_commands/server_modules/ft_options/ft_create_options.py +409 -0
  11. glide/async_commands/server_modules/ft_options/ft_profile_options.py +108 -0
  12. glide/async_commands/server_modules/ft_options/ft_search_options.py +131 -0
  13. glide/async_commands/server_modules/glide_json.py +1255 -0
  14. glide/async_commands/server_modules/json_batch.py +790 -0
  15. glide/async_commands/sorted_set.py +402 -0
  16. glide/async_commands/standalone_commands.py +935 -0
  17. glide/async_commands/stream.py +442 -0
  18. glide/async_commands/transaction.py +5175 -0
  19. glide/config.py +590 -0
  20. glide/constants.py +120 -0
  21. glide/exceptions.py +62 -0
  22. glide/glide.pyi +36 -0
  23. glide/glide.pypy39-pp73-darwin.so +0 -0
  24. glide/glide_client.py +604 -0
  25. glide/logger.py +85 -0
  26. glide/protobuf/command_request_pb2.py +54 -0
  27. glide/protobuf/command_request_pb2.pyi +1164 -0
  28. glide/protobuf/connection_request_pb2.py +52 -0
  29. glide/protobuf/connection_request_pb2.pyi +292 -0
  30. glide/protobuf/response_pb2.py +32 -0
  31. glide/protobuf/response_pb2.pyi +101 -0
  32. glide/protobuf_codec.py +109 -0
  33. glide/py.typed +0 -0
  34. glide/routes.py +114 -0
  35. valkey_glide-1.3.5rc2.dist-info/METADATA +125 -0
  36. valkey_glide-1.3.5rc2.dist-info/RECORD +37 -0
  37. valkey_glide-1.3.5rc2.dist-info/WHEEL +4 -0
@@ -0,0 +1,102 @@
1
+ # Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
2
+
3
+ from enum import Enum
4
+ from typing import List, Optional, Union
5
+
6
+
7
+ class Limit:
8
+ """
9
+ Represents a limit argument for range queries in various commands.
10
+
11
+ The `LIMIT` argument is commonly used to specify a subset of results from the matching elements,
12
+ similar to the `LIMIT` clause in SQL (e.g., `SELECT LIMIT offset, count`).
13
+
14
+ This class can be utilized in multiple commands that support limit options,
15
+ such as [ZRANGE](https://valkey.io/commands/zrange), [SORT](https://valkey.io/commands/sort/), and others.
16
+
17
+ Args:
18
+ offset (int): The starting position of the range, zero based.
19
+ count (int): The maximum number of elements to include in the range.
20
+ A negative count returns all elements from the offset.
21
+
22
+ Examples:
23
+ >>> limit = Limit(0, 10) # Fetch the first 10 elements
24
+ >>> limit = Limit(5, -1) # Fetch all elements starting from the 5th element
25
+ """
26
+
27
+ def __init__(self, offset: int, count: int):
28
+ self.offset = offset
29
+ self.count = count
30
+
31
+
32
+ class OrderBy(Enum):
33
+ """
34
+ Enumeration representing sorting order options.
35
+
36
+ This enum is used for the following commands:
37
+ - `SORT`: General sorting in ascending or descending order.
38
+ - `GEOSEARCH`: Sorting items based on their proximity to a center point.
39
+ - `FT.AGGREGATE`: Used in the SortBy clause of the FT.AGGREGATE command.
40
+ """
41
+
42
+ ASC = "ASC"
43
+ """
44
+ ASC: Sort in ascending order.
45
+ """
46
+
47
+ DESC = "DESC"
48
+ """
49
+ DESC: Sort in descending order.
50
+ """
51
+
52
+
53
+ class ListDirection(Enum):
54
+ """
55
+ Enumeration representing element popping or adding direction for List commands.
56
+ """
57
+
58
+ LEFT = "LEFT"
59
+ """
60
+ LEFT: Represents the option that elements should be popped from or added to the left side of a list.
61
+ """
62
+
63
+ RIGHT = "RIGHT"
64
+ """
65
+ RIGHT: Represents the option that elements should be popped from or added to the right side of a list.
66
+ """
67
+
68
+
69
+ class ObjectType(Enum):
70
+ """
71
+ Enumeration representing the data types supported by the database.
72
+ """
73
+
74
+ STRING = "String"
75
+ """
76
+ Represents a string data type.
77
+ """
78
+
79
+ LIST = "List"
80
+ """
81
+ Represents a list data type.
82
+ """
83
+
84
+ SET = "Set"
85
+ """
86
+ Represents a set data type.
87
+ """
88
+
89
+ ZSET = "ZSet"
90
+ """
91
+ Represents a sorted set data type.
92
+ """
93
+
94
+ HASH = "Hash"
95
+ """
96
+ Represents a hash data type.
97
+ """
98
+
99
+ STREAM = "Stream"
100
+ """
101
+ Represents a stream data type.
102
+ """