Core Options
Home / glide_shared / core_options
glide_shared.commands.core_options.ConditionalChange
Bases: Enum
A condition to the SET, ZADD and GEOADD commands.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
27 28 29 30 31 32 33 34 35 36 | |
ONLY_IF_DOES_NOT_EXIST = 'NX'
class-attribute
instance-attribute
Only set key / add elements that does not already exist. Equivalent to NX in the Valkey API.
ONLY_IF_EXISTS = 'XX'
class-attribute
instance-attribute
Only update key / elements that already exist. Equivalent to XX in the Valkey API.
glide_shared.commands.core_options.ExpiryType
Bases: Enum
SET option: The type of the expiry.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
KEEP_TTL = (4, Type[None])
class-attribute
instance-attribute
Retain the time to live associated with the key. Equivalent to KEEPTTL in the Valkey API.
MILLSEC = (1, Union[int, timedelta])
class-attribute
instance-attribute
Set the specified expire time, in milliseconds. Equivalent to PX in the Valkey API.
SEC = (0, Union[int, timedelta])
class-attribute
instance-attribute
Set the specified expire time, in seconds. Equivalent to EX in the Valkey API.
UNIX_MILLSEC = (3, Union[int, datetime])
class-attribute
instance-attribute
Set the specified Unix time at which the key will expire, in milliseconds. Equivalent to PXAT in the Valkey API.
UNIX_SEC = (2, Union[int, datetime])
class-attribute
instance-attribute
Set the specified Unix time at which the key will expire, in seconds. Equivalent to EXAT in the Valkey API.
glide_shared.commands.core_options.ExpiryTypeGetEx
Bases: Enum
GetEx option: The type of the expiry.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
MILLSEC = (1, Union[int, timedelta])
class-attribute
instance-attribute
Set the specified expire time, in milliseconds. Equivalent to PX in the Valkey API.
PERSIST = (4, Type[None])
class-attribute
instance-attribute
Remove the time to live associated with the key. Equivalent to PERSIST in the Valkey API.
SEC = (0, Union[int, timedelta])
class-attribute
instance-attribute
Set the specified expire time, in seconds. Equivalent to EX in the Valkey API.
UNIX_MILLSEC = (3, Union[int, datetime])
class-attribute
instance-attribute
Set the specified Unix time at which the key will expire, in milliseconds. Equivalent to PXAT in the Valkey API.
UNIX_SEC = (2, Union[int, datetime])
class-attribute
instance-attribute
Set the specified Unix time at which the key will expire, in seconds. Equivalent to EXAT in the Valkey API.
glide_shared.commands.core_options.InfoSection
Bases: Enum
INFO option: a specific section of information:
When no parameter is provided, the default option is assumed.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
ALL = 'all'
class-attribute
instance-attribute
Return all sections (excluding module generated ones)
CLIENTS = 'clients'
class-attribute
instance-attribute
Client connections section
CLUSTER = 'cluster'
class-attribute
instance-attribute
Valkey Cluster section
COMMAND_STATS = 'commandstats'
class-attribute
instance-attribute
Valkey command statistics
CPU = 'cpu'
class-attribute
instance-attribute
CPU consumption statistics
DEFAULT = 'default'
class-attribute
instance-attribute
Return only the default set of sections
ERROR_STATS = 'errorstats'
class-attribute
instance-attribute
Valkey error statistics
EVERYTHING = 'everything'
class-attribute
instance-attribute
Includes all and modules
KEYSPACE = 'keyspace'
class-attribute
instance-attribute
Database related statistics
LATENCY_STATS = 'latencystats'
class-attribute
instance-attribute
Valkey command latency percentile distribution statistics
MEMORY = 'memory'
class-attribute
instance-attribute
Memory consumption related information
MODULES = 'modules'
class-attribute
instance-attribute
Modules section
PERSISTENCE = 'persistence'
class-attribute
instance-attribute
RDB and AOF related information
REPLICATION = 'replication'
class-attribute
instance-attribute
Master/replica replication information
SENTINEL = 'sentinel'
class-attribute
instance-attribute
Valkey Sentinel section (only applicable to Sentinel instances)
SERVER = 'server'
class-attribute
instance-attribute
General information about the server
STATS = 'stats'
class-attribute
instance-attribute
General statistics
glide_shared.commands.core_options.ExpireOptions
Bases: Enum
EXPIRE option: options for setting key expiry.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
HasExistingExpiry = 'XX'
class-attribute
instance-attribute
Set expiry only when the key has an existing expiry (Equivalent to "XX" in Valkey).
HasNoExpiry = 'NX'
class-attribute
instance-attribute
Set expiry only when the key has no expiry (Equivalent to "NX" in Valkey).
NewExpiryGreaterThanCurrent = 'GT'
class-attribute
instance-attribute
Set expiry only when the new expiry is greater than the current one (Equivalent to "GT" in Valkey).
NewExpiryLessThanCurrent = 'LT'
class-attribute
instance-attribute
Set expiry only when the new expiry is less than the current one (Equivalent to "LT" in Valkey).
glide_shared.commands.core_options.UpdateOptions
Bases: Enum
Options for updating elements of a sorted set key.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
199 200 201 202 203 204 205 206 207 208 | |
GREATER_THAN = 'GT'
class-attribute
instance-attribute
Only update existing elements if the new score is greater than the current score.
LESS_THAN = 'LT'
class-attribute
instance-attribute
Only update existing elements if the new score is less than the current score.
glide_shared.commands.core_options.ExpirySet
SET option: Represents the expiry type and value to be executed with "SET" command.
Attributes:
| Name | Type | Description |
|---|---|---|
cmd_arg |
str
|
The expiry type. |
value |
str
|
The value for the expiry type. |
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
set_expiry_type_and_value(expiry_type, value)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expiry_type
|
ExpiryType
|
The expiry type. |
required |
value
|
Optional[Union[int, datetime, timedelta]]
|
The value of the expiration type. The type of expiration determines the type of expiration value: |
required |
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
glide_shared.commands.core_options.ExpiryGetEx
GetEx option: Represents the expiry type and value to be executed with "GetEx" command.
Attributes:
| Name | Type | Description |
|---|---|---|
cmd_arg |
str
|
The expiry type. |
value |
str
|
The value for the expiry type. |
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | |
set_expiry_type_and_value(expiry_type, value)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expiry_type
|
ExpiryType
|
The expiry type. |
required |
value
|
Optional[Union[int, datetime, timedelta]]
|
The value of the expiration type. The type of expiration determines the type of expiration value: |
required |
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | |
glide_shared.commands.core_options.InsertPosition
Bases: Enum
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
338 339 340 | |
glide_shared.commands.core_options.FlushMode
Bases: Enum
Defines flushing mode for:
FLUSHALL command and FUNCTION FLUSH command.
See FLUSHAL and FUNCTION-FLUSH for details
SYNC was introduced in version 6.2.0.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
glide_shared.commands.core_options.FunctionRestorePolicy
Bases: Enum
Options for the FUNCTION RESTORE command.
Source code in doc-gen/valkey-glide/python/glide-shared/glide_shared/commands/core_options.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
APPEND = 'APPEND'
class-attribute
instance-attribute
Appends the restored libraries to the existing libraries and aborts on collision. This is the default policy.
FLUSH = 'FLUSH'
class-attribute
instance-attribute
Deletes all existing libraries before restoring the payload.
REPLACE = 'REPLACE'
class-attribute
instance-attribute
Appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries.