ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- command-getkeys.json000066400000002010152345610730010527 0ustar00{ "GETKEYS": { "summary": "Extracts the key names from an arbitrary command.", "complexity": "O(N) where N is the number of arguments to the command", "group": "server", "since": "2.8.13", "arity": -3, "container": "COMMAND", "function": "commandGetKeysCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "description": "List of keys from the given Redis command.", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "arguments": [ { "name": "command", "type": "string" }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ] } } get.json000066400000002526152345610730006233 0ustar00{ "GET": { "summary": "Returns the string value of a key.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 2, "function": "getCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The value of the key.", "type": "string" }, { "description": "Key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } xautoclaim.json000066400000012564152345610730007625 0ustar00{ "XAUTOCLAIM": { "summary": "Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.", "complexity": "O(1) if COUNT is small.", "group": "stream", "since": "6.2.0", "arity": -6, "function": "xautoclaimCommand", "history": [ [ "7.0.0", "Added an element to the reply array, containing deleted entries the command cleared from the PEL" ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "description": "Claimed stream entries (with data, if `JUSTID` was not given).", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "Cursor for next call.", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Data", "type": "array", "items": { "type": "string" } } ] } }, { "description": "Entry IDs which no longer exist in the stream, and were deleted from the PEL in which they were found.", "type": "array", "items": { "type": "string", "pattern": "[0-9]+-[0-9]+" } } ] }, { "description": "Claimed stream entries (without data, if `JUSTID` was given).", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "Cursor for next call.", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "type": "array", "uniqueItems": true, "items": { "type": "string", "pattern": "[0-9]+-[0-9]+" } }, { "description": "Entry IDs which no longer exist in the stream, and were deleted from the PEL in which they were found.", "type": "array", "items": { "type": "string", "pattern": "[0-9]+-[0-9]+" } } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "consumer", "type": "string" }, { "name": "min-idle-time", "type": "string" }, { "name": "start", "type": "string" }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true }, { "name": "justid", "token": "JUSTID", "type": "pure-token", "optional": true } ] } } restore-asking.json000066400000005633152345610730010413 0ustar00{ "RESTORE-ASKING": { "summary": "An internal command for migrating keys in a cluster.", "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).", "group": "server", "since": "3.0.0", "arity": -4, "function": "restoreCommand", "history": [ [ "3.0.0", "Added the `REPLACE` modifier." ], [ "5.0.0", "Added the `ABSTTL` modifier." ], [ "5.0.0", "Added the `IDLETIME` and `FREQ` options." ] ], "doc_flags": [ "SYSCMD" ], "command_flags": [ "WRITE", "DENYOOM", "ASKING" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "ttl", "type": "integer" }, { "name": "serialized-value", "type": "string" }, { "name": "replace", "token": "REPLACE", "type": "pure-token", "optional": true, "since": "3.0.0" }, { "name": "absttl", "token": "ABSTTL", "type": "pure-token", "optional": true, "since": "5.0.0" }, { "token": "IDLETIME", "name": "seconds", "type": "integer", "optional": true, "since": "5.0.0" }, { "token": "FREQ", "name": "frequency", "type": "integer", "optional": true, "since": "5.0.0" } ], "reply_schema": { "const": "OK" } } } linsert.json000066400000004715152345610730007136 0ustar00{ "LINSERT": { "summary": "Inserts an element before or after another element in a list.", "complexity": "O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).", "group": "list", "since": "2.2.0", "arity": 5, "function": "linsertCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "List length after a successful insert operation.", "type": "integer", "minimum": 1 }, { "description": "in case key doesn't exist.", "const": 0 }, { "description": "when the pivot wasn't found.", "const": -1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "where", "type": "oneof", "arguments": [ { "name": "before", "type": "pure-token", "token": "BEFORE" }, { "name": "after", "type": "pure-token", "token": "AFTER" } ] }, { "name": "pivot", "type": "string" }, { "name": "element", "type": "string" } ] } } pfcount.json000066400000003073152345610730007130 0ustar00{ "PFCOUNT": { "summary": "Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).", "complexity": "O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.", "group": "hyperloglog", "since": "2.8.9", "arity": -2, "function": "pfcountCommand", "command_flags": [ "READONLY", "MAY_REPLICATE" ], "acl_categories": [ "HYPERLOGLOG" ], "key_specs": [ { "notes": "RW because it may change the internal representation of the key, and propagate to replicas", "flags": [ "RW", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ], "reply_schema": { "description": "The approximated number of unique elements observed via PFADD", "type": "integer" } } } bitfield_ro.json000066400000003524152345610730007735 0ustar00{ "BITFIELD_RO": { "summary": "Performs arbitrary read-only bitfield integer operations on strings.", "complexity": "O(1) for each subcommand specified", "group": "bitmap", "since": "6.0.0", "arity": -2, "function": "bitfieldroCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "token": "GET", "name": "get-block", "type": "block", "optional": true, "multiple": true, "multiple_token": true, "arguments": [ { "name": "encoding", "type": "string" }, { "name": "offset", "type": "integer" } ] } ], "reply_schema": { "type": "array", "items": { "description": "The result of the subcommand at the same position", "type": "integer" } } } } function-dump.json000066400000001057152345610730010242 0ustar00{ "DUMP": { "summary": "Dumps all libraries into a serialized binary payload.", "complexity": "O(N) where N is the number of functions", "group": "scripting", "since": "7.0.0", "arity": 2, "container": "FUNCTION", "function": "functionDumpCommand", "command_flags": [ "NOSCRIPT" ], "acl_categories": [ "SCRIPTING" ], "reply_schema": { "description": "the serialized payload", "type": "string" } } } hexpiretime.json000066400000004632152345610730007777 0ustar00{ "HEXPIRETIME": { "summary": "Returns the expiration time of a hash field as a Unix timestamp, in seconds.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -5, "function": "hexpiretimeCommand", "history": [], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "The field exists but has no associated expire.", "const": -1 }, { "description": "Expiration Unix timestamp in seconds.", "type": "integer", "minimum": 1 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } acl-cat.json000066400000002352152345610730006755 0ustar00{ "CAT": { "summary": "Lists the ACL categories, or the commands inside a category.", "complexity": "O(1) since the categories and commands are a fixed set.", "group": "server", "since": "6.0.0", "arity": -2, "container": "ACL", "function": "aclCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "anyOf": [ { "type": "array", "description": "In case `category` was not given, a list of existing ACL categories", "items": { "type": "string" } }, { "type": "array", "description": "In case `category` was given, list of commands that fall under the provided ACL category", "items": { "type": "string" } } ] }, "arguments": [ { "name": "category", "type": "string", "optional": true } ] } } sentinel-is-master-down-by-addr.json000066400000003126152345610730013461 0ustar00{ "IS-MASTER-DOWN-BY-ADDR": { "summary": "Determines whether a master Redis instance is down.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 6, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "oneOf": [ { "const": 0, "description": "Master is up." }, { "const": 1, "description": "Master is down." } ] }, { "type": "string", "description": "Sentinel address." }, { "type": "integer", "description": "Port." } ] }, "arguments": [ { "name": "ip", "type": "string" }, { "name": "port", "type": "integer" }, { "name": "current-epoch", "type": "integer" }, { "name": "runid", "type": "string" } ] } } cluster-flushslots.json000066400000000672152345610730011341 0ustar00{ "FLUSHSLOTS": { "summary": "Deletes all slots information from a node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "reply_schema": { "const": "OK" } } } client-caching.json000066400000002042152345610730010315 0ustar00{ "CACHING": { "summary": "Instructs the server whether to track the keys in the next request.", "complexity": "O(1)", "group": "connection", "since": "6.0.0", "arity": 3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "mode", "type": "oneof", "arguments": [ { "name": "yes", "type": "pure-token", "token": "YES" }, { "name": "no", "type": "pure-token", "token": "NO" } ] } ] } } lset.json000066400000002572152345610730006424 0ustar00{ "LSET": { "summary": "Sets the value of an element in a list by its index.", "complexity": "O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).", "group": "list", "since": "1.0.0", "arity": 4, "function": "lsetCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "index", "type": "integer" }, { "name": "element", "type": "string" } ] } } sinter.json000066400000002667152345610730006766 0ustar00{ "SINTER": { "summary": "Returns the intersect of multiple sets.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "group": "set", "since": "1.0.0", "arity": -2, "function": "sinterCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List with the members of the resulting set.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } xgroup-help.json000066400000001141152345610730007716 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 2, "container": "XGROUP", "function": "xgroupCommand", "command_flags": [ "LOADING", "STALE" ], "acl_categories": [ "STREAM" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } cluster-setslot.json000066400000003000152345610730010614 0ustar00{ "SETSLOT": { "summary": "Binds a hash slot to a node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": -4, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "slot", "type": "integer" }, { "name": "subcommand", "type": "oneof", "arguments": [ { "name": "importing", "display": "node-id", "type": "string", "token": "IMPORTING" }, { "name": "migrating", "display": "node-id", "type": "string", "token": "MIGRATING" }, { "name": "node", "display": "node-id", "type": "string", "token": "NODE" }, { "name": "stable", "type": "pure-token", "token": "STABLE" } ] } ], "reply_schema": { "const": "OK" } } } exists.json000066400000002740152345610730006771 0ustar00{ "EXISTS": { "summary": "Determines whether one or more keys exist.", "complexity": "O(N) where N is the number of keys to check.", "group": "generic", "since": "1.0.0", "arity": -2, "function": "existsCommand", "history": [ [ "3.0.3", "Accepts multiple `key` arguments." ] ], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:AGG_SUM" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of keys that exist from those specified as arguments.", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } hmset.json000066400000003323152345610730006570 0ustar00{ "HMSET": { "summary": "Sets the values of multiple fields.", "complexity": "O(N) where N is the number of fields being set.", "group": "hash", "since": "2.0.0", "arity": -4, "function": "hsetCommand", "deprecated_since": "4.0.0", "replaced_by": "`HSET` with multiple field-value pairs", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string" }, { "name": "value", "type": "string" } ] } ] } } memory-doctor.json000066400000001016152345610730010245 0ustar00{ "DOCTOR": { "summary": "Outputs a memory problems report.", "complexity": "O(1)", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "description": "memory problems report", "type": "string" } } } hpersist.json000066400000004502152345610730007311 0ustar00{ "HPERSIST": { "summary": "Removes the expiration time for each specified field", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -5, "function": "hpersistCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "The field exists but has no associated expire.", "const": -1 }, { "description": "Expiration time was removed", "const": 1 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } latency-doctor.json000066400000001261152345610730010376 0ustar00{ "DOCTOR": { "summary": "Returns a human-readable latency analysis report.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 2, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "string", "description": "A human readable latency analysis report." } } } zrank.json000066400000004547152345610730006606 0ustar00{ "ZRANK": { "summary": "Returns the index of a member in a sorted set ordered by ascending scores.", "complexity": "O(log(N))", "group": "sorted_set", "since": "2.0.0", "arity": -3, "function": "zrankCommand", "history": [ [ "7.2.0", "Added the optional `WITHSCORE` argument." ] ], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "Key does not exist or the member does not exist in the sorted set." }, { "type": "integer", "description": "The rank of the member when 'WITHSCORE' is not used." }, { "type": "array", "description": "The rank and score of the member when 'WITHSCORE' is used.", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "number" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" }, { "name": "withscore", "token": "WITHSCORE", "type": "pure-token", "optional": true } ] } } keys.json000066400000001715152345610730006426 0ustar00{ "KEYS": { "summary": "Returns all key names that match a pattern.", "complexity": "O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.", "group": "generic", "since": "1.0.0", "arity": 2, "function": "keysCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "NONDETERMINISTIC_OUTPUT_ORDER" ], "arguments": [ { "name": "pattern", "type": "pattern" } ], "reply_schema": { "description": "list of keys matching pattern", "type": "array", "items": { "type": "string" } } } } smove.json000066400000004141152345610730006600 0ustar00{ "SMOVE": { "summary": "Moves a member from one set to another.", "complexity": "O(1)", "group": "set", "since": "1.0.0", "arity": 4, "function": "smoveCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 1, "description": "Element is moved." }, { "const": 0, "description": "The element is not a member of source and no operation was performed." } ] }, "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 }, { "name": "member", "type": "string" } ] } } object-help.json000066400000001144152345610730007643 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "generic", "since": "6.2.0", "arity": 2, "container": "OBJECT", "function": "objectCommand", "command_flags": [ "LOADING", "STALE" ], "acl_categories": [ "KEYSPACE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } slaveof.json000066400000003667152345610730007122 0ustar00{ "SLAVEOF": { "summary": "Sets a Redis server as a replica of another, or promotes it to being a master.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": 3, "function": "replicaofCommand", "deprecated_since": "5.0.0", "replaced_by": "`REPLICAOF`", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "STALE" ], "arguments": [ { "name": "args", "type": "oneof", "arguments": [ { "name": "host-port", "type": "block", "arguments": [ { "name": "host", "type": "string" }, { "name": "port", "type": "integer" } ] }, { "name": "no-one", "type": "block", "arguments": [ { "name": "no", "type": "pure-token", "token": "NO" }, { "name": "one", "type": "pure-token", "token": "ONE" } ] } ] } ], "reply_schema": { "description": "slaveOf status", "type": "string", "pattern": "OK*" } } } cluster-countkeysinslot.json000066400000001164152345610730012405 0ustar00{ "COUNTKEYSINSLOT": { "summary": "Returns the number of keys in a hash slot.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "arguments": [ { "name": "slot", "type": "integer" } ], "reply_schema": { "description": "The number of keys in the specified hash slot", "type": "integer", "minimum": 0 } } } latency-reset.json000066400000001520152345610730010224 0ustar00{ "RESET": { "summary": "Resets the latency data for one or more events.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": -2, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:AGG_SUM" ], "reply_schema": { "type": "integer", "description": "Number of event time series that were reset." }, "arguments": [ { "name": "event", "type": "string", "optional": true, "multiple": true } ] } } set.json000066400000013013152345610730006240 0ustar00{ "SET": { "summary": "Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": -3, "function": "setCommand", "get_keys_function": "setGetKeys", "history": [ [ "2.6.12", "Added the `EX`, `PX`, `NX` and `XX` options." ], [ "6.0.0", "Added the `KEEPTTL` option." ], [ "6.2.0", "Added the `GET`, `EXAT` and `PXAT` option." ], [ "7.0.0", "Allowed the `NX` and `GET` options to be used together." ], [ "8.4.0", "Added 'IFEQ', 'IFNE', 'IFDEQ', 'IFDNE' options." ] ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "key_specs": [ { "notes": "RW and ACCESS due to the optional `GET` argument", "flags": [ "RW", "ACCESS", "UPDATE", "VARIABLE_FLAGS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf":[ { "description": "`GET` not given: Operation was aborted (conflict with one of the `XX`/`NX`/`IFEQ`/`IFDEQ` options or condition not met).", "type": "null" }, { "description": "`GET` not given: The key was set.", "const": "OK" }, { "description": "`GET` given: The key didn't exist before the `SET`", "type": "null" }, { "description": "`GET` given: The previous value of the key", "type": "string" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" }, { "name": "condition", "type": "oneof", "optional": true, "since": "2.6.12", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "ifeq-value", "type": "string", "token": "IFEQ", "since": "8.4.0" }, { "name": "ifne-value", "type": "string", "token": "IFNE", "since": "8.4.0" }, { "name": "ifdeq-digest", "type": "integer", "token": "IFDEQ", "since": "8.4.0" }, { "name": "ifdne-digest", "type": "integer", "token": "IFDNE", "since": "8.4.0" } ] }, { "name": "get", "token": "GET", "type": "pure-token", "optional": true, "since": "6.2.0" }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "token": "EX", "since": "2.6.12" }, { "name": "milliseconds", "type": "integer", "token": "PX", "since": "2.6.12" }, { "name": "unix-time-seconds", "type": "unix-time", "token": "EXAT", "since": "6.2.0" }, { "name": "unix-time-milliseconds", "type": "unix-time", "token": "PXAT", "since": "6.2.0" }, { "name": "keepttl", "type": "pure-token", "token": "KEEPTTL", "since": "6.0.0" } ] } ] } } geosearch.json000066400000023304152345610730007411 0ustar00{ "GEOSEARCH": { "summary": "Queries a geospatial index for members inside an area of a box or a circle.", "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape", "group": "geo", "since": "6.2.0", "arity": -7, "function": "geosearchCommand", "history": [ [ "7.0.0", "Added support for uppercase unit names." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "from", "type": "oneof", "arguments": [ { "token": "FROMMEMBER", "name": "member", "type": "string" }, { "token": "FROMLONLAT", "name": "fromlonlat", "type": "block", "arguments": [ { "name": "longitude", "type": "double" }, { "name": "latitude", "type": "double" } ] } ] }, { "name": "by", "type": "oneof", "arguments": [ { "name": "circle", "type": "block", "arguments": [ { "token": "BYRADIUS", "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] } ] }, { "name": "box", "type": "block", "arguments": [ { "token": "BYBOX", "name": "width", "type": "double" }, { "name": "height", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] } ] } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true } ] }, { "name": "withcoord", "token": "WITHCOORD", "type": "pure-token", "optional": true }, { "name": "withdist", "token": "WITHDIST", "type": "pure-token", "optional": true }, { "name": "withhash", "token": "WITHHASH", "type": "pure-token", "optional": true } ], "reply_schema": { "description": "Array of matched members information", "anyOf": [ { "description": "If no WITH* option is specified, array of matched members names", "type": "array", "items": { "description": "name", "type": "string" } }, { "type": "array", "items": { "type": "array", "minItems": 1, "maxItems": 4, "items": [ { "description": "Matched member name", "type": "string" } ], "additionalItems": { "oneOf": [ { "description": "If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius", "type": "string" }, { "description": "If WITHHASH option is specified, the geohash integer", "type": "integer" }, { "description": "If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "latitude (x)", "type": "number" }, { "description": "longitude (y)", "type": "number" } ] } ] } } } ] } } } ping.json000066400000001746152345610730006414 0ustar00{ "PING": { "summary": "Returns the server's liveliness response.", "complexity": "O(1)", "group": "connection", "since": "1.0.0", "arity": -1, "function": "pingCommand", "command_flags": [ "FAST", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "anyOf": [ { "const": "PONG", "description": "Default reply." }, { "type": "string", "description": "Relay of given `message`." } ] }, "arguments": [ { "name": "message", "type": "string", "optional": true } ] } } bitpos.json000066400000006327152345610730006757 0ustar00{ "BITPOS": { "summary": "Finds the first set (1) or clear (0) bit in a string.", "complexity": "O(N)", "group": "bitmap", "since": "2.8.7", "arity": -3, "function": "bitposCommand", "history": [ [ "7.0.0", "Added the `BYTE|BIT` option." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "bit", "type": "integer" }, { "name": "range", "type": "block", "optional": true, "arguments": [ { "name": "start", "type": "integer" }, { "name": "end-unit-block", "type": "block", "optional": true, "arguments": [ { "name": "end", "type": "integer" }, { "name": "unit", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "byte", "type": "pure-token", "token": "BYTE" }, { "name": "bit", "type": "pure-token", "token": "BIT" } ] } ] } ] } ], "reply_schema": { "oneOf": [ { "description": "the position of the first bit set to 1 or 0 according to the request", "type": "integer", "minimum": 0 }, { "description": "In case the `bit` argument is 1 and the string is empty or composed of just zero bytes", "const": -1 } ] } } } lcs.json000066400000010547152345610730006237 0ustar00{ "LCS": { "summary": "Finds the longest common substring.", "complexity": "O(N*M) where N and M are the lengths of s1 and s2, respectively", "group": "string", "since": "7.0.0", "arity": -3, "function": "lcsCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 1, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "string", "description": "The longest common subsequence." }, { "type": "integer", "description": "The length of the longest common subsequence when 'LEN' is given." }, { "type": "object", "description": "Array with the LCS length and all the ranges in both the strings when 'IDX' is given. In RESP2 this is returned as a flat array", "additionalProperties": false, "properties": { "matches": { "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 3, "items": [ { "type": "array", "description": "Matched range in the first string.", "minItems": 2, "maxItems": 2, "items": { "type": "integer" } }, { "type": "array", "description": "Matched range in the second string.", "minItems": 2, "maxItems": 2, "items": { "type": "integer" } } ], "additionalItems": { "type": "integer", "description": "The length of the match when 'WITHMATCHLEN' is given." } } }, "len": { "type": "integer", "description": "Length of the longest common subsequence." } } } ] }, "arguments": [ { "name": "key1", "type": "key", "key_spec_index": 0 }, { "name": "key2", "type": "key", "key_spec_index": 0 }, { "name": "len", "token": "LEN", "type": "pure-token", "optional": true }, { "name": "idx", "token": "IDX", "type": "pure-token", "optional": true }, { "token": "MINMATCHLEN", "name": "min-match-len", "type": "integer", "optional": true }, { "name": "withmatchlen", "token": "WITHMATCHLEN", "type": "pure-token", "optional": true } ] } } hset.json000066400000003564152345610730006422 0ustar00{ "HSET": { "summary": "Creates or modifies the value of a field in a hash.", "complexity": "O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.", "group": "hash", "since": "2.0.0", "arity": -4, "function": "hsetCommand", "history": [ [ "4.0.0", "Accepts multiple `field` and `value` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The number of fields that were added", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string" }, { "name": "value", "type": "string" } ] } ] } } readwrite.json000066400000000763152345610730007443 0ustar00{ "READWRITE": { "summary": "Enables read-write queries for a connection to a Reids Cluster replica node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 1, "function": "readwriteCommand", "command_flags": [ "FAST", "LOADING", "STALE" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" } } } sunsubscribe.json000066400000002150152345610730010154 0ustar00{ "SUNSUBSCRIBE": { "summary": "Stops listening to messages posted to shard channels.", "complexity": "O(N) where N is the number of shard channels to unsubscribe.", "group": "pubsub", "since": "7.0.0", "arity": -1, "function": "sunsubscribeCommand", "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE" ], "arguments": [ { "name": "shardchannel", "type": "string", "optional": true, "multiple": true } ], "key_specs": [ { "flags": [ "NOT_KEY" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ] } } msetex.json000066400000007221152345610730006756 0ustar00{ "MSETEX": { "summary": "Atomically sets multiple string keys with a shared expiration in a single operation. Supports flexible argument parsing where condition and expiration flags can appear in any order.", "complexity": "O(N) where N is the number of keys to set.", "group": "string", "since": "8.4.0", "arity": -4, "function": "msetexCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 2 } } } ], "reply_schema": { "oneOf": [ { "description": "No key was set (at least one key failed).", "const": 0 }, { "description": "All the keys were set.", "const": 1 } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" } ] }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "token": "EX" }, { "name": "milliseconds", "type": "integer", "token": "PX" }, { "name": "unix-time-seconds", "type": "unix-time", "token": "EXAT" }, { "name": "unix-time-milliseconds", "type": "unix-time", "token": "PXAT" }, { "name": "keepttl", "type": "pure-token", "token": "KEEPTTL" } ] } ] } } config-get.json000066400000001664152345610730007500 0ustar00{ "GET": { "summary": "Returns the effective values of configuration parameters.", "complexity": "O(N) when N is the number of configuration parameters provided", "group": "server", "since": "2.0.0", "arity": -3, "container": "CONFIG", "function": "configGetCommand", "history": [ [ "7.0.0", "Added the ability to pass multiple pattern parameters in one call" ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "reply_schema": { "type": "object", "additionalProperties": { "type": "string" } }, "arguments": [ { "name": "parameter", "type": "string", "multiple": true } ] } } function-load.json000066400000001771152345610730010217 0ustar00{ "LOAD": { "summary": "Creates a library.", "complexity": "O(1) (considering compilation time is redundant)", "group": "scripting", "since": "7.0.0", "arity": -3, "container": "FUNCTION", "function": "functionLoadCommand", "command_flags": [ "NOSCRIPT", "WRITE", "DENYOOM" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "replace", "type": "pure-token", "token": "REPLACE", "optional": true }, { "name": "function-code", "type": "string" } ], "reply_schema": { "description": "The library name that was loaded", "type": "string" } } } sort_ro.json000066400000007560152345610730007146 0ustar00{ "SORT_RO": { "summary": "Returns the sorted elements of a list, a set, or a sorted set.", "complexity": "O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).", "group": "generic", "since": "7.0.0", "arity": -2, "function": "sortroCommand", "get_keys_function": "sortROGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SET", "SORTEDSET", "LIST", "DANGEROUS" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort", "flags": [ "RO", "ACCESS" ], "begin_search": { "unknown": null }, "find_keys": { "unknown": null } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "token": "BY", "name": "by-pattern", "display": "pattern", "type": "pattern", "key_spec_index": 1, "optional": true }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] }, { "token": "GET", "name": "get-pattern", "display": "pattern", "key_spec_index": 1, "type": "pattern", "optional": true, "multiple": true, "multiple_token": true }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "sorting", "token": "ALPHA", "type": "pure-token", "optional": true } ], "reply_schema": { "description": "a list of sorted elements", "type": "array", "items": { "oneOf": [ { "type": "string" }, { "description": "GET option is specified, but no object was found", "type": "null" } ] } } } } wait.json000066400000001741152345610730006416 0ustar00{ "WAIT": { "summary": "Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.", "complexity": "O(1)", "group": "generic", "since": "3.0.0", "arity": 3, "function": "waitCommand", "command_flags": [ "BLOCKING" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:AGG_MIN" ], "reply_schema": { "type": "integer", "description": "The number of replicas reached by all the writes performed in the context of the current connection.", "minimum": 0 }, "arguments": [ { "name": "numreplicas", "type": "integer" }, { "name": "timeout", "type": "integer" } ] } } bzpopmin.json000066400000005000152345610730007300 0ustar00{ "BZPOPMIN": { "summary": "Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "group": "sorted_set", "since": "5.0.0", "arity": -3, "function": "bzpopminCommand", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "command_flags": [ "WRITE", "FAST", "BLOCKING" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -2, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Timeout reached and no elements were popped.", "type": "null" }, { "description": "The keyname, popped member, and its score.", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "Keyname", "type": "string" }, { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double" } ] } } hotkeys-reset.json000066400000000746152345610730010264 0ustar00{ "RESET": { "summary": "Release the resources used for hotkey tracking.", "complexity": "O(1)", "group": "server", "since": "8.6.0", "arity": 2, "container": "HOTKEYS", "function": "hotkeysCommand", "command_flags": [ "ADMIN", "NOSCRIPT" ], "command_tips": [ "REQUEST_POLICY:SPECIAL" ], "reply_schema": { "const": "OK" } } } cluster-replicas.json000066400000001652152345610730010734 0ustar00{ "REPLICAS": { "summary": "Lists the replica nodes of a master node.", "complexity": "O(N) where N is the number of replicas.", "group": "cluster", "since": "5.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "ADMIN", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "arguments": [ { "name": "node-id", "type": "string" } ], "reply_schema": { "description": "a list of replica nodes replicating from the specified master node provided in the same format used by CLUSTER NODES", "type": "array", "items": { "type": "string", "description": "the serialized cluster configuration" } } } } bzmpop.json000066400000007402152345610730006761 0ustar00{ "BZMPOP": { "summary": "Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.", "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.", "group": "sorted_set", "since": "7.0.0", "arity": -5, "function": "bzmpopCommand", "get_keys_function": "blmpopGetKeys", "command_flags": [ "WRITE", "BLOCKING" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "oneOf": [ { "description": "Timeout reached and no elements were popped.", "type": "null" }, { "description": "The keyname and the popped members.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Keyname", "type": "string" }, { "description": "Popped members and their scores.", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } } ] } ] }, "arguments": [ { "name": "timeout", "type": "double" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } } pttl.json000066400000003357152345610730006442 0ustar00{ "PTTL": { "summary": "Returns the expiration time in milliseconds of a key.", "complexity": "O(1)", "group": "generic", "since": "2.6.0", "arity": 2, "function": "pttlCommand", "history": [ [ "2.8.0", "Added the -2 reply." ] ], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "TTL in milliseconds.", "type": "integer", "minimum": 0 }, { "description": "The key exists but has no associated expire.", "const": -1 }, { "description": "The key does not exist.", "const": -2 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } slowlog-len.json000066400000001247152345610730007715 0ustar00{ "LEN": { "summary": "Returns the number of entries in the slow log.", "complexity": "O(1)", "group": "server", "since": "2.2.12", "arity": 2, "container": "SLOWLOG", "function": "slowlogCommand", "command_flags": [ "ADMIN", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:AGG_SUM", "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "type": "integer", "description": "Number of entries in the slow log.", "minimum": 0 } } } restore.json000066400000005520152345610730007134 0ustar00{ "RESTORE": { "summary": "Creates a key from the serialized representation of a value.", "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).", "group": "generic", "since": "2.6.0", "arity": -4, "function": "restoreCommand", "history": [ [ "3.0.0", "Added the `REPLACE` modifier." ], [ "5.0.0", "Added the `ABSTTL` modifier." ], [ "5.0.0", "Added the `IDLETIME` and `FREQ` options." ] ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "ttl", "type": "integer" }, { "name": "serialized-value", "type": "string" }, { "name": "replace", "token": "REPLACE", "type": "pure-token", "optional": true, "since": "3.0.0" }, { "name": "absttl", "token": "ABSTTL", "type": "pure-token", "optional": true, "since": "5.0.0" }, { "token": "IDLETIME", "name": "seconds", "type": "integer", "optional": true, "since": "5.0.0" }, { "token": "FREQ", "name": "frequency", "type": "integer", "optional": true, "since": "5.0.0" } ] } } echo.json000066400000001155152345610730006367 0ustar00{ "ECHO": { "summary": "Returns the given string.", "complexity": "O(1)", "group": "connection", "since": "1.0.0", "arity": 2, "function": "echoCommand", "command_flags": [ "LOADING", "STALE", "FAST" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "description": "The given string", "type": "string" }, "arguments": [ { "name": "message", "type": "string" } ] } } scan.json000066400000004012152345610730006370 0ustar00{ "SCAN": { "summary": "Iterates over the key names in the database.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "generic", "since": "2.8.0", "arity": -2, "function": "scanCommand", "history": [ [ "6.0.0", "Added the `TYPE` subcommand." ] ], "command_flags": [ "READONLY", "TOUCHES_ARBITRARY_KEYS" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:SPECIAL", "RESPONSE_POLICY:SPECIAL" ], "arguments": [ { "name": "cursor", "type": "integer" }, { "token": "MATCH", "name": "pattern", "type": "pattern", "optional": true }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true }, { "token": "TYPE", "name": "type", "type": "string", "optional": true, "since": "6.0.0" } ], "reply_schema": { "description": "cursor and scan response in array form", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "cursor", "type": "string" }, { "description": "list of keys", "type": "array", "items": { "type": "string" } } ] } } } hpexpire.json000066400000006717152345610730007306 0ustar00{ "HPEXPIRE": { "summary": "Set expiry for hash field using relative time to expire (milliseconds)", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -6, "function": "hpexpireCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "Specified NX | XX | GT | LT condition not met", "const": 0 }, { "description": "Expiration time was set or updated.", "const": 1 }, { "description": "Field deleted because the specified expiration time is in the past.", "const": 2 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "milliseconds", "type": "integer" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } }sentinel-master.json000066400000001345152345610730010564 0ustar00{ "MASTER": { "summary": "Returns the state of a master Redis instance.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "object", "description": "The state and info of the specified master.", "additionalProperties": { "type": "string" } }, "arguments": [ { "name": "master-name", "type": "string" } ] } } sentinel-monitor.json000066400000001475152345610730010764 0ustar00{ "MONITOR": { "summary": "Starts monitoring.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 6, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "name", "type": "string" }, { "name": "ip", "type": "string" }, { "name": "port", "type": "integer" }, { "name": "quorum", "type": "integer" } ] } } zcount.json000066400000002710152345610730006771 0ustar00{ "ZCOUNT": { "summary": "Returns the count of members in a sorted set that have scores within a range.", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "group": "sorted_set", "since": "2.0.0", "arity": 4, "function": "zcountCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The number of elements in the specified score range", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "double" }, { "name": "max", "type": "double" } ] } } zrevrangebylex.json000066400000004502152345610730010517 0ustar00{ "ZREVRANGEBYLEX": { "summary": "Returns members in a sorted set within a lexicographical range in reverse order.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).", "group": "sorted_set", "since": "2.8.9", "arity": -4, "function": "zrevrangebylexCommand", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` and `BYLEX` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List of the elements in the specified score range.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "max", "type": "string" }, { "name": "min", "type": "string" }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] } ] } } setnx.json000066400000003163152345610730006613 0ustar00{ "SETNX": { "summary": "Set the string value of a key only when the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 3, "function": "setnxCommand", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `NX` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "OW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The key was set.", "const": 0 }, { "description": "The key was not set.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] } } blmpop.json000066400000006211152345610730006740 0ustar00{ "BLMPOP": { "summary": "Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.", "group": "list", "since": "7.0.0", "arity": -5, "function": "blmpopCommand", "get_keys_function": "blmpopGetKeys", "command_flags": [ "WRITE", "BLOCKING" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "oneOf": [ { "description": "Operation timed-out", "type": "null" }, { "description": "The key from which elements were popped and the popped elements", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "List key from which elements were popped.", "type": "string" }, { "description": "Array of popped elements.", "type": "array", "minItems": 1, "items": { "type": "string" } } ] } ] }, "arguments": [ { "name": "timeout", "type": "double" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } } latency-history.json000066400000002635152345610730010613 0ustar00{ "HISTORY": { "summary": "Returns timestamp-latency samples for an event.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 3, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "array", "description": "An array where each element is a two elements array representing the timestamp and the latency of the event.", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "timestamp of the event", "type": "integer", "minimum": 0 }, { "description": "latency of the event", "type": "integer", "minimum": 0 } ] } }, "arguments": [ { "name": "event", "type": "string" } ] } } zremrangebyscore.json000066400000003005152345610730011026 0ustar00{ "ZREMRANGEBYSCORE": { "summary": "Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.", "group": "sorted_set", "since": "1.2.0", "arity": 4, "function": "zremrangebyscoreCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of elements removed." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "double" }, { "name": "max", "type": "double" } ] } } smismember.json000066400000003512152345610730007613 0ustar00{ "SMISMEMBER": { "summary": "Determines whether multiple members belong to a set.", "complexity": "O(N) where N is the number of elements being checked for membership", "group": "set", "since": "6.2.0", "arity": -3, "function": "smismemberCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List representing the membership of the given elements, in the same order as they are requested.", "minItems": 1, "items": { "oneOf": [ { "const": 0, "description": "Not a member of the set or the key does not exist." }, { "const": 1, "description": "A member of the set." } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true } ] } } lolwut.json000066400000001226152345610730006776 0ustar00{ "LOLWUT": { "summary": "Displays computer art and the Redis version", "group": "server", "since": "5.0.0", "arity": -1, "function": "lolwutCommand", "command_flags": [ "READONLY", "FAST" ], "reply_schema": { "type": "string", "description": "String containing the generative computer art, and a text with the Redis version." }, "arguments": [ { "token": "VERSION", "name": "version", "type": "integer", "optional": true } ] } } zinterstore.json000066400000006124152345610730010042 0ustar00{ "ZINTERSTORE": { "summary": "Stores the intersect of multiple sorted sets in a key.", "complexity": "O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.", "group": "sorted_set", "since": "2.0.0", "arity": -4, "function": "zinterstoreCommand", "get_keys_function": "zunionInterDiffStoreGetKeys", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "description": "Number of elements in the resulting sorted set.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true }, { "token": "WEIGHTS", "name": "weight", "type": "integer", "optional": true, "multiple": true }, { "token": "AGGREGATE", "name": "aggregate", "type": "oneof", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "token": "SUM" }, { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] } ] } } srandmember.json000066400000004523152345610730007752 0ustar00{ "SRANDMEMBER": { "summary": "Get one or multiple random members from a set", "complexity": "Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count.", "group": "set", "since": "1.0.0", "arity": -2, "function": "srandmemberCommand", "history": [ [ "2.6.0", "Added the optional `count` argument." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true, "since": "2.6.0" } ], "reply_schema": { "oneOf": [ { "description": "In case `count` is not given and key doesn't exist", "type": "null" }, { "description": "In case `count` is not given, randomly selected element", "type": "string" }, { "description": "In case `count` is given, an array of elements", "type": "array", "items": { "type": "string" }, "minItems": 1 }, { "description": "In case `count` is given and key doesn't exist", "type": "array", "maxItems": 0 } ] } } } hotkeys-stop.json000066400000000716152345610730010124 0ustar00{ "STOP": { "summary": "Stops hotkeys tracking.", "complexity": "O(1)", "group": "server", "since": "8.6.0", "arity": 2, "container": "HOTKEYS", "function": "hotkeysCommand", "command_flags": [ "ADMIN", "NOSCRIPT" ], "command_tips": [ "REQUEST_POLICY:SPECIAL" ], "reply_schema": { "const": "OK" } } } client-tracking.json000066400000004364152345610730010534 0ustar00{ "TRACKING": { "summary": "Controls server-assisted client-side caching for the connection.", "complexity": "O(1). Some options may introduce additional complexity.", "group": "connection", "since": "6.0.0", "arity": -3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "arguments": [ { "name": "status", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "token": "ON" }, { "name": "off", "type": "pure-token", "token": "OFF" } ] }, { "token": "REDIRECT", "name": "client-id", "type": "integer", "optional": true }, { "token": "PREFIX", "name": "prefix", "type": "string", "optional": true, "multiple": true, "multiple_token": true }, { "name": "BCAST", "token": "BCAST", "type": "pure-token", "optional": true }, { "name": "OPTIN", "token": "OPTIN", "type": "pure-token", "optional": true }, { "name": "OPTOUT", "token": "OPTOUT", "type": "pure-token", "optional": true }, { "name": "NOLOOP", "token": "NOLOOP", "type": "pure-token", "optional": true } ], "reply_schema": { "description": "if the client was successfully put into or taken out of tracking mode", "const": "OK" } } } evalsha.json000066400000003414152345610730007074 0ustar00{ "EVALSHA": { "summary": "Executes a server-side Lua script by SHA1 digest.", "complexity": "Depends on the script that is executed.", "group": "scripting", "since": "2.6.0", "arity": -3, "function": "evalShaCommand", "get_keys_function": "evalGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "MAY_REPLICATE", "NO_MANDATORY_KEYS", "STALE" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "sha1", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the script that is executed" } } } hget.json000066400000002762152345610730006405 0ustar00{ "HGET": { "summary": "Returns the value of a field in a hash.", "complexity": "O(1)", "group": "hash", "since": "2.0.0", "arity": 3, "function": "hgetCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The value associated with the field.", "type": "string" }, { "description": "If the field is not present in the hash or key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" } ] } } replicaof.json000066400000003455152345610730007422 0ustar00{ "REPLICAOF": { "summary": "Configures a server as replica of another, or promotes it to a master.", "complexity": "O(1)", "group": "server", "since": "5.0.0", "arity": 3, "function": "replicaofCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "STALE" ], "arguments": [ { "name": "args", "type": "oneof", "arguments": [ { "name": "host-port", "type": "block", "arguments": [ { "name": "host", "type": "string" }, { "name": "port", "type": "integer" } ] }, { "name": "no-one", "type": "block", "arguments": [ { "name": "no", "type": "pure-token", "token": "NO" }, { "name": "one", "type": "pure-token", "token": "ONE" } ] } ] } ], "reply_schema": { "description": "replicaOf status", "type": "string", "pattern": "OK*" } } } xrevrange.json000066400000004652152345610730007457 0ustar00{ "XREVRANGE": { "summary": "Returns the messages from a stream within a range of IDs in reverse order.", "complexity": "O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).", "group": "stream", "since": "5.0.0", "arity": -4, "function": "xrevrangeCommand", "history": [ [ "6.2.0", "Added exclusive ranges." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "end", "type": "string" }, { "name": "start", "type": "string" }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ], "reply_schema": { "description": "An array of the entries with IDs matching the specified range", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Stream id", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Array of field-value pairs", "type": "array", "items": { "type": "string" } } ] } } } } copy.json000066400000004556152345610730006433 0ustar00{ "COPY": { "summary": "Copies the value of a key to a new key.", "complexity": "O(N) worst case for collections, where N is the number of nested items. O(1) for string values.", "group": "generic", "since": "6.2.0", "arity": -3, "function": "copyCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 }, { "token": "DB", "name": "destination-db", "type": "integer", "optional": true }, { "name": "replace", "token": "REPLACE", "type": "pure-token", "optional": true } ], "reply_schema": { "oneOf": [ { "description": "source was copied", "const": 1 }, { "description": "source was not copied", "const": 0 } ] } } } pexpiretime.json000066400000003147152345610730010007 0ustar00{ "PEXPIRETIME": { "summary": "Returns the expiration time of a key as a Unix milliseconds timestamp.", "complexity": "O(1)", "group": "generic", "since": "7.0.0", "arity": 2, "function": "pexpiretimeCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "integer", "description": "Expiration Unix timestamp in milliseconds.", "minimum": 0 }, { "const": -1, "description": "The key exists but has no associated expiration time." }, { "const": -2, "description": "The key does not exist." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } bgrewriteaof.json000066400000001045152345610730010127 0ustar00{ "BGREWRITEAOF": { "summary": "Asynchronously rewrites the append-only file to disk.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": 1, "function": "bgrewriteaofCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT" ], "reply_schema": { "description": "A simple string reply indicating that the rewriting started or is about to start ASAP", "type": "string" } } } pubsub-channels.json000066400000001621152345610730010540 0ustar00{ "CHANNELS": { "summary": "Returns the active channels.", "complexity": "O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)", "group": "pubsub", "since": "2.8.0", "arity": -2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE" ], "arguments": [ { "name": "pattern", "type": "pattern", "optional": true } ], "reply_schema": { "description": "a list of active channels, optionally matching the specified pattern", "type": "array", "uniqueItems": true, "items": { "type": "string" } } } } geopos.json000066400000004352152345610730006747 0ustar00{ "GEOPOS": { "summary": "Returns the longitude and latitude of members from a geospatial index.", "complexity": "O(1) for each member requested.", "group": "geo", "since": "3.2.0", "arity": -2, "function": "geoposCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true, "optional": true } ], "reply_schema": { "description": "An array where each element is a two elements array representing longitude and latitude (x,y) of each member name passed as argument to the command", "type": "array", "items": { "oneOf": [ { "description": "Element does not exist", "type": "null" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Latitude (x)", "type": "number" }, { "description": "Longitude (y)", "type": "number" } ] } ] } } } } touch.json000066400000002632152345610730006574 0ustar00{ "TOUCH": { "summary": "Returns the number of existing keys out of those specified after updating the time they were last accessed.", "complexity": "O(N) where N is the number of keys that will be touched.", "group": "generic", "since": "3.2.1", "arity": -2, "function": "touchCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:AGG_SUM" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ], "reply_schema": { "description": "the number of touched keys", "type": "integer", "minimum": 0 } } } lindex.json000066400000003104152345610730006730 0ustar00{ "LINDEX": { "summary": "Returns an element from a list by its index.", "complexity": "O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).", "group": "list", "since": "1.0.0", "arity": 3, "function": "lindexCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "Index is out of range" }, { "description": "The requested element", "type": "string" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "index", "type": "integer" } ] } } sentinel-set.json000066400000001770152345610730010066 0ustar00{ "SET": { "summary": "Changes the configuration of a monitored Redis master.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": -5, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "master-name", "type": "string" }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "option", "type": "string" }, { "name": "value", "type": "string" } ] } ] } } subscribe.json000066400000001212152345610730007424 0ustar00{ "SUBSCRIBE": { "summary": "Listens for messages published to channels.", "complexity": "O(N) where N is the number of channels to subscribe to.", "group": "pubsub", "since": "2.0.0", "arity": -2, "function": "subscribeCommand", "history": [], "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE", "SENTINEL", "DENYOOM" ], "arguments": [ { "name": "channel", "type": "string", "multiple": true } ] } } latency.json000066400000000331152345610730007103 0ustar00{ "LATENCY": { "summary": "A container for latency diagnostics commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "2.8.13", "arity": -2 } } bgsave.json000066400000001727152345610730006725 0ustar00{ "BGSAVE": { "summary": "Asynchronously saves the database(s) to disk.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": -1, "function": "bgsaveCommand", "history": [ [ "3.2.2", "Added the `SCHEDULE` option." ] ], "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT" ], "arguments": [ { "name": "schedule", "token": "SCHEDULE", "type": "pure-token", "optional": true, "since": "3.2.2" } ], "reply_schema": { "oneOf": [ { "const": "Background saving started" }, { "const": "Background saving scheduled" } ] } } } append.json000066400000003043152345610730006716 0ustar00{ "APPEND": { "summary": "Appends a string to the value of a key. Creates the key if it doesn't exist.", "complexity": "O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.", "group": "string", "since": "2.0.0", "arity": 3, "function": "appendCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The length of the string after the append operation." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] } } function-help.json000066400000001157152345610730010226 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "scripting", "since": "7.0.0", "arity": 2, "container": "FUNCTION", "function": "functionHelpCommand", "command_flags": [ "LOADING", "STALE" ], "acl_categories": [ "SCRIPTING" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } brpop.json000066400000004402152345610730006571 0ustar00{ "BRPOP": { "summary": "Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "complexity": "O(N) where N is the number of provided keys.", "group": "list", "since": "2.0.0", "arity": -3, "function": "brpopCommand", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "command_flags": [ "WRITE", "BLOCKING" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -2, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double" } ], "reply_schema": { "oneOf": [ { "description": "No element could be popped and the timeout expired.", "type": "null" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "The name of the key where an element was popped ", "type": "string" }, { "description": "The value of the popped element", "type": "string" } ] } ] } } } spublish.json000066400000002702152345610730007301 0ustar00{ "SPUBLISH": { "summary": "Post a message to a shard channel", "complexity": "O(N) where N is the number of clients subscribed to the receiving shard channel.", "group": "pubsub", "since": "7.0.0", "arity": 3, "function": "spublishCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE", "FAST", "MAY_REPLICATE" ], "arguments": [ { "name": "shardchannel", "type": "string" }, { "name": "message", "type": "string" } ], "key_specs": [ { "flags": [ "NOT_KEY" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "the number of clients that received the message. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count", "type": "integer", "minimum": 0 } } } srem.json000066400000003103152345610730006412 0ustar00{ "SREM": { "summary": "Removes one or more members from a set. Deletes the set if the last member was removed.", "complexity": "O(N) where N is the number of members to be removed.", "group": "set", "since": "1.0.0", "arity": -3, "function": "sremCommand", "history": [ [ "2.4.0", "Accepts multiple `member` arguments." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of members that were removed from the set, not including non existing members.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true } ] } } psync.json000066400000001067152345610730006607 0ustar00{ "PSYNC": { "summary": "An internal command used in replication.", "group": "server", "since": "2.8.0", "arity": -3, "function": "syncCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NO_MULTI", "NOSCRIPT" ], "arguments": [ { "name": "replicationid", "type": "string" }, { "name": "offset", "type": "integer" } ] } } incrby.json000066400000002560152345610730006740 0ustar00{ "INCRBY": { "summary": "Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 3, "function": "incrbyCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The value of the key after incrementing it." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "increment", "type": "integer" } ] } } xcfgset.json000066400000004142152345610730007113 0ustar00{ "XCFGSET": { "summary": "Sets the IDMP configuration parameters for a stream.", "complexity": "O(1)", "group": "stream", "since": "8.6.0", "arity": -2, "function": "xcfgsetCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "reply_schema": { "const": "OK" }, "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "idmp-duration-block", "type": "block", "optional": true, "arguments": [ { "name": "idmp-duration-token", "type": "pure-token", "token": "IDMP-DURATION" }, { "name": "duration", "type": "integer" } ] }, { "name": "idmp-maxsize-block", "type": "block", "optional": true, "arguments": [ { "name": "idmp-maxsize-token", "type": "pure-token", "token": "IDMP-MAXSIZE" }, { "name": "maxsize", "type": "integer" } ] } ] } } acl-genpass.json000066400000001576152345610730007655 0ustar00{ "GENPASS": { "summary": "Generates a pseudorandom, secure password that can be used to identify ACL users.", "complexity": "O(1)", "group": "server", "since": "6.0.0", "arity": -2, "container": "ACL", "function": "aclCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "type": "string", "description": "Pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If `bits` was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4." }, "arguments": [ { "name": "bits", "type": "integer", "optional": true } ] } } punsubscribe.json000066400000001253152345610730010154 0ustar00{ "PUNSUBSCRIBE": { "summary": "Stops listening to messages published to channels that match one or more patterns.", "complexity": "O(N) where N is the number of patterns to unsubscribe.", "group": "pubsub", "since": "2.0.0", "arity": -1, "function": "punsubscribeCommand", "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "arguments": [ { "name": "pattern", "type": "pattern", "optional": true, "multiple": true } ] } } zscan.json000066400000004503152345610730006567 0ustar00{ "ZSCAN": { "summary": "Iterates over members and scores of a sorted set.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "sorted_set", "since": "2.8.0", "arity": -3, "function": "zscanCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer" }, { "token": "MATCH", "name": "pattern", "type": "pattern", "optional": true }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ], "reply_schema": { "description": "cursor and scan response in array form", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "cursor", "type": "string" }, { "description": "list of elements of the sorted set, where each even element is the member, and each odd value is its associated score", "type": "array", "items": { "type": "string" } } ] } } } sunionstore.json000066400000003605152345610730010043 0ustar00{ "SUNIONSTORE": { "summary": "Stores the union of multiple sets in a key.", "complexity": "O(N) where N is the total number of elements in all given sets.", "group": "set", "since": "1.0.0", "arity": -3, "function": "sunionstoreCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of the elements in the resulting set.", "minimum": 0 }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true } ] } } cluster-migration.json000066400000012201152345610730011113 0ustar00{ "MIGRATION": { "summary": "Start, monitor and cancel slot migration.", "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", "group": "cluster", "since": "8.4.0", "arity": -4, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "subcommand", "type": "oneof", "arguments": [ { "name": "import", "token": "IMPORT", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer" }, { "name": "end-slot", "type": "integer" } ] }, { "name": "cancel", "token": "CANCEL", "type": "oneof", "arguments": [ { "token": "ID", "name": "task-id", "type": "string" }, { "name": "all", "token": "ALL", "type": "pure-token" } ] }, { "name": "status", "token": "STATUS", "type": "oneof", "arguments": [ { "token": "ID", "name": "task-id", "type": "string", "optional": true }, { "name": "all", "token": "ALL", "type": "pure-token", "optional": true } ] } ] } ], "reply_schema": { "oneOf": [ { "description": "Reply to CLUSTER MIGRATION IMPORT, returns the task ID.", "type": "string" }, { "description": "Reply to CLUSTER MIGRATION CANCEL, number of cancelled migration operations.", "type": "integer" }, { "description": "Reply to CLUSTER MIGRATION STATUS, array of migration operation details.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "slots": { "type": "string" }, "source": { "type": "string" }, "dest": { "type": "string" }, "operation": { "oneOf": [ { "const": "import" }, { "const": "migrate" } ] }, "state": { "type": "string" }, "last_error": { "type": "string" }, "retries": { "type": "integer" }, "create_time": { "type": "integer" }, "start_time": { "type": "integer" }, "end_time": { "type": "integer" }, "write_pause_ms": { "type": "integer" } } } } ] } } } sentinel-ckquorum.json000066400000001367152345610730011143 0ustar00{ "CKQUORUM": { "summary": "Checks for a Redis Sentinel quorum.", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "string", "description": "Returns OK if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover.", "pattern": "OK" }, "arguments": [ { "name": "master-name", "type": "string" } ] } } fcall_ro.json000066400000003515152345610730007234 0ustar00{ "FCALL_RO": { "summary": "Invokes a read-only function.", "complexity": "Depends on the function that is executed.", "group": "scripting", "since": "7.0.0", "arity": -3, "function": "fcallroCommand", "get_keys_function": "functionGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "NO_MANDATORY_KEYS", "STALE", "READONLY" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS", "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "function", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the function that is executed" } } } lpushx.json000066400000003135152345610730006774 0ustar00{ "LPUSHX": { "summary": "Prepends one or more elements to a list only when the list exists.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "group": "list", "since": "2.2.0", "arity": -3, "function": "lpushxCommand", "history": [ [ "4.0.0", "Accepts multiple `element` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "the length of the list after the push operation", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "multiple": true } ] } } xgroup-setid.json000066400000003747152345610730010114 0ustar00{ "SETID": { "summary": "Sets the last-delivered ID of a consumer group.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": -5, "container": "XGROUP", "function": "xgroupCommand", "history": [ [ "7.0.0", "Added the optional `entries_read` argument." ] ], "command_flags": [ "WRITE" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "id", "type": "string" }, { "name": "new-id", "type": "pure-token", "token": "$" } ] }, { "name": "entriesread", "display": "entries-read", "token": "ENTRIESREAD", "type": "integer", "optional": true } ], "reply_schema": { "const": "OK" } } } cluster.json000066400000000323152345610730007126 0ustar00{ "CLUSTER": { "summary": "A container for Redis Cluster commands.", "complexity": "Depends on subcommand.", "group": "cluster", "since": "3.0.0", "arity": -2 } } pubsub-shardchannels.json000066400000001634152345610730011566 0ustar00{ "SHARDCHANNELS": { "summary": "Returns the active shard channels.", "complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels).", "group": "pubsub", "since": "7.0.0", "arity": -2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE" ], "arguments": [ { "name": "pattern", "type": "pattern", "optional": true } ], "reply_schema": { "description": "a list of active channels, optionally matching the specified pattern", "type": "array", "items": { "type": "string" }, "uniqueItems": true } } } fcall.json000066400000003541152345610730006533 0ustar00{ "FCALL": { "summary": "Invokes a function.", "complexity": "Depends on the function that is executed.", "group": "scripting", "since": "7.0.0", "arity": -3, "function": "fcallCommand", "get_keys_function": "functionGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "MAY_REPLICATE", "NO_MANDATORY_KEYS", "STALE" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE", "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "function", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the function that is executed" } } } persist.json000066400000002606152345610730007144 0ustar00{ "PERSIST": { "summary": "Removes the expiration time of a key.", "complexity": "O(1)", "group": "generic", "since": "2.2.0", "arity": 2, "function": "persistCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 0, "description": "Key does not exist or does not have an associated timeout." }, { "const": 1, "description": "The timeout has been removed." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } hotkeys-start.json000066400000004332152345610730010272 0ustar00{ "START": { "summary": "Starts hotkeys tracking.", "complexity": "O(1)", "group": "server", "since": "8.6.0", "arity": -2, "container": "HOTKEYS", "function": "hotkeysCommand", "command_flags": [ "ADMIN", "NOSCRIPT" ], "command_tips": [ "REQUEST_POLICY:SPECIAL" ], "reply_schema": { "const": "OK" }, "arguments": [ { "token": "METRICS", "name": "metrics", "type": "block", "optional": false, "arguments": [ { "name": "count", "type": "integer" }, { "token": "CPU", "name": "cpu", "type": "pure-token", "optional": true }, { "token": "NET", "name": "net", "type": "pure-token", "optional": true } ] }, { "token": "COUNT", "name": "k", "type": "integer", "optional": true }, { "token": "DURATION", "name": "seconds", "type": "integer", "optional": true }, { "token": "SAMPLE", "name": "ratio", "type": "integer", "optional": true }, { "token": "SLOTS", "name": "slots", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer" }, { "name": "slot", "type": "integer", "multiple": true } ] } ] } } client-pause.json000066400000002541152345610730010042 0ustar00{ "PAUSE": { "summary": "Suspends commands processing.", "complexity": "O(1)", "group": "connection", "since": "3.0.0", "arity": -3, "container": "CLIENT", "function": "clientCommand", "history": [ [ "6.2.0", "`CLIENT PAUSE WRITE` mode added along with the `mode` option." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "arguments": [ { "name": "timeout", "type": "integer" }, { "name": "mode", "type": "oneof", "optional": true, "since": "6.2.0", "arguments": [ { "name": "write", "type": "pure-token", "token": "WRITE" }, { "name": "all", "type": "pure-token", "token": "ALL" } ] } ], "reply_schema": { "const": "OK" } } } geosearchstore.json000066400000017303152345610730010470 0ustar00{ "GEOSEARCHSTORE": { "summary": "Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.", "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape", "group": "geo", "since": "6.2.0", "arity": -8, "function": "geosearchstoreCommand", "history": [ [ "7.0.0", "Added support for uppercase unit names." ] ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "source", "type": "key", "key_spec_index": 1 }, { "name": "from", "type": "oneof", "arguments": [ { "token": "FROMMEMBER", "name": "member", "type": "string" }, { "token": "FROMLONLAT", "name": "fromlonlat", "type": "block", "arguments": [ { "name": "longitude", "type": "double" }, { "name": "latitude", "type": "double" } ] } ] }, { "name": "by", "type": "oneof", "arguments": [ { "name": "circle", "type": "block", "arguments": [ { "token": "BYRADIUS", "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] } ] }, { "name": "box", "type": "block", "arguments": [ { "token": "BYBOX", "name": "width", "type": "double" }, { "name": "height", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] } ] } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true } ] }, { "name": "storedist", "token": "STOREDIST", "type": "pure-token", "optional": true } ], "reply_schema": { "description": "the number of elements in the resulting set", "type": "integer" } } } function-kill.json000066400000001132152345610730010222 0ustar00{ "KILL": { "summary": "Terminates a function during execution.", "complexity": "O(1)", "group": "scripting", "since": "7.0.0", "arity": 2, "container": "FUNCTION", "function": "functionKillCommand", "command_flags": [ "NOSCRIPT", "ALLOW_BUSY" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ONE_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } brpoplpush.json000066400000005132152345610730007646 0ustar00{ "BRPOPLPUSH": { "summary": "Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped.", "complexity": "O(1)", "group": "list", "since": "2.2.0", "arity": 4, "function": "brpoplpushCommand", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "deprecated_since": "6.2.0", "replaced_by": "`BLMOVE` with the `RIGHT` and `LEFT` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM", "BLOCKING" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "string", "description": "The element being popped from source and pushed to destination." }, { "type": "null", "description": "Timeout is reached." } ] }, "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 }, { "name": "timeout", "type": "double" } ] } } getbit.json000066400000002567152345610730006737 0ustar00{ "GETBIT": { "summary": "Returns a bit value by offset.", "complexity": "O(1)", "group": "bitmap", "since": "2.2.0", "arity": 3, "function": "getbitCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The bit value stored at offset.", "oneOf": [ { "const": 0 }, { "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer" } ] } } sentinel-get-master-addr-by-name.json000066400000001737152345610730013604 0ustar00{ "GET-MASTER-ADDR-BY-NAME": { "summary": "Returns the port and address of a master Redis instance.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "IP addr or hostname." }, { "type": "string", "description": "Port.", "pattern": "[0-9]+" } ] }, "arguments": [ { "name": "master-name", "type": "string" } ] } } expireat.json000066400000005055152345610730007275 0ustar00{ "EXPIREAT": { "summary": "Sets the expiration time of a key to a Unix timestamp.", "complexity": "O(1)", "group": "generic", "since": "1.2.0", "arity": -3, "function": "expireatCommand", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 1, "description": "The timeout was set." }, { "const": 0, "description": "The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "unix-time-seconds", "type": "unix-time" }, { "name": "condition", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] } ] } } pubsub-numpat.json000066400000001046152345610730010252 0ustar00{ "NUMPAT": { "summary": "Returns a count of unique pattern subscriptions.", "complexity": "O(1)", "group": "pubsub", "since": "2.8.0", "arity": 2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE" ], "reply_schema": { "description": "the number of patterns all the clients are subscribed to", "type": "integer", "minimum": 0 } } } zremrangebyrank.json000066400000003011152345610730010643 0ustar00{ "ZREMRANGEBYRANK": { "summary": "Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.", "group": "sorted_set", "since": "2.0.0", "arity": 4, "function": "zremrangebyrankCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of elements removed." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "stop", "type": "integer" } ] } } getdel.json000066400000002622152345610730006715 0ustar00{ "GETDEL": { "summary": "Returns the string value of a key after deleting the key.", "complexity": "O(1)", "group": "string", "since": "6.2.0", "arity": 2, "function": "getdelCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The value of the key.", "type": "string" }, { "description": "The key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } xinfo-help.json000066400000001137152345610730007522 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 2, "container": "XINFO", "function": "xinfoCommand", "command_flags": [ "LOADING", "STALE" ], "acl_categories": [ "STREAM" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } xdelex.json000066400000006112152345610730006740 0ustar00{ "XDELEX": { "summary": "Deletes one or multiple entries from the stream.", "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.", "group": "stream", "since": "8.2.0", "arity": -5, "function": "xdelexCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "keepref", "type": "pure-token", "token": "KEEPREF" }, { "name": "delref", "type": "pure-token", "token": "DELREF" }, { "name": "acked", "type": "pure-token", "token": "ACKED" } ] }, { "name": "ids", "token": "IDS", "type": "block", "arguments": [ { "name": "numids", "type": "integer" }, { "name": "id", "type": "string", "multiple": true } ] } ], "reply_schema": { "description": "Array of results. Returns an array with -1 for each requested ID if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The id does not exist in the provided stream key.", "const": -1 }, { "description": "Entry was deleted from the stream.", "const": 1 }, { "description": "Entry was not deleted, but there are still dangling references.", "const": 2 } ] } } } } hpttl.json000066400000004654152345610730006613 0ustar00{ "HPTTL": { "summary": "Returns the TTL in milliseconds of a hash field.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -5, "function": "hpttlCommand", "history": [], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "The field exists but has no associated expire.", "const": -1 }, { "description": "TTL in milliseconds.", "type": "integer", "minimum": 1 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } rpoplpush.json000066400000004376152345610730007515 0ustar00{ "RPOPLPUSH": { "summary": "Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped.", "complexity": "O(1)", "group": "list", "since": "1.2.0", "arity": 3, "function": "rpoplpushCommand", "deprecated_since": "6.2.0", "replaced_by": "`LMOVE` with the `RIGHT` and `LEFT` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "string", "description": "The element being popped and pushed." }, { "type": "null", "description": "Source list is empty." } ] }, "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 } ] } } module-help.json000066400000001045152345610730007662 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "5.0.0", "arity": 2, "container": "MODULE", "function": "moduleCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } cluster-getkeysinslot.json000066400000001613152345610730012033 0ustar00{ "GETKEYSINSLOT": { "summary": "Returns the key names in a hash slot.", "complexity": "O(N) where N is the number of requested keys", "group": "cluster", "since": "3.0.0", "arity": 4, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "arguments": [ { "name": "slot", "type": "integer" }, { "name": "count", "type": "integer" } ], "reply_schema": { "description": "an array with up to count elements", "type": "array", "items": { "description": "key name", "type": "string" } } } } script-flush.json000066400000002546152345610730010101 0ustar00{ "FLUSH": { "summary": "Removes all server-side Lua scripts from the script cache.", "complexity": "O(N) with N being the number of scripts in cache", "group": "scripting", "since": "2.6.0", "arity": -2, "container": "SCRIPT", "function": "scriptCommand", "history": [ [ "6.2.0", "Added the `ASYNC` and `SYNC` flushing mode modifiers." ] ], "command_flags": [ "NOSCRIPT" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "since": "6.2.0", "arguments": [ { "name": "async", "type": "pure-token", "token": "ASYNC" }, { "name": "sync", "type": "pure-token", "token": "SYNC" } ] } ], "reply_schema": { "const": "OK" } } } georadiusbymember_ro.json000066400000015225152345610730011661 0ustar00{ "GEORADIUSBYMEMBER_RO": { "summary": "Returns members from a geospatial index that are within a distance from a member.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "group": "geo", "since": "3.2.10", "arity": -5, "function": "georadiusbymemberroCommand", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ], [ "7.0.0", "Added support for uppercase unit names." ] ], "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` with the `BYRADIUS` and `FROMMEMBER` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" }, { "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] }, { "name": "withcoord", "token": "WITHCOORD", "type": "pure-token", "optional": true }, { "name": "withdist", "token": "WITHDIST", "type": "pure-token", "optional": true }, { "name": "withhash", "token": "WITHHASH", "type": "pure-token", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] } ], "reply_schema": { "description": "Array of matched members information", "anyOf": [ { "description": "If no WITH* option is specified, array of matched members names", "type": "array", "items": { "description": "name", "type": "string" } }, { "type": "array", "items": { "type": "array", "minItems": 1, "maxItems": 4, "items": [ { "description": "Matched member name", "type": "string" } ], "additionalItems": { "oneOf": [ { "description": "If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius", "type": "string" }, { "description": "If WITHHASH option is specified, the geohash integer", "type": "integer" }, { "description": "If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "latitude (x)", "type": "number" }, { "description": "longitude (y)", "type": "number" } ] } ] } } } ] } } } cluster-myshardid.json000066400000001020152345610730011103 0ustar00{ "MYSHARDID": { "summary": "Returns the shard ID of a node.", "complexity": "O(1)", "group": "cluster", "since": "7.2.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "history": [], "command_flags": [ "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "the node's shard id", "type": "string" } } } xtrim.json000066400000010627152345610730006620 0ustar00{ "XTRIM": { "summary": "Deletes messages from the beginning of a stream.", "complexity": "O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.", "group": "stream", "since": "5.0.0", "arity": -4, "function": "xtrimCommand", "history": [ [ "6.2.0", "Added the `MINID` trimming strategy and the `LIMIT` option." ], [ "8.2.0", "Added the `KEEPREF`, `DELREF` and `ACKED` options." ] ], "command_flags": [ "WRITE" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "trim", "type": "block", "arguments": [ { "name": "strategy", "type": "oneof", "arguments": [ { "name": "maxlen", "type": "pure-token", "token": "MAXLEN" }, { "name": "minid", "type": "pure-token", "token": "MINID", "since": "6.2.0" } ] }, { "name": "operator", "type": "oneof", "optional": true, "arguments": [ { "name": "equal", "type": "pure-token", "token": "=" }, { "name": "approximately", "type": "pure-token", "token": "~" } ] }, { "name": "threshold", "type": "string" }, { "token": "LIMIT", "name": "count", "type": "integer", "optional": true, "since": "6.2.0" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "keepref", "type": "pure-token", "token": "KEEPREF" }, { "name": "delref", "type": "pure-token", "token": "DELREF" }, { "name": "acked", "type": "pure-token", "token": "ACKED" } ] } ] } ], "reply_schema": { "description": "The number of entries deleted from the stream.", "type": "integer", "minimum": 0 } } } reset.json000066400000001004152345610730006564 0ustar00{ "RESET": { "summary": "Resets the connection.", "complexity": "O(1)", "group": "connection", "since": "6.2.0", "arity": 1, "function": "resetCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "NO_AUTH", "ALLOW_BUSY" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "RESET" } } } client-info.json000066400000001300152345610730007650 0ustar00{ "INFO": { "summary": "Returns information about the connection.", "complexity": "O(1)", "group": "connection", "since": "6.2.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "a unique string, as described at the CLIENT LIST page, for the current client", "type": "string" } } } acl-users.json000066400000001153152345610730007345 0ustar00{ "USERS": { "summary": "Lists all ACL users.", "complexity": "O(N). Where N is the number of configured users.", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "type": "array", "description": "List of existing ACL users", "items": { "type": "string" } } } } select.json000066400000001103152345610730006721 0ustar00{ "SELECT": { "summary": "Changes the selected database.", "complexity": "O(1)", "group": "connection", "since": "1.0.0", "arity": 2, "function": "selectCommand", "command_flags": [ "LOADING", "STALE", "FAST" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "index", "type": "integer" } ] } } lpush.json000066400000003112152345610730006577 0ustar00{ "LPUSH": { "summary": "Prepends one or more elements to a list. Creates the key if it doesn't exist.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "group": "list", "since": "1.0.0", "arity": -3, "function": "lpushCommand", "history": [ [ "2.4.0", "Accepts multiple `element` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Length of the list after the push operations.", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "multiple": true } ] } } cluster-count-failure-reports.json000066400000001436152345610730013403 0ustar00{ "COUNT-FAILURE-REPORTS": { "summary": "Returns the number of active failure reports active for a node.", "complexity": "O(N) where N is the number of failure reports", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "ADMIN", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "arguments": [ { "name": "node-id", "type": "string" } ], "reply_schema": { "description": "the number of active failure reports for the node", "type": "integer", "minimum": 0 } } } zintercard.json000066400000003240152345610730007613 0ustar00{ "ZINTERCARD": { "summary": "Returns the number of members of the intersect of multiple sorted sets.", "complexity": "O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.", "group": "sorted_set", "since": "7.0.0", "arity": -3, "function": "zinterCardCommand", "get_keys_function": "zunionInterDiffGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "description": "Number of elements in the resulting intersection.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "token": "LIMIT", "name": "limit", "type": "integer", "optional": true } ] } } zscore.json000066400000003117152345610730006756 0ustar00{ "ZSCORE": { "summary": "Returns the score of a member in a sorted set.", "complexity": "O(1)", "group": "sorted_set", "since": "1.2.0", "arity": 3, "function": "zscoreCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "number", "description": "The score of the member (a double precision floating point number). In RESP2, this is returned as string." }, { "type": "null", "description": "Member does not exist in the sorted set, or key does not exist." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" } ] } } xack.json000066400000003267152345610730006405 0ustar00{ "XACK": { "summary": "Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.", "complexity": "O(1) for each message ID processed.", "group": "stream", "since": "5.0.0", "arity": -4, "function": "xackCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "ID", "type": "string", "multiple": true } ], "reply_schema": { "description": "The command returns the number of messages successfully acknowledged. Certain message IDs may no longer be part of the PEL (for example because they have already been acknowledged), and XACK will not count them as successfully acknowledged.", "type": "integer", "minimum": 0 } } } function.json000066400000000321152345610730007270 0ustar00{ "FUNCTION": { "summary": "A container for function commands.", "complexity": "Depends on subcommand.", "group": "scripting", "since": "7.0.0", "arity": -2 } } sflush.json000066400000004154152345610730006757 0ustar00{ "SFLUSH": { "summary": "Remove all keys from selected range of slots.", "complexity": "O(N)+O(k) where N is the number of keys and k is the number of slots.", "group": "server", "since": "8.0.0", "arity": -3, "function": "sflushCommand", "command_flags": [ "WRITE", "EXPERIMENTAL" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "command_tips": [ ], "reply_schema": { "description": "List of slot ranges", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "start slot number", "type": "integer" }, { "description": "end slot number", "type": "integer" } ] } }, "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "slot-start", "type": "integer" }, { "name": "slot-last", "type": "integer" } ] }, { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "token": "ASYNC" }, { "name": "sync", "type": "pure-token", "token": "SYNC" } ] } ] } } zrem.json000066400000003213152345610730006423 0ustar00{ "ZREM": { "summary": "Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.", "complexity": "O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.", "group": "sorted_set", "since": "1.2.0", "arity": -3, "function": "zremCommand", "history": [ [ "2.4.0", "Accepts multiple elements." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The number of members removed from the sorted set, not including non existing members.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true } ] } } pexpire.json000066400000005040152345610730007122 0ustar00{ "PEXPIRE": { "summary": "Sets the expiration time of a key in milliseconds.", "complexity": "O(1)", "group": "generic", "since": "2.6.0", "arity": -3, "function": "pexpireCommand", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 0, "description": "The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments." }, { "const": 1, "description": "The timeout was set." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "milliseconds", "type": "integer" }, { "name": "condition", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] } ] } } xgroup.json000066400000000323152345610730006771 0ustar00{ "XGROUP": { "summary": "A container for consumer groups commands.", "complexity": "Depends on subcommand.", "group": "stream", "since": "5.0.0", "arity": -2 } } llen.json000066400000002150152345610730006377 0ustar00{ "LLEN": { "summary": "Returns the length of a list.", "complexity": "O(1)", "group": "list", "since": "1.0.0", "arity": 2, "function": "llenCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "List length.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } zrangebylex.json000066400000004434152345610730010006 0ustar00{ "ZRANGEBYLEX": { "summary": "Returns members in a sorted set within a lexicographical range.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).", "group": "sorted_set", "since": "2.8.9", "arity": -4, "function": "zrangebylexCommand", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `BYLEX` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List of elements in the specified score range.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "string" }, { "name": "max", "type": "string" }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] } ] } } hsetex.json000066400000007571152345610730006761 0ustar00{ "HSETEX": { "summary": "Set the value of one or more fields of a given hash key, and optionally set their expiration.", "complexity": "O(N) where N is the number of fields being set.", "group": "hash", "since": "8.0.0", "arity": -6, "function": "hsetexCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "No field was set (due to FXX or FNX flags).", "const": 0 }, { "description": "All the fields were set.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "fnx", "type": "pure-token", "token": "FNX" }, { "name": "fxx", "type": "pure-token", "token": "FXX" } ] }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "token": "EX" }, { "name": "milliseconds", "type": "integer", "token": "PX" }, { "name": "unix-time-seconds", "type": "unix-time", "token": "EXAT" }, { "name": "unix-time-milliseconds", "type": "unix-time", "token": "PXAT" }, { "name": "keepttl", "type": "pure-token", "token": "KEEPTTL" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string" }, { "name": "value", "type": "string" } ] } ] } ] } } setbit.json000066400000003072152345610730006743 0ustar00{ "SETBIT": { "summary": "Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist.", "complexity": "O(1)", "group": "bitmap", "since": "2.2.0", "arity": 4, "function": "setbitCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The original bit value stored at offset.", "oneOf": [ { "const": 0 }, { "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer" }, { "name": "value", "type": "integer" } ] } } sentinel-remove.json000066400000001046152345610730010564 0ustar00{ "REMOVE": { "summary": "Stops monitoring.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "master-name", "type": "string" } ] } } config-help.json000066400000001051152345610730007637 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "5.0.0", "arity": 2, "container": "CONFIG", "function": "configHelpCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } client-getredir.json000066400000002060152345610730010526 0ustar00{ "GETREDIR": { "summary": "Returns the client ID to which the connection's tracking notifications are redirected.", "complexity": "O(1)", "group": "connection", "since": "6.0.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "oneOf": [ { "const": 0, "description": "Not redirecting notifications to any client." }, { "const": -1, "description": "Client tracking is not enabled." }, { "type": "integer", "description": "ID of the client we are redirecting the notifications to.", "minimum": 1 } ] } } } xackdel.json000066400000006327152345610730007072 0ustar00{ "XACKDEL": { "summary": "Acknowledges and deletes one or multiple messages for a stream consumer group.", "complexity": "O(1) for each message ID processed.", "group": "stream", "since": "8.2.0", "arity": -6, "function": "xackdelCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "UPDATE", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "keepref", "type": "pure-token", "token": "KEEPREF" }, { "name": "delref", "type": "pure-token", "token": "DELREF" }, { "name": "acked", "type": "pure-token", "token": "ACKED" } ] }, { "name": "ids", "token": "IDS", "type": "block", "arguments": [ { "name": "numids", "type": "integer" }, { "name": "id", "type": "string", "multiple": true } ] } ], "reply_schema": { "description": "Array of results. Returns an array with -1 for each requested ID if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The id does not exist in the provided stream key.", "const": -1 }, { "description": "Entry was acknowledged and deleted from the stream.", "const": 1 }, { "description": "Entry was acknowledged but not deleted, there are still dangling references.", "const": 2 } ] } } } } sintercard.json000066400000003202152345610730007602 0ustar00{ "SINTERCARD": { "summary": "Returns the number of members of the intersect of multiple sets.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "group": "set", "since": "7.0.0", "arity": -3, "function": "sinterCardCommand", "get_keys_function": "sintercardGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "description": "Number of the elements in the resulting intersection.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "token": "LIMIT", "name": "limit", "type": "integer", "optional": true } ] } } acl-whoami.json000066400000001033152345610730007465 0ustar00{ "WHOAMI": { "summary": "Returns the authenticated username of the current connection.", "complexity": "O(1)", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "type": "string", "description": "The username of the current connection." } } } zremrangebylex.json000066400000003007152345610730010505 0ustar00{ "ZREMRANGEBYLEX": { "summary": "Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.", "group": "sorted_set", "since": "2.8.9", "arity": 4, "function": "zremrangebylexCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of elements removed." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "string" }, { "name": "max", "type": "string" } ] } } memory-malloc-stats.json000066400000001142152345610730011356 0ustar00{ "MALLOC-STATS": { "summary": "Returns the allocator statistics.", "complexity": "Depends on how much memory is allocated, could be slow", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "string", "description": "The memory allocator's internal statistics report." } } } hdel.json000066400000003017152345610730006364 0ustar00{ "HDEL": { "summary": "Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.", "complexity": "O(N) where N is the number of fields to be removed.", "group": "hash", "since": "2.0.0", "arity": -3, "function": "hdelCommand", "history": [ [ "2.4.0", "Accepts multiple `field` arguments." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The number of fields that were removed from the hash." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "multiple": true } ] } } xsetid.json000066400000003441152345610730006751 0ustar00{ "XSETID": { "summary": "An internal command for replicating stream values.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": -3, "function": "xsetidCommand", "history": [ [ "7.0.0", "Added the `entries_added` and `max_deleted_entry_id` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "last-id", "type": "string" }, { "name": "entries-added", "token": "ENTRIESADDED", "type": "integer", "optional": true, "since": "7.0.0" }, { "name": "max-deleted-id", "token": "MAXDELETEDID", "type": "string", "optional": true, "since": "7.0.0" } ], "reply_schema": { "const": "OK" } } } sunion.json000066400000002625152345610730006767 0ustar00{ "SUNION": { "summary": "Returns the union of multiple sets.", "complexity": "O(N) where N is the total number of elements in all given sets.", "group": "set", "since": "1.0.0", "arity": -2, "function": "sunionCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List with the members of the resulting set.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } lmpop.json000066400000005741152345610730006605 0ustar00{ "LMPOP": { "summary": "Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.", "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.", "group": "list", "since": "7.0.0", "arity": -4, "function": "lmpopCommand", "get_keys_function": "lmpopGetKeys", "command_flags": [ "WRITE" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "anyOf": [ { "description": "If no element could be popped.", "type": "null" }, { "description": "List key from which elements were popped.", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Name of the key from which elements were popped.", "type": "string" }, { "description": "Array of popped elements.", "type": "array", "minItems": 1, "items": { "type": "string" } } ] } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } } client-reply.json000066400000002477152345610730010070 0ustar00{ "REPLY": { "summary": "Instructs the server whether to reply to commands.", "complexity": "O(1)", "group": "connection", "since": "3.2.0", "arity": 3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK", "description": "When called with either OFF or SKIP subcommands, no reply is made. When called with ON, reply is OK." }, "arguments": [ { "name": "action", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "token": "ON" }, { "name": "off", "type": "pure-token", "token": "OFF" }, { "name": "skip", "type": "pure-token", "token": "SKIP" } ] } ] } } rpushx.json000066400000003117152345610730007002 0ustar00{ "RPUSHX": { "summary": "Appends an element to a list only when the list exists.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "group": "list", "since": "2.2.0", "arity": -3, "function": "rpushxCommand", "history": [ [ "4.0.0", "Accepts multiple `element` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Length of the list after the push operation.", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "multiple": true } ] } } hsetnx.json000066400000003227152345610730006764 0ustar00{ "HSETNX": { "summary": "Sets the value of a field in a hash only when the field doesn't exist.", "complexity": "O(1)", "group": "hash", "since": "2.0.0", "arity": 4, "function": "hsetnxCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The field is a new field in the hash and value was set.", "const": 0 }, { "description": "The field already exists in the hash and no operation was performed.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" }, { "name": "value", "type": "string" } ] } } mget.json000066400000003127152345610730006406 0ustar00{ "MGET": { "summary": "Atomically returns the string values of one or more keys.", "complexity": "O(N) where N is the number of keys to retrieve.", "group": "string", "since": "1.0.0", "arity": -2, "function": "mgetCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "STRING" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "List of values at the specified keys.", "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } hmget.json000066400000003221152345610730006551 0ustar00{ "HMGET": { "summary": "Returns the values of all fields in a hash.", "complexity": "O(N) where N is the number of fields being requested.", "group": "hash", "since": "2.0.0", "arity": -3, "function": "hmgetCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "List of values associated with the given fields, in the same order as they are requested.", "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "multiple": true } ] } } hrandfield.json000066400000006047152345610730007556 0ustar00{ "HRANDFIELD": { "summary": "Returns one or more random fields from a hash.", "complexity": "O(N) where N is the number of fields returned", "group": "hash", "since": "6.2.0", "arity": -2, "function": "hrandfieldCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "description": "Key doesn't exist", "type": "null" }, { "description": "A single random field. Returned in case `COUNT` was not used.", "type": "string" }, { "description": "A list of fields. Returned in case `COUNT` was used.", "type": "array", "items": { "type": "string" } }, { "description": "Fields and their values. Returned in case `COUNT` and `WITHVALUES` were used. In RESP2 this is returned as a flat array.", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Field", "type": "string" }, { "description": "Value", "type": "string" } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "options", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer" }, { "name": "withvalues", "token": "WITHVALUES", "type": "pure-token", "optional": true } ] } ] } } replconf.json000066400000001012152345610730007251 0ustar00{ "REPLCONF": { "summary": "An internal command for configuring the replication stream.", "complexity": "O(1)", "group": "server", "since": "3.0.0", "arity": -1, "function": "replconfCommand", "doc_flags": [ "SYSCMD" ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "ALLOW_BUSY" ], "reply_schema": { "const": "OK" } } } module-loadex.json000066400000002456152345610730010215 0ustar00{ "LOADEX": { "summary": "Loads a module using extended parameters.", "complexity": "O(1)", "group": "server", "since": "7.0.0", "arity": -3, "container": "MODULE", "function": "moduleCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "PROTECTED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "path", "type": "string" }, { "name": "configs", "token": "CONFIG", "type": "block", "multiple": true, "multiple_token": true, "optional": true, "arguments": [ { "name": "name", "type": "string" }, { "name": "value", "type": "string" } ] }, { "name": "args", "token": "ARGS", "type": "string", "multiple": true, "optional": true } ] } } zpopmin.json000066400000005420152345610730007144 0ustar00{ "ZPOPMIN": { "summary": "Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "group": "sorted_set", "since": "5.0.0", "arity": -2, "function": "zpopminCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "type": "array", "description": "List of popped elements and scores when 'COUNT' isn't specified.", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Popped element." }, { "type": "number", "description": "Score." } ] }, { "type": "array", "description": "List of popped elements and scores when 'COUNT' is specified.", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Popped element." }, { "type": "number", "description": "Score." } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true } ] } } memory-help.json000066400000001045152345610730007705 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } slowlog-get.json000066400000004525152345610730007720 0ustar00{ "GET": { "summary": "Returns the slow log's entries.", "complexity": "O(N) where N is the number of entries returned", "group": "server", "since": "2.2.12", "arity": -2, "container": "SLOWLOG", "function": "slowlogCommand", "history": [ [ "4.0.0", "Added client IP address, port and name to the reply." ] ], "command_flags": [ "ADMIN", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "type": "array", "description": "Entries from the slow log in chronological order.", "uniqueItems": true, "items": { "type": "array", "minItems": 6, "maxItems": 6, "items": [ { "type": "integer", "description": "Slow log entry ID." }, { "type": "integer", "description": "The unix timestamp at which the logged command was processed.", "minimum": 0 }, { "type": "integer", "description": "The amount of time needed for its execution, in microseconds.", "minimum": 0 }, { "type": "array", "description": "The arguments of the command.", "items": { "type": "string" } }, { "type": "string", "description": "Client IP address and port." }, { "type": "string", "description": "Client name if set via the CLIENT SETNAME command." } ] } }, "arguments": [ { "name": "count", "type": "integer", "optional": true } ] } } latency-graph.json000066400000001410152345610730010201 0ustar00{ "GRAPH": { "summary": "Returns a latency graph for an event.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 3, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], "arguments": [ { "name": "event", "type": "string" } ], "reply_schema": { "type": "string", "description": "Latency graph" } } } hgetdel.json000066400000004057152345610730007071 0ustar00{ "HGETDEL": { "summary": "Returns the value of a field and deletes it from the hash.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "8.0.0", "arity": -5, "function": "hgetdelCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "List of values associated with the given fields, in the same order as they are requested.", "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } sentinel-sentinels.json000066400000001526152345610730011276 0ustar00{ "SENTINELS": { "summary": "Returns a list of Sentinel instances.", "complexity": "O(N) where N is the number of Sentinels", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "List of sentinel instances, and their state.", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "arguments": [ { "name": "master-name", "type": "string" } ] } } incrbyfloat.json000066400000002576152345610730007775 0ustar00{ "INCRBYFLOAT": { "summary": "Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "2.6.0", "arity": 3, "function": "incrbyfloatCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "string", "description": "The value of the key after incrementing it." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "increment", "type": "double" } ] } } multi.json000066400000000754152345610730006607 0ustar00{ "MULTI": { "summary": "Starts a transaction.", "complexity": "O(1)", "group": "transactions", "since": "1.2.0", "arity": 1, "function": "multiCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "ALLOW_BUSY" ], "acl_categories": [ "TRANSACTION" ], "reply_schema": { "const": "OK" } } } command-getkeysandflags.json000066400000003122152345610730012234 0ustar00{ "GETKEYSANDFLAGS": { "summary": "Extracts the key names and access flags for an arbitrary command.", "complexity": "O(N) where N is the number of arguments to the command", "group": "server", "since": "7.0.0", "arity": -3, "container": "COMMAND", "function": "commandGetKeysAndFlagsCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "description": "List of keys from the given Redis command and their usage flags.", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Key name", "type": "string" }, { "description": "Set of key flags", "type": "array", "minItems": 1, "items": { "type": "string" } } ] } }, "arguments": [ { "name": "command", "type": "string" }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ] } } hpexpireat.json000066400000006742152345610730007631 0ustar00{ "HPEXPIREAT": { "summary": "Set expiry for hash field using an absolute Unix timestamp (milliseconds)", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -6, "function": "hpexpireatCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "Specified NX | XX | GT | LT condition not met", "const": 0 }, { "description": "Expiration time was set or updated.", "const": 1 }, { "description": "Field deleted because the specified expiration time is in the past.", "const": 2 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "unix-time-milliseconds", "type": "unix-time" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } }zdiff.json000066400000005177152345610730006563 0ustar00{ "ZDIFF": { "summary": "Returns the difference between multiple sorted sets.", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "group": "sorted_set", "since": "6.2.0", "arity": -3, "function": "zdiffCommand", "get_keys_function": "zunionInterDiffGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "anyOf": [ { "description": "A list of members. Returned in case `WITHSCORES` was not used.", "type": "array", "items": { "type": "string" } }, { "description": "Members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } } dump.json000066400000003241152345610730006414 0ustar00{ "DUMP": { "summary": "Returns a serialized representation of the value stored at a key.", "complexity": "O(1) to access the key and additional O(N*M) to serialize it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1).", "group": "generic", "since": "2.6.0", "arity": 2, "function": "dumpCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The serialized value.", "type": "string" }, { "description": "Key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } waitaof.json000066400000002713152345610730007104 0ustar00{ "WAITAOF": { "summary": "Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.", "complexity": "O(1)", "group": "generic", "since": "7.2.0", "arity": 4, "function": "waitaofCommand", "command_flags": [ "BLOCKING" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:AGG_MIN" ], "reply_schema": { "type": "array", "description": "Number of local and remote AOF files in sync.", "minItems": 2, "maxItems": 2, "items": [ { "description": "Number of local AOF files.", "type": "integer", "minimum": 0 }, { "description": "Number of replica AOF files.", "type": "number", "minimum": 0 } ] }, "arguments": [ { "name": "numlocal", "type": "integer" }, { "name": "numreplicas", "type": "integer" }, { "name": "timeout", "type": "integer" } ] } } pubsub.json000066400000000313152345610730006744 0ustar00{ "PUBSUB": { "summary": "A container for Pub/Sub commands.", "complexity": "Depends on subcommand.", "group": "pubsub", "since": "2.8.0", "arity": -2 } } cluster-slaves.json000066400000002065152345610730010426 0ustar00{ "SLAVES": { "summary": "Lists the replica nodes of a master node.", "complexity": "O(N) where N is the number of replicas.", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "deprecated_since": "5.0.0", "replaced_by": "`CLUSTER REPLICAS`", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "ADMIN", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "arguments": [ { "name": "node-id", "type": "string" } ], "reply_schema": { "description": "a list of replica nodes replicating from the specified master node provided in the same format used by CLUSTER NODES", "type": "array", "items": { "type": "string", "description": "the serialized cluster configuration" } } } } rpush.json000066400000003143152345610730006611 0ustar00{ "RPUSH": { "summary": "Appends one or more elements to a list. Creates the key if it doesn't exist.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "group": "list", "since": "1.0.0", "arity": -3, "function": "rpushCommand", "history": [ [ "2.4.0", "Accepts multiple `element` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Length of the list after the push operations.", "type": "integer", "minimum": 1 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "multiple": true } ] } } client-unblock.json000066400000003063152345610730010362 0ustar00{ "UNBLOCK": { "summary": "Unblocks a client blocked by a blocking command from a different connection.", "complexity": "O(log N) where N is the number of client connections", "group": "connection", "since": "5.0.0", "arity": -3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "oneOf": [ { "const": 0, "description": "if the client was unblocked successfully" }, { "const": 1, "description": "if the client wasn't unblocked" } ] }, "arguments": [ { "name": "client-id", "type": "integer" }, { "name": "unblock-type", "type": "oneof", "optional": true, "arguments": [ { "name": "timeout", "type": "pure-token", "token": "TIMEOUT" }, { "name": "error", "type": "pure-token", "token": "ERROR" } ] } ] } } client-unpause.json000066400000001115152345610730010401 0ustar00{ "UNPAUSE": { "summary": "Resumes processing commands from paused clients.", "complexity": "O(N) Where N is the number of paused clients", "group": "connection", "since": "6.2.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" } } } memory-stats.json000066400000010277152345610730010122 0ustar00{ "STATS": { "summary": "Returns details about memory usage.", "complexity": "O(1)", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "description": "memory usage details", "type": "object", "additionalProperties": false, "properties": { "peak.allocated": { "type": "integer" }, "total.allocated": { "type": "integer" }, "startup.allocated": { "type": "integer" }, "replication.backlog": { "type": "integer" }, "replica.fullsync.buffer": { "type": "integer" }, "clients.slaves": { "type": "integer" }, "clients.normal": { "type": "integer" }, "cluster.links": { "type": "integer" }, "aof.buffer": { "type": "integer" }, "lua.caches": { "type": "integer" }, "script.VMs": { "type": "integer" }, "functions.caches": { "type": "integer" }, "overhead.db.hashtable.lut": { "type": "integer" }, "overhead.db.hashtable.rehashing": { "type": "integer" }, "overhead.total": { "type": "integer" }, "db.dict.rehashing.count": { "type": "integer" }, "keys.count": { "type": "integer" }, "keys.bytes-per-key": { "type": "integer" }, "dataset.bytes": { "type": "integer" }, "dataset.percentage": { "type": "number" }, "peak.percentage": { "type": "number" }, "allocator.allocated": { "type": "integer" }, "allocator.active": { "type": "integer" }, "allocator.resident": { "type": "integer" }, "allocator.muzzy": { "type": "integer" }, "allocator-fragmentation.ratio": { "type": "number" }, "allocator-fragmentation.bytes": { "type": "integer" }, "allocator-rss.ratio": { "type": "number" }, "allocator-rss.bytes": { "type": "integer" }, "rss-overhead.ratio": { "type": "number" }, "rss-overhead.bytes": { "type": "integer" }, "fragmentation": { "type": "number" }, "fragmentation.bytes": { "type": "integer" } }, "patternProperties": { "^db\\.\\d+$": { "type": "object", "properties": { "overhead.hashtable.main": { "type": "integer" }, "overhead.hashtable.expires": { "type": "integer" } }, "additionalProperties": false } } } } } client-kill.json000066400000014442152345610730007663 0ustar00{ "KILL": { "summary": "Terminates open connections.", "complexity": "O(N) where N is the number of client connections", "group": "connection", "since": "2.4.0", "arity": -3, "container": "CLIENT", "function": "clientCommand", "history": [ [ "2.8.12", "Added new filter format." ], [ "2.8.12", "`ID` option." ], [ "3.2.0", "Added `master` type in for `TYPE` option." ], [ "5.0.0", "Replaced `slave` `TYPE` with `replica`. `slave` still supported for backward compatibility." ], [ "6.2.0", "`LADDR` option." ], [ "7.4.0", "`MAXAGE` option." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "arguments": [ { "name": "filter", "type": "oneof", "arguments": [ { "name": "old-format", "display": "ip:port", "type": "string", "deprecated_since": "2.8.12" }, { "name": "new-format", "type": "oneof", "multiple": true, "arguments": [ { "token": "ID", "name": "client-id", "type": "integer", "optional": true, "since": "2.8.12" }, { "token": "TYPE", "name": "client-type", "type": "oneof", "optional": true, "since": "2.8.12", "arguments": [ { "name": "normal", "type": "pure-token", "token": "normal" }, { "name": "master", "type": "pure-token", "token": "master", "since": "3.2.0" }, { "name": "slave", "type": "pure-token", "token": "slave" }, { "name": "replica", "type": "pure-token", "token": "replica", "since": "5.0.0" }, { "name": "pubsub", "type": "pure-token", "token": "pubsub" } ] }, { "token": "USER", "name": "username", "type": "string", "optional": true }, { "token": "ADDR", "name": "addr", "display": "ip:port", "type": "string", "optional": true }, { "token": "LADDR", "name": "laddr", "display": "ip:port", "type": "string", "optional": true, "since": "6.2.0" }, { "token": "SKIPME", "name": "skipme", "type": "oneof", "optional": true, "arguments": [ { "name": "yes", "type": "pure-token", "token": "YES" }, { "name": "no", "type": "pure-token", "token": "NO" } ] }, { "token": "MAXAGE", "name": "maxage", "type": "integer", "optional": true, "since": "7.4.0" } ] } ] } ], "reply_schema": { "oneOf": [ { "description": "when called in 3 argument format", "const": "OK" }, { "description": "when called in filter/value format, the number of clients killed", "type": "integer", "minimum": 0 } ] } } } digest.json000066400000002664152345610730006736 0ustar00{ "DIGEST": { "summary": "Returns the XXH3 hash of a string value.", "complexity": "O(N) where N is the length of the string value.", "group": "string", "since": "8.4.0", "arity": 2, "function": "digestCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The XXH3 64-bit hash of the string value as a signed integer.", "type": "string" }, { "description": "Key does not exist", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } migrate.json000066400000012312152345610730007076 0ustar00{ "MIGRATE": { "summary": "Atomically transfers a key from one Redis instance to another.", "complexity": "This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.", "group": "generic", "since": "2.6.0", "arity": -6, "function": "migrateCommand", "get_keys_function": "migrateGetKeys", "history": [ [ "3.0.0", "Added the `COPY` and `REPLACE` options." ], [ "3.0.6", "Added the `KEYS` option." ], [ "4.0.7", "Added the `AUTH` option." ], [ "6.0.0", "Added the `AUTH2` option." ] ], "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 3 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "ACCESS", "DELETE", "INCOMPLETE" ], "begin_search": { "keyword": { "keyword": "KEYS", "startfrom": -2 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": "OK", "description": "Success." }, { "const": "NOKEY", "description": "No keys were found in the source instance." } ] }, "arguments": [ { "name": "host", "type": "string" }, { "name": "port", "type": "integer" }, { "name": "key-selector", "type": "oneof", "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "empty-string", "type": "pure-token", "token": "\"\"" } ] }, { "name": "destination-db", "type": "integer" }, { "name": "timeout", "type": "integer" }, { "name": "copy", "token": "COPY", "type": "pure-token", "optional": true, "since": "3.0.0" }, { "name": "replace", "token": "REPLACE", "type": "pure-token", "optional": true, "since": "3.0.0" }, { "name": "authentication", "type": "oneof", "optional": true, "arguments": [ { "token": "AUTH", "name": "auth", "display": "password", "type": "string", "since": "4.0.7" }, { "token": "AUTH2", "name": "auth2", "type": "block", "since": "6.0.0", "arguments": [ { "name": "username", "type": "string" }, { "name": "password", "type": "string" } ] } ] }, { "token": "KEYS", "name": "keys", "display": "key", "type": "key", "key_spec_index": 1, "optional": true, "multiple": true, "since": "3.0.6" } ] } } memory-usage.json000066400000003010152345610730010053 0ustar00{ "USAGE": { "summary": "Estimates the memory usage of a key.", "complexity": "O(N) where N is the number of samples.", "group": "server", "since": "4.0.0", "arity": -3, "container": "MEMORY", "function": "memoryCommand", "command_flags": [ "READONLY" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Number of bytes that a key and its value require to be stored in RAM.", "type": "integer" }, { "description": "Key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "token": "SAMPLES", "name": "count", "type": "integer", "optional": true } ] } } geodist.json000066400000004743152345610730007115 0ustar00{ "GEODIST": { "summary": "Returns the distance between two members of a geospatial index.", "complexity": "O(1)", "group": "geo", "since": "3.2.0", "arity": -4, "function": "geodistCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member1", "type": "string" }, { "name": "member2", "type": "string" }, { "name": "unit", "type": "oneof", "optional": true, "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] } ], "reply_schema": { "oneOf": [ { "description": "one or both of elements are missing", "type": "null" }, { "description": "distance as a double (represented as a string) in the specified units", "type": "string", "pattern": "^[0-9]*(.[0-9]*)?$" } ] } } } hlen.json000066400000002217152345610730006377 0ustar00{ "HLEN": { "summary": "Returns the number of fields in a hash.", "complexity": "O(1)", "group": "hash", "since": "2.0.0", "arity": 2, "function": "hlenCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of the fields in the hash, or 0 when the key does not exist." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } bitop.json000066400000006576152345610730006602 0ustar00{ "BITOP": { "summary": "Performs bitwise operations on multiple strings, and stores the result.", "complexity": "O(N)", "group": "bitmap", "since": "2.6.0", "arity": -4, "function": "bitopCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 3 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "operation", "type": "oneof", "arguments": [ { "name": "and", "type": "pure-token", "token": "AND" }, { "name": "or", "type": "pure-token", "token": "OR" }, { "name": "xor", "type": "pure-token", "token": "XOR" }, { "name": "not", "type": "pure-token", "token": "NOT" }, { "name": "diff", "type": "pure-token", "token": "DIFF" }, { "name": "diff1", "type": "pure-token", "token": "DIFF1" }, { "name": "andor", "type": "pure-token", "token": "ANDOR" }, { "name": "one", "type": "pure-token", "token": "ONE" } ] }, { "name": "destkey", "type": "key", "key_spec_index": 0 }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true } ], "reply_schema": { "description": "the size of the string stored in the destination key, that is equal to the size of the longest input string", "type": "integer", "minimum": 0 } } } client-no-evict.json000066400000002050152345610730010444 0ustar00{ "NO-EVICT": { "summary": "Sets the client eviction mode of the connection.", "complexity": "O(1)", "group": "connection", "since": "7.0.0", "arity": 3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "arguments": [ { "name": "enabled", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "token": "ON" }, { "name": "off", "type": "pure-token", "token": "OFF" } ] } ], "reply_schema": { "const": "OK" } } } move.json000066400000002674152345610730006426 0ustar00{ "MOVE": { "summary": "Moves a key to another database.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 3, "function": "moveCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "db", "type": "integer" } ], "reply_schema": { "oneOf": [ { "description": "key was moved", "const": 1 }, { "description": "key wasn't moved", "const": 0 } ] } } } xdel.json000066400000002621152345610730006404 0ustar00{ "XDEL": { "summary": "Returns the number of messages after removing them from a stream.", "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.", "group": "stream", "since": "5.0.0", "arity": -3, "function": "xdelCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "ID", "type": "string", "multiple": true } ], "reply_schema": { "description": "The number of entries actually deleted", "type": "integer", "minimum": 0 } } } function-stats.json000066400000006316152345610730010436 0ustar00{ "STATS": { "summary": "Returns information about a function during execution.", "complexity": "O(1)", "group": "scripting", "since": "7.0.0", "arity": 2, "container": "FUNCTION", "function": "functionStatsCommand", "command_flags": [ "NOSCRIPT", "ALLOW_BUSY" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "object", "additionalProperties": false, "properties": { "running_script": { "description": "information about the running script.", "oneOf": [ { "description": "If there's no in-flight function", "type": "null" }, { "description": "a map with the information about the running script", "type": "object", "additionalProperties": false, "properties": { "name": { "description": "the name of the function.", "type": "string" }, "command": { "description": "the command and arguments used for invoking the function.", "type": "array", "items": { "type": "string" } }, "duration_ms": { "description": "the function's runtime duration in milliseconds.", "type": "integer" } } } ] }, "engines": { "description": "A map when each entry in the map represent a single engine.", "type": "object", "patternProperties": { "^.*$": { "description": "Engine map contains statistics about the engine", "type": "object", "additionalProperties": false, "properties": { "libraries_count": { "description": "number of libraries", "type": "integer" }, "functions_count": { "description": "number of functions", "type": "integer" } } } } } } } } } acl-load.json000066400000001003152345610730007115 0ustar00{ "LOAD": { "summary": "Reloads the rules from the configured ACL file.", "complexity": "O(N). Where N is the number of configured users.", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "const": "OK" } } } hvals.json000066400000002516152345610730006570 0ustar00{ "HVALS": { "summary": "Returns all values in a hash.", "complexity": "O(N) where N is the size of the hash.", "group": "hash", "since": "2.0.0", "arity": 2, "function": "hvalsCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List of values in the hash, or an empty list when the key does not exist.", "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } cluster-slot-stats.json000066400000010432152345610730011243 0ustar00{ "SLOT-STATS": { "summary": "Return an array of slot usage statistics for slots assigned to the current node.", "complexity": "O(N) where N is the total number of slots based on arguments. O(N*log(N)) with ORDERBY subcommand.", "group": "cluster", "since": "8.2.0", "arity": -4, "container": "CLUSTER", "function": "clusterSlotStatsCommand", "command_flags": [ "STALE", "LOADING" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS" ], "reply_schema": { "type": "array", "description": "Array of nested arrays, where the inner array element represents a slot and its respective usage statistics.", "items": { "type": "array", "description": "Array of size 2, where 0th index represents (int) slot and 1st index represents (map) usage statistics.", "minItems": 2, "maxItems": 2, "items": [ { "description": "Slot Number.", "type": "integer" }, { "type": "object", "description": "Map of slot usage statistics.", "additionalProperties": false, "properties": { "key-count": { "type": "integer" }, "memory-bytes": { "type": "integer" }, "cpu-usec": { "type": "integer" }, "network-bytes-in": { "type": "integer" }, "network-bytes-out": { "type": "integer" } } } ] } }, "arguments": [ { "name": "filter", "type": "oneof", "arguments": [ { "token": "SLOTSRANGE", "name": "slotsrange", "type": "block", "arguments": [ { "name": "start-slot", "type": "integer" }, { "name": "end-slot", "type": "integer" } ] }, { "token": "ORDERBY", "name": "orderby", "type": "block", "arguments": [ { "name": "metric", "type": "string" }, { "token": "LIMIT", "name": "limit", "type": "integer", "optional": true }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] } ] } ] } ] } } latency-latest.json000066400000003030152345610730010374 0ustar00{ "LATEST": { "summary": "Returns the latest latency samples for all events.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 2, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "array", "description": "An array where each element is a four elements array representing the event's name, timestamp, latest and all-time latency measurements.", "items": { "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "type": "string", "description": "Event name." }, { "type": "integer", "description": "Timestamp." }, { "type": "integer", "description": "Latest latency in milliseconds." }, { "type": "integer", "description": "Max latency in milliseconds." } ] } } } } hotkeys-get.json000066400000016025152345610730007716 0ustar00{ "GET": { "summary": "Returns lists of top K hotkeys depending on metrics chosen in HOTKEYS START command.", "complexity": "O(K) where K is the number of hotkeys returned.", "group": "server", "since": "8.6.0", "arity": 2, "container": "HOTKEYS", "function": "hotkeysCommand", "command_flags": [ "ADMIN", "NOSCRIPT" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:SPECIAL", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "oneOf": [ { "description": "Array of maps with various metrics (tracking-active, sample-ratio, selected-slots, time/network statistics), collection info (collection-start-time-unix-ms, collection-duration-ms, total-cpu-time-user-ms, total-cpu-time-sys-ms, total-net-bytes), and the requested lists of Top-K hotkeys (available metrics: by-cpu-time-us, by-net-bytes) where at most K hotkeys are returned.", "type": "array", "items": { "type": "object", "properties": { "tracking-active": { "type": "integer", "description": "Whether hotkey tracking is currently active (1) or stopped (0)." }, "sample-ratio": { "type": "integer", "description": "The sampling ratio used for tracking." }, "selected-slots": { "type": "array", "items": { "type": "array", "items": { "type": "integer" }, "minItems": 1, "maxItems": 2 }, "description": "Array of slot ranges. Each element is an array: single-element [slot] for individual slots, or two-element [start, end] for inclusive ranges." }, "sampled-commands-selected-slots-us": { "type": "integer", "description": "CPU time in microseconds for sampled commands in selected slots (only present when sampling and slots are configured)." }, "all-commands-selected-slots-us": { "type": "integer", "description": "CPU time in microseconds for all commands in selected slots (only present when slots are configured)." }, "all-commands-all-slots-us": { "type": "integer", "description": "CPU time in microseconds for all commands across all slots." }, "net-bytes-sampled-commands-selected-slots": { "type": "integer", "description": "Network bytes for sampled commands in selected slots (only present when sampling and slots are configured)." }, "net-bytes-all-commands-selected-slots": { "type": "integer", "description": "Network bytes for all commands in selected slots (only present when slots are configured)." }, "net-bytes-all-commands-all-slots": { "type": "integer", "description": "Network bytes for all commands across all slots." }, "collection-start-time-unix-ms": { "type": "integer", "description": "Unix timestamp in milliseconds when collection started." }, "collection-duration-ms": { "type": "integer", "description": "Duration of collection in milliseconds." }, "total-cpu-time-user-ms": { "type": "integer", "description": "Total user CPU time in milliseconds (only present when CPU tracking is enabled)." }, "total-cpu-time-sys-ms": { "type": "integer", "description": "Total system CPU time in milliseconds (only present when CPU tracking is enabled)." }, "total-net-bytes": { "type": "integer", "description": "Total network bytes (only present when NET tracking is enabled)." }, "by-cpu-time-us": { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "description": "Flat array of key-value pairs (key1, cpu_time1, key2, cpu_time2, ...) for top-K hotkeys by CPU time in microseconds (only present when CPU tracking is enabled)." }, "by-net-bytes": { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "type": "integer" } ] }, "description": "Flat array of key-value pairs (key1, bytes1, key2, bytes2, ...) for top-K hotkeys by network bytes (only present when NET tracking is enabled)." } }, "additionalProperties": false } }, { "description": "If no tracking is started", "type": "null" } ] } } } strlen.json000066400000002267152345610730006765 0ustar00{ "STRLEN": { "summary": "Returns the length of a string value.", "complexity": "O(1)", "group": "string", "since": "2.2.0", "arity": 2, "function": "strlenCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The length of the string value stored at key, or 0 when key does not exist.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } xclaim.json000066400000010276152345610730006732 0ustar00{ "XCLAIM": { "summary": "Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.", "complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.", "group": "stream", "since": "5.0.0", "arity": -6, "function": "xclaimCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "consumer", "type": "string" }, { "name": "min-idle-time", "type": "string" }, { "name": "ID", "type": "string", "multiple": true }, { "token": "IDLE", "name": "ms", "type": "integer", "optional": true }, { "token": "TIME", "name": "unix-time-milliseconds", "type": "unix-time", "optional": true }, { "token": "RETRYCOUNT", "name": "count", "type": "integer", "optional": true }, { "name": "force", "token": "FORCE", "type": "pure-token", "optional": true }, { "name": "justid", "token": "JUSTID", "type": "pure-token", "optional": true }, { "name": "lastid", "token": "LASTID", "type": "string", "optional": true } ], "reply_schema": { "description": "Stream entries with IDs matching the specified range.", "anyOf": [ { "description": "If JUSTID option is specified, return just an array of IDs of messages successfully claimed", "type": "array", "items": { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" } }, { "description": "array of stream entries that contains each entry as an array of 2 elements, the Entry ID and the entry data itself", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Data", "type": "array", "items": { "type": "string" } } ] } } ] } } } sentinel-myid.json000066400000000767152345610730010242 0ustar00{ "MYID": { "summary": "Returns the Redis Sentinel instance ID.", "complexity": "O(1)", "group": "sentinel", "since": "6.2.0", "arity": 2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "description": "Node ID of the sentinel instance.", "type": "string" } } } sscan.json000066400000004302152345610730006555 0ustar00{ "SSCAN": { "summary": "Iterates over members of a set.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "set", "since": "2.8.0", "arity": -3, "function": "sscanCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer" }, { "token": "MATCH", "name": "pattern", "type": "pattern", "optional": true }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ], "reply_schema": { "description": "cursor and scan response in array form", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "cursor", "type": "string" }, { "description": "list of set members", "type": "array", "items": { "type": "string" } } ] } } } hkeys.json000066400000002557152345610730006603 0ustar00{ "HKEYS": { "summary": "Returns all fields in a hash.", "complexity": "O(N) where N is the size of the hash.", "group": "hash", "since": "2.0.0", "arity": 2, "function": "hkeysCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List of fields in the hash, or an empty list when the key does not exist.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } quit.json000066400000001226152345610730006432 0ustar00{ "QUIT": { "summary": "Closes the connection.", "complexity": "O(1)", "group": "connection", "since": "1.0.0", "arity": -1, "function": "quitCommand", "deprecated_since": "7.2.0", "replaced_by": "just closing the connection", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "ALLOW_BUSY", "NOSCRIPT", "LOADING", "STALE", "FAST", "NO_AUTH" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" } } } config-set.json000066400000002350152345610730007505 0ustar00{ "SET": { "summary": "Sets configuration parameters in-flight.", "complexity": "O(N) when N is the number of configuration parameters provided", "group": "server", "since": "2.0.0", "arity": -4, "container": "CONFIG", "function": "configSetCommand", "history": [ [ "7.0.0", "Added the ability to set multiple parameters in one call." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "parameter", "type": "string" }, { "name": "value", "type": "string" } ] } ] } } cluster-set-config-epoch.json000066400000001112152345610730012253 0ustar00{ "SET-CONFIG-EPOCH": { "summary": "Sets the configuration epoch for a new node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "config-epoch", "type": "integer" } ], "reply_schema": { "const": "OK" } } } lpos.json000066400000005014152345610730006424 0ustar00{ "LPOS": { "summary": "Returns the index of matching elements in a list.", "complexity": "O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.", "group": "list", "since": "6.0.6", "arity": -3, "function": "lposCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "description": "In case there is no matching element", "type": "null" }, { "description": "An integer representing the matching element", "type": "integer" }, { "description": "If the COUNT option is given, an array of integers representing the matching elements (empty if there are no matches)", "type": "array", "uniqueItems": true, "items": { "type": "integer" } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string" }, { "token": "RANK", "name": "rank", "type": "integer", "optional": true }, { "token": "COUNT", "name": "num-matches", "type": "integer", "optional": true }, { "token": "MAXLEN", "name": "len", "type": "integer", "optional": true } ] } } getrange.json000066400000003173152345610730007247 0ustar00{ "GETRANGE": { "summary": "Returns a substring of the string stored at a key.", "complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.", "group": "string", "since": "2.4.0", "arity": 4, "function": "getrangeCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "string", "description": "The substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "end", "type": "integer" } ] } } unwatch.json000066400000001007152345610730007116 0ustar00{ "UNWATCH": { "summary": "Forgets about watched keys of a transaction.", "complexity": "O(1)", "group": "transactions", "since": "2.2.0", "arity": 1, "function": "unwatchCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "ALLOW_BUSY" ], "acl_categories": [ "TRANSACTION" ], "reply_schema": { "const": "OK" } } } sdiff.json000066400000002630152345610730006543 0ustar00{ "SDIFF": { "summary": "Returns the difference of multiple sets.", "complexity": "O(N) where N is the total number of elements in all given sets.", "group": "set", "since": "1.0.0", "arity": -2, "function": "sdiffCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "List with the members of the resulting set.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } function-restore.json000066400000002756152345610730010767 0ustar00{ "RESTORE": { "summary": "Restores all libraries from a payload.", "complexity": "O(N) where N is the number of functions on the payload", "group": "scripting", "since": "7.0.0", "arity": -3, "container": "FUNCTION", "function": "functionRestoreCommand", "command_flags": [ "NOSCRIPT", "WRITE", "DENYOOM" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "serialized-value", "type": "string" }, { "name": "policy", "type": "oneof", "optional": true, "arguments": [ { "name": "flush", "type": "pure-token", "token": "FLUSH" }, { "name": "append", "type": "pure-token", "token": "APPEND" }, { "name": "replace", "type": "pure-token", "token": "REPLACE" } ] } ], "reply_schema": { "const": "OK" } } } acl-dryrun.json000066400000002422152345610730007527 0ustar00{ "DRYRUN": { "summary": "Simulates the execution of a command by a user, without executing the command.", "complexity": "O(1).", "group": "server", "since": "7.0.0", "arity": -4, "container": "ACL", "function": "aclCommand", "history": [], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "anyOf": [ { "const": "OK", "description": "The given user may successfully execute the given command." }, { "type": "string", "description": "The description of the problem, in case the user is not allowed to run the given command." } ] }, "arguments": [ { "name": "username", "type": "string" }, { "name": "command", "type": "string" }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ] } } cluster-addslotsrange.json000066400000001755152345610730011770 0ustar00{ "ADDSLOTSRANGE": { "summary": "Assigns new hash slot ranges to a node.", "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", "group": "cluster", "since": "7.0.0", "arity": -4, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "range", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer" }, { "name": "end-slot", "type": "integer" } ] } ], "reply_schema": { "const": "OK" } } } cluster-reset.json000066400000002032152345610730010245 0ustar00{ "RESET": { "summary": "Resets a node.", "complexity": "O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.", "group": "cluster", "since": "3.0.0", "arity": -2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "ADMIN", "STALE", "NOSCRIPT" ], "arguments": [ { "name": "reset-type", "type": "oneof", "optional": true, "arguments": [ { "name": "hard", "type": "pure-token", "token": "HARD" }, { "name": "soft", "type": "pure-token", "token": "SOFT" } ] } ], "reply_schema": { "const": "OK" } } } acl-deluser.json000066400000001567152345610730007660 0ustar00{ "DELUSER": { "summary": "Deletes ACL users, and terminates their connections.", "complexity": "O(1) amortized time considering the typical user.", "group": "server", "since": "6.0.0", "arity": -3, "container": "ACL", "function": "aclCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "type": "integer", "description": "The number of users that were deleted" }, "arguments": [ { "name": "username", "type": "string", "multiple": true } ] } } cluster-myid.json000066400000000633152345610730010072 0ustar00{ "MYID": { "summary": "Returns the ID of a node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "reply_schema": { "description": "the node id", "type": "string" } } } role.json000066400000012265152345610730006416 0ustar00{ "ROLE": { "summary": "Returns the replication role.", "complexity": "O(1)", "group": "server", "since": "2.8.12", "arity": 1, "function": "roleCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "SENTINEL" ], "acl_categories": [ "ADMIN", "DANGEROUS" ], "reply_schema": { "oneOf": [ { "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "const": "master" }, { "description": "current replication master offset", "type": "integer" }, { "description": "connected replicas", "type": "array", "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "replica ip", "type": "string" }, { "description": "replica port", "type": "string" }, { "description": "last acknowledged replication offset", "type": "string" } ] } } ] }, { "type": "array", "minItems": 5, "maxItems": 5, "items": [ { "const": "slave" }, { "description": "ip of master", "type": "string" }, { "description": "port number of master", "type": "integer" }, { "description": "state of the replication from the point of view of the master", "oneOf": [ { "description": "the instance is in handshake with its master", "const": "handshake" }, { "description": "the instance in not active", "const": "none" }, { "description": "the instance needs to connect to its master", "const": "connect" }, { "description": "the master-replica connection is in progress", "const": "connecting" }, { "description": "the master and replica are trying to perform the synchronization", "const": "sync" }, { "description": "the replica is online", "const": "connected" }, { "description": "instance state is unknown", "const": "unknown" } ] }, { "description": "the amount of data received from the replica so far in terms of master replication offset", "type": "integer" } ] }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "const": "sentinel" }, { "description": "list of master names monitored by this sentinel instance", "type": "array", "items": { "type": "string" } } ] } ] } } } sentinel-replicas.json000066400000001544152345610730011074 0ustar00{ "REPLICAS": { "summary": "Returns a list of the monitored Redis replicas.", "complexity": "O(N) where N is the number of replicas", "group": "sentinel", "since": "5.0.0", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "List of replicas for this master, and their state.", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "arguments": [ { "name": "master-name", "type": "string" } ] } } hexists.json000066400000002712152345610730007140 0ustar00{ "HEXISTS": { "summary": "Determines whether a field exists in a hash.", "complexity": "O(1)", "group": "hash", "since": "2.0.0", "arity": 3, "function": "hexistsCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The hash does not contain the field, or key does not exist.", "const": 0 }, { "description": "The hash contains the field.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" } ] } } client-setname.json000066400000001400152345610730010352 0ustar00{ "SETNAME": { "summary": "Sets the connection name.", "complexity": "O(1)", "group": "connection", "since": "2.6.9", "arity": 3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "acl_categories": [ "CONNECTION" ], "arguments": [ { "name": "connection-name", "type": "string" } ], "reply_schema": { "const": "OK" } } } command.json000066400000001030152345610730007057 0ustar00{ "COMMAND": { "summary": "Returns detailed information about all commands.", "complexity": "O(N) where N is the total number of Redis commands", "group": "server", "since": "2.8.13", "arity": -1, "function": "commandCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ] } } config.json000066400000000330152345610730006710 0ustar00{ "CONFIG": { "summary": "A container for server configuration commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "2.0.0", "arity": -2 } } module-load.json000066400000001323152345610730007650 0ustar00{ "LOAD": { "summary": "Loads a module.", "complexity": "O(1)", "group": "server", "since": "4.0.0", "arity": -3, "container": "MODULE", "function": "moduleCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "PROTECTED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "path", "type": "string" }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ] } } config-rewrite.json000066400000001102152345610730010365 0ustar00{ "REWRITE": { "summary": "Persists the effective configuration to file.", "complexity": "O(1)", "group": "server", "since": "2.8.0", "arity": 2, "container": "CONFIG", "function": "configRewriteCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } bitcount.json000066400000004633152345610730007304 0ustar00{ "BITCOUNT": { "summary": "Counts the number of set bits (population counting) in a string.", "complexity": "O(N)", "group": "bitmap", "since": "2.6.0", "arity": -2, "function": "bitcountCommand", "history": [ [ "7.0.0", "Added the `BYTE|BIT` option." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "range", "type": "block", "optional": true, "arguments": [ { "name": "start", "type": "integer" }, { "name": "end", "type": "integer" }, { "name": "unit", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "byte", "type": "pure-token", "token": "BYTE" }, { "name": "bit", "type": "pure-token", "token": "BIT" } ] } ] } ], "reply_schema": { "description": "The number of bits set to 1.", "type": "integer", "minimum": 0 } } } georadius.json000066400000021337152345610730007437 0ustar00{ "GEORADIUS": { "summary": "Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "group": "geo", "since": "3.2.0", "arity": -6, "function": "georadiusCommand", "get_keys_function": "georadiusGetKeys", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ], [ "7.0.0", "Added support for uppercase unit names." ] ], "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "keyword": { "keyword": "STORE", "startfrom": 6 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "keyword": { "keyword": "STOREDIST", "startfrom": 6 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "longitude", "type": "double" }, { "name": "latitude", "type": "double" }, { "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] }, { "name": "withcoord", "token": "WITHCOORD", "type": "pure-token", "optional": true }, { "name": "withdist", "token": "WITHDIST", "type": "pure-token", "optional": true }, { "name": "withhash", "token": "WITHHASH", "type": "pure-token", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true, "since": "6.2.0" } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "store", "type": "oneof", "optional": true, "arguments": [ { "token": "STORE", "name": "storekey", "display": "key", "type": "key", "key_spec_index": 1 }, { "token": "STOREDIST", "name": "storedistkey", "display": "key", "type": "key", "key_spec_index": 2 } ] } ], "reply_schema": { "description": "Array of matched members information", "anyOf": [ { "description": "If no WITH* option is specified, array of matched members names", "type": "array", "items": { "description": "name", "type": "string" } }, { "type": "array", "items": { "type": "array", "minItems": 1, "maxItems": 4, "items": [ { "description": "Matched member name", "type": "string" } ], "additionalItems": { "oneOf": [ { "description": "If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius", "type": "string" }, { "description": "If WITHHASH option is specified, the geohash integer", "type": "integer" }, { "description": "If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "latitude (x)", "type": "number" }, { "description": "longitude (y)", "type": "number" } ] } ] } } }, { "description": "number of items stored in key", "type": "integer" } ] } } } sinterstore.json000066400000003644152345610730010037 0ustar00{ "SINTERSTORE": { "summary": "Stores the intersect of multiple sets in a key.", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "group": "set", "since": "1.0.0", "arity": -3, "function": "sinterstoreCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of the elements in the result set.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true } ] } } monitor.json000066400000000562152345610730007141 0ustar00{ "MONITOR": { "summary": "Listens for all requests received by the server in real-time.", "group": "server", "since": "1.0.0", "arity": 1, "function": "monitorCommand", "history": [], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ] } } rename.json000066400000003330152345610730006715 0ustar00{ "RENAME": { "summary": "Renames a key and overwrites the destination.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 3, "function": "renameCommand", "history": [], "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "newkey", "type": "key", "key_spec_index": 1 } ], "reply_schema": { "const": "OK" } } } bitfield.json000066400000014054152345610730007235 0ustar00{ "BITFIELD": { "summary": "Performs arbitrary bitfield integer operations on strings.", "complexity": "O(1) for each subcommand specified", "group": "bitmap", "since": "3.2.0", "arity": -2, "function": "bitfieldCommand", "get_keys_function": "bitfieldGetKeys", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "BITMAP" ], "key_specs": [ { "notes": "This command allows both access and modification of the key", "flags": [ "RW", "UPDATE", "ACCESS", "VARIABLE_FLAGS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "operation", "type": "oneof", "multiple": true, "optional": true, "arguments": [ { "token": "GET", "name": "get-block", "type": "block", "arguments": [ { "name": "encoding", "type": "string" }, { "name": "offset", "type": "integer" } ] }, { "name": "write", "type": "block", "arguments": [ { "token": "OVERFLOW", "name": "overflow-block", "type": "oneof", "optional": true, "arguments": [ { "name": "wrap", "type": "pure-token", "token": "WRAP" }, { "name": "sat", "type": "pure-token", "token": "SAT" }, { "name": "fail", "type": "pure-token", "token": "FAIL" } ] }, { "name": "write-operation", "type": "oneof", "arguments": [ { "token": "SET", "name": "set-block", "type": "block", "arguments": [ { "name": "encoding", "type": "string" }, { "name": "offset", "type": "integer" }, { "name": "value", "type": "integer" } ] }, { "token": "INCRBY", "name": "incrby-block", "type": "block", "arguments": [ { "name": "encoding", "type": "string" }, { "name": "offset", "type": "integer" }, { "name": "increment", "type": "integer" } ] } ] } ] } ] } ], "reply_schema": { "type": "array", "items": { "oneOf": [ { "description": "The result of the subcommand at the same position", "type": "integer" }, { "description": "In case OVERFLOW FAIL was given and overflows or underflows detected", "type": "null" } ] } } } } zadd.json000066400000010276152345610730006377 0ustar00{ "ZADD": { "summary": "Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.", "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.", "group": "sorted_set", "since": "1.2.0", "arity": -4, "function": "zaddCommand", "history": [ [ "2.4.0", "Accepts multiple elements." ], [ "3.0.2", "Added the `XX`, `NX`, `CH` and `INCR` options." ], [ "6.2.0", "Added the `GT` and `LT` options." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf":[ { "description": "Operation was aborted (conflict with one of the `XX`/`NX`/`LT`/`GT` options).", "type": "null" }, { "description": "The number of new members (when the `CH` option is not used)", "type": "integer" }, { "description": "The number of new or updated members (when the `CH` option is used)", "type": "integer" }, { "description": "The updated score of the member (when the `INCR` option is used)", "type": "number" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "optional": true, "since": "3.0.2", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" } ] }, { "name": "comparison", "type": "oneof", "optional": true, "since": "6.2.0", "arguments": [ { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] }, { "name": "change", "token": "CH", "type": "pure-token", "optional": true, "since": "3.0.2" }, { "name": "increment", "token": "INCR", "type": "pure-token", "optional": true, "since": "3.0.2" }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "score", "type": "double" }, { "name": "member", "type": "string" } ] } ] } } cluster-bumpepoch.json000066400000001647152345610730011120 0ustar00{ "BUMPEPOCH": { "summary": "Advances the cluster config epoch.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "oneOf": [ { "description": "if the epoch was incremented", "type": "string", "pattern": "^BUMPED [0-9]*$" }, { "description": "if the node already has the greatest config epoch in the cluster", "type": "string", "pattern": "^STILL [0-9]*$" } ] } } } cluster-failover.json000066400000001777152345610730010751 0ustar00{ "FAILOVER": { "summary": "Forces a replica to perform a manual failover of its master.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": -2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "options", "type": "oneof", "optional": true, "arguments": [ { "name": "force", "type": "pure-token", "token": "FORCE" }, { "name": "takeover", "type": "pure-token", "token": "TAKEOVER" } ] } ], "reply_schema": { "const": "OK" } } } ssubscribe.json000066400000002126152345610730007614 0ustar00{ "SSUBSCRIBE": { "summary": "Listens for messages published to shard channels.", "complexity": "O(N) where N is the number of shard channels to subscribe to.", "group": "pubsub", "since": "7.0.0", "arity": -2, "function": "ssubscribeCommand", "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE", "DENYOOM" ], "arguments": [ { "name": "shardchannel", "type": "string", "multiple": true } ], "key_specs": [ { "flags": [ "NOT_KEY" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ] } } client.json000066400000000426152345610730006727 0ustar00{ "CLIENT": { "summary": "A container for client connection commands.", "complexity": "Depends on subcommand.", "group": "connection", "since": "2.4.0", "arity": -2, "command_flags": [ "SENTINEL" ] } } memory.json000066400000000326152345610730006760 0ustar00{ "MEMORY": { "summary": "A container for memory diagnostics commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "4.0.0", "arity": -2 } } sentinel-simulate-failure.json000066400000002733152345610730012543 0ustar00{ "SIMULATE-FAILURE": { "summary": "Simulates failover scenarios.", "group": "sentinel", "since": "3.2.0", "arity": -3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "oneOf": [ { "description": "The simulated flag was set.", "const": "OK" }, { "description": "Supported simulates flags. Returned in case `HELP` was used.", "type": "array", "items": { "type": "string" } } ] }, "arguments": [ { "name": "mode", "type": "oneof", "optional":true, "multiple":true, "arguments": [ { "name": "crash-after-election", "type": "pure-token" }, { "name": "crash-after-promotion", "type": "pure-token" }, { "name": "help", "type": "pure-token" } ] } ] } } cluster-keyslot.json000066400000001207152345610730010620 0ustar00{ "KEYSLOT": { "summary": "Returns the hash slot for a key.", "complexity": "O(N) where N is the number of bytes in the key", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "arguments": [ { "name": "key", "type": "string" } ], "reply_schema": { "description": "The hash slot number for the specified key", "type": "integer", "minimum": 0 } } } zmpop.json000066400000007076152345610730006626 0ustar00{ "ZMPOP": { "summary": "Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.", "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.", "group": "sorted_set", "since": "7.0.0", "arity": -4, "function": "zmpopCommand", "get_keys_function": "zmpopGetKeys", "command_flags": [ "WRITE" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "oneOf": [ { "description": "No element could be popped.", "type": "null" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Name of the key that elements were popped." }, { "type": "array", "description": "Popped elements.", "items": { "type": "array", "uniqueItems": true, "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Name of the member." }, { "type": "number", "description": "Score." } ] } } ] } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } } README.md000066400000002141152345610730006031 0ustar00This directory contains JSON files, one for each of Redis commands. Each JSON contains all the information about the command itself, but these JSON files are not to be used directly! Any third party who needs access to command information must get it from `COMMAND INFO` and `COMMAND DOCS`. The output can be extracted in a JSON format by using `redis-cli --json`, in the same manner as in `utils/generate-commands-json.py`. The JSON files are used to generate commands.def (and https://github.com/redis/redis-doc/blob/master/commands.json) in Redis, and despite looking similar to the output of `COMMAND` there are some fields and flags that are implicitly populated, and that's the reason one shouldn't rely on the raw files. The structure of each JSON is somewhat documented in https://redis.io/commands/command-docs/ and https://redis.io/commands/command/ The `reply_schema` section is a standard JSON Schema (see https://json-schema.org/) that describes the reply of each command. It is designed to someday be used to auto-generate code in client libraries, but is not yet mature and is not exposed externally. cluster-forget.json000066400000001062152345610730010413 0ustar00{ "FORGET": { "summary": "Removes a node from the nodes table.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "node-id", "type": "string" } ], "reply_schema": { "const": "OK" } } } client-no-touch.json000066400000002034152345610730010456 0ustar00{ "NO-TOUCH": { "summary": "Controls whether commands sent by the client affect the LRU/LFU of accessed keys.", "complexity": "O(1)", "group": "connection", "since": "7.2.0", "arity": 3, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "enabled", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "token": "ON" }, { "name": "off", "type": "pure-token", "token": "OFF" } ] } ] } } cluster-replicate.json000066400000001076152345610730011102 0ustar00{ "REPLICATE": { "summary": "Configure a node as replica of a master node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "node-id", "type": "string" } ], "reply_schema": { "const": "OK" } } } object-freq.json000066400000002332152345610730007650 0ustar00{ "FREQ": { "summary": "Returns the logarithmic access frequency counter of a Redis object.", "complexity": "O(1)", "group": "generic", "since": "4.0.0", "arity": 3, "container": "OBJECT", "function": "objectCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "description": "the counter's value", "type": "integer" } } } zrevrangebyscore.json000066400000007250152345610730011045 0ustar00{ "ZREVRANGEBYSCORE": { "summary": "Returns members in a sorted set within a range of scores in reverse order.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).", "group": "sorted_set", "since": "2.2.0", "arity": -4, "function": "zrevrangebyscoreCommand", "history": [ [ "2.1.6", "`min` and `max` can be exclusive." ] ], "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` and `BYSCORE` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "type": "array", "description": "List of the elements in the specified score range, as not WITHSCORES", "uniqueItems": true, "items": { "type": "string", "description": "Element" } }, { "type": "array", "description": "List of the elements and their scores in the specified score range, as WITHSCORES used", "uniqueItems": true, "items": { "type": "array", "description": "Tuple of element and its score", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "element" }, { "type": "number", "description": "score" } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "max", "type": "double" }, { "name": "min", "type": "double" }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] } ] } } hgetall.json000066400000002653152345610730007075 0ustar00{ "HGETALL": { "summary": "Returns all fields and values in a hash.", "complexity": "O(N) where N is the size of the hash.", "group": "hash", "since": "2.0.0", "arity": 2, "function": "hgetallCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "object", "description": "Map of fields and their values stored in the hash, or an empty list when key does not exist. In RESP2 this is returned as a flat array.", "additionalProperties": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } spop.json000066400000004312152345610730006430 0ustar00{ "SPOP": { "summary": "Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.", "complexity": "Without the count argument O(1), otherwise O(N) where N is the value of the passed count.", "group": "set", "since": "1.0.0", "arity": -2, "function": "spopCommand", "history": [ [ "3.2.0", "Added the `count` argument." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "The key does not exist." }, { "type": "string", "description": "The removed member when 'COUNT' is not given." }, { "type": "array", "description": "List to the removed members when 'COUNT' is given.", "uniqueItems": true, "items": { "type": "string" } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true, "since": "3.2.0" } ] } } client-getname.json000066400000001465152345610730010351 0ustar00{ "GETNAME": { "summary": "Returns the name of the connection.", "complexity": "O(1)", "group": "connection", "since": "2.6.9", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "oneOf": [ { "type": "string", "description": "The connection name of the current connection" }, { "type": "null", "description": "Connection name was not set" } ] } } } eval_ro.json000066400000003516152345610730007103 0ustar00{ "EVAL_RO": { "summary": "Executes a read-only server-side Lua script.", "complexity": "Depends on the script that is executed.", "group": "scripting", "since": "7.0.0", "arity": -3, "function": "evalRoCommand", "get_keys_function": "evalGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "NO_MANDATORY_KEYS", "STALE", "READONLY" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS", "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "script", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional":true, "multiple": true }, { "name": "arg", "type": "string", "optional":true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the script that is executed" } } } sentinel-slaves.json000066400000001745152345610730010572 0ustar00{ "SLAVES": { "summary": "Returns a list of the monitored replicas.", "complexity": "O(N) where N is the number of replicas.", "group": "sentinel", "since": "2.8.0", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "deprecated_since": "5.0.0", "replaced_by": "`SENTINEL REPLICAS`", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "List of monitored replicas, and their state.", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "arguments": [ { "name": "master-name", "type": "string" } ] } } flushdb.json000066400000002757152345610730007111 0ustar00{ "FLUSHDB": { "summary": "Remove all keys from the current database.", "complexity": "O(N) where N is the number of keys in the selected database", "group": "server", "since": "1.0.0", "arity": -1, "function": "flushdbCommand", "history": [ [ "4.0.0", "Added the `ASYNC` flushing mode modifier." ], [ "6.2.0", "Added the `SYNC` flushing mode modifier." ] ], "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "token": "ASYNC", "since": "4.0.0" }, { "name": "sync", "type": "pure-token", "token": "SYNC", "since": "6.2.0" } ] } ] } } zrevrank.json000066400000004556152345610730007323 0ustar00{ "ZREVRANK": { "summary": "Returns the index of a member in a sorted set ordered by descending scores.", "complexity": "O(log(N))", "group": "sorted_set", "since": "2.0.0", "arity": -3, "function": "zrevrankCommand", "history": [ [ "7.2.0", "Added the optional `WITHSCORE` argument." ] ], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "Key does not exist or the member does not exist in the sorted set." }, { "type": "integer", "description": "The rank of the member when 'WITHSCORE' is not used." }, { "type": "array", "description": "The rank and score of the member when 'WITHSCORE' is used.", "minItems": 2, "maxItems": 2, "items": [ { "type": "integer" }, { "type": "number" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" }, { "name": "withscore", "token": "WITHSCORE", "type": "pure-token", "optional": true } ] } } exec.json000066400000001603152345610730006373 0ustar00{ "EXEC": { "summary": "Executes all commands in a transaction.", "complexity": "Depends on commands in the transaction", "group": "transactions", "since": "1.2.0", "arity": 1, "function": "execCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SKIP_SLOWLOG" ], "acl_categories": [ "TRANSACTION" ], "reply_schema": { "oneOf": [ { "description": "Each element being the reply to each of the commands in the atomic transaction.", "type": "array" }, { "description": "The transaction was aborted because a `WATCH`ed key was touched", "type": "null" } ] } } } expire.json000066400000005024152345610730006744 0ustar00{ "EXPIRE": { "summary": "Sets the expiration time of a key in seconds.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": -3, "function": "expireCommand", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments.", "const": 0 }, { "description": "The timeout was set.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "seconds", "type": "integer" }, { "name": "condition", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] } ] } } slowlog-help.json000066400000001043152345610730010061 0ustar00{ "HELP": { "summary": "Show helpful text about the different subcommands", "complexity": "O(1)", "group": "server", "since": "6.2.0", "arity": 2, "container": "SLOWLOG", "function": "slowlogCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } sentinel-masters.json000066400000001326152345610730010746 0ustar00{ "MASTERS": { "summary": "Returns a list of monitored Redis masters.", "complexity": "O(N) where N is the number of masters", "group": "sentinel", "since": "2.8.4", "arity": 2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "List of monitored Redis masters, and their state.", "items": { "type": "object", "additionalProperties": { "type": "string" } } } } } pfadd.json000066400000003217152345610730006530 0ustar00{ "PFADD": { "summary": "Adds elements to a HyperLogLog key. Creates the key if it doesn't exist.", "complexity": "O(1) to add every element.", "group": "hyperloglog", "since": "2.8.9", "arity": -2, "function": "pfaddCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HYPERLOGLOG" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "oneOf": [ { "description": "if at least 1 HyperLogLog internal register was altered", "const": 1 }, { "description": "if no HyperLogLog internal register were altered", "const": 0 } ] } } } client-trackinginfo.json000066400000006322152345610730011404 0ustar00{ "TRACKINGINFO": { "summary": "Returns information about server-assisted client-side caching for the connection.", "complexity": "O(1)", "group": "connection", "since": "6.2.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "type": "object", "additionalProperties": false, "properties": { "flags": { "type": "array", "items": { "oneOf": [ { "const": "off", "description": "The connection isn't using server assisted client side caching." }, { "const": "on", "description": "Server assisted client side caching is enabled for the connection." }, { "const": "bcast", "description": "The client uses broadcasting mode." }, { "const": "optin", "description": "The client does not cache keys by default." }, { "const": "optout", "description": "The client caches keys by default." }, { "const": "caching-yes", "description": "The next command will cache keys (exists only together with optin)." }, { "const": "caching-no", "description": "The next command won't cache keys (exists only together with optout)." }, { "const": "noloop", "description": "The client isn't notified about keys modified by itself." }, { "const": "broken_redirect", "description": "The client ID used for redirection isn't valid anymore." } ] } }, "redirect": { "type": "integer", "description": "The client ID used for notifications redirection, or -1 when none." }, "prefixes": { "type": "array", "description": "List of key prefixes for which notifications are sent to the client.", "items": { "type": "string" } } } } } } cluster-syncslots.json000066400000010001152345610730011157 0ustar00{ "SYNCSLOTS": { "summary": "Internal command for atomic slot migration protocol between cluster nodes.", "complexity": "O(1)", "group": "cluster", "since": "8.4.0", "arity": -3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "arguments": [ { "name": "subcommand", "type": "oneof", "arguments": [ { "name": "sync", "token": "SYNC", "type": "block", "arguments": [ { "name": "task-id", "type": "string" }, { "name": "slot-range", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer" }, { "name": "end-slot", "type": "integer" } ] } ] }, { "token": "RDBCHANNEL", "name": "task-id", "type": "string" }, { "name": "snapshot-eof", "token": "SNAPSHOT-EOF", "type": "pure-token" }, { "name": "stream-eof", "token": "STREAM-EOF", "type": "pure-token" }, { "name": "ack", "token": "ACK", "type": "block", "arguments": [ { "name": "state", "type": "string" }, { "name": "offset", "type": "integer" } ] }, { "token": "FAIL", "name": "error", "type": "string" }, { "name": "conf", "token": "CONF", "type": "block", "arguments": [ { "name": "option", "type": "string", "multiple": true }, { "name": "value", "type": "string", "multiple": true } ] } ] } ], "reply_schema": { "oneOf": [ { "description": "Reply to CLUSTER SYNCSLOTS SYNC, returns special RDB channel sync response.", "const": "RDBCHANNELSYNCSLOTS" }, { "description": "Reply to CLUSTER SYNCSLOTS CONF and other subcommands.", "const": "OK" } ] } } } pubsub-shardnumsub.json000066400000001605152345610730011302 0ustar00{ "SHARDNUMSUB": { "summary": "Returns the count of subscribers of shard channels.", "complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels", "group": "pubsub", "since": "7.0.0", "arity": -2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE" ], "arguments": [ { "name": "shardchannel", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "the number of subscribers per shard channel, each even element (including 0th) is channel name, each odd element is the number of subscribers", "type": "array" } } } sdiffstore.json000066400000003610152345610730007617 0ustar00{ "SDIFFSTORE": { "summary": "Stores the difference of multiple sets in a key.", "complexity": "O(N) where N is the total number of elements in all given sets.", "group": "set", "since": "1.0.0", "arity": -3, "function": "sdiffstoreCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of the elements in the resulting set.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true } ] } } geohash.json000066400000002742152345610730007072 0ustar00{ "GEOHASH": { "summary": "Returns members from a geospatial index as geohash strings.", "complexity": "O(1) for each member requested.", "group": "geo", "since": "3.2.0", "arity": -2, "function": "geohashCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true, "optional": true } ], "reply_schema": { "description": "An array where each element is the Geohash corresponding to each member name passed as argument to the command.", "type": "array", "items": { "type": "string" } } } } script-debug.json000066400000002161152345610730010037 0ustar00{ "DEBUG": { "summary": "Sets the debug mode of server-side Lua scripts.", "complexity": "O(1)", "group": "scripting", "since": "3.2.0", "arity": 3, "container": "SCRIPT", "function": "scriptCommand", "command_flags": [ "NOSCRIPT" ], "acl_categories": [ "SCRIPTING" ], "arguments": [ { "name": "mode", "type": "oneof", "arguments": [ { "name": "yes", "type": "pure-token", "token": "YES" }, { "name": "sync", "type": "pure-token", "token": "SYNC" }, { "name": "no", "type": "pure-token", "token": "NO" } ] } ], "reply_schema": { "const": "OK" } } } cluster-shards.json000066400000007014152345610730010414 0ustar00{ "SHARDS": { "summary": "Returns the mapping of cluster slots to shards.", "complexity": "O(N) where N is the total number of cluster nodes", "group": "cluster", "since": "7.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "history": [], "command_flags": [ "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "a nested list of a map of hash ranges and shard nodes describing individual shards", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "slots": { "description": "an even number element array specifying the start and end slot numbers for slot ranges owned by this shard", "type": "array", "items": { "type": "integer" } }, "nodes": { "description": "nodes that handle these slot ranges", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "port": { "type": "integer" }, "tls-port": { "type": "integer" }, "ip": { "type": "string" }, "endpoint": { "type": "string" }, "hostname": { "type": "string" }, "role": { "oneOf": [ { "const": "master" }, { "const": "replica" } ] }, "replication-offset": { "type": "integer" }, "health": { "oneOf": [ { "const": "fail" }, { "const": "loading" }, { "const": "online" } ] } } } } } } } } } object-idletime.json000066400000002331152345610730010506 0ustar00{ "IDLETIME": { "summary": "Returns the time since the last access to a Redis object.", "complexity": "O(1)", "group": "generic", "since": "2.2.3", "arity": 3, "container": "OBJECT", "function": "objectCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "description": "the idle time in seconds", "type": "integer" } } } hpexpiretime.json000066400000004636152345610730010163 0ustar00{ "HPEXPIRETIME": { "summary": "Returns the expiration time of a hash field as a Unix timestamp, in msec.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -5, "function": "hpexpiretimeCommand", "history": [], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "The field exists but has no associated expire.", "const": -1 }, { "description": "Expiration Unix timestamp in milliseconds.", "type": "integer", "minimum": 1 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } pfmerge.json000066400000003557152345610730007106 0ustar00{ "PFMERGE": { "summary": "Merges one or more HyperLogLog values into a single key.", "complexity": "O(N) to merge N HyperLogLogs, but with high constant times.", "group": "hyperloglog", "since": "2.8.9", "arity": -2, "function": "pfmergeCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "HYPERLOGLOG" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "destkey", "type": "key", "key_spec_index": 0 }, { "name": "sourcekey", "type": "key", "key_spec_index": 1, "optional": true, "multiple": true } ], "reply_schema": { "const": "OK" } } } sentinel-reset.json000066400000001265152345610730010414 0ustar00{ "RESET": { "summary": "Resets Redis masters by name matching a pattern.", "complexity": "O(N) where N is the number of monitored masters", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "integer", "description": "The number of masters that were reset." }, "arguments": [ { "name": "pattern", "type": "pattern" } ] } } object.json000066400000000331152345610730006712 0ustar00{ "OBJECT": { "summary": "A container for object introspection commands.", "complexity": "Depends on subcommand.", "group": "generic", "since": "2.2.3", "arity": -2 } } hexpire.json000066400000006704152345610730007122 0ustar00{ "HEXPIRE": { "summary": "Set expiry for hash field using relative time to expire (seconds)", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -6, "function": "hexpireCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "Specified NX | XX | GT | LT condition not met", "const": 0 }, { "description": "Expiration time was set or updated.", "const": 1 }, { "description": "Field deleted because the specified expiration time is in the past.", "const": 2 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "seconds", "type": "integer" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } zincrby.json000066400000002715152345610730007134 0ustar00{ "ZINCRBY": { "summary": "Increments the score of a member in a sorted set.", "complexity": "O(log(N)) where N is the number of elements in the sorted set.", "group": "sorted_set", "since": "1.2.0", "arity": 4, "function": "zincrbyCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The new score of `member`", "type": "number" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "increment", "type": "integer" }, { "name": "member", "type": "string" } ] } } zrandmember.json000066400000006010152345610730007752 0ustar00{ "ZRANDMEMBER": { "summary": "Returns one or more random members from a sorted set.", "complexity": "O(N) where N is the number of members returned", "group": "sorted_set", "since": "6.2.0", "arity": -2, "function": "zrandmemberCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "type": "null", "description": "Key does not exist." }, { "type": "string", "description": "Randomly selected element when 'COUNT' is not used." }, { "type": "array", "description": "Randomly selected elements when 'COUNT' is used.", "items": { "type": "string" } }, { "type": "array", "description": "Randomly selected elements when 'COUNT' and 'WITHSCORES' modifiers are used.", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Element." }, { "type": "number", "description": "Score." } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "options", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer" }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } ] } } sentinel-help.json000066400000001140152345610730010212 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "sentinel", "since": "6.2.0", "arity": 2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } sentinel-info-cache.json000066400000005066152345610730011271 0ustar00{ "INFO-CACHE": { "summary": "Returns the cached `INFO` replies from the deployment's instances.", "complexity": "O(N) where N is the number of instances", "group": "sentinel", "since": "3.2.0", "arity": -3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "This is actually a map, the odd entries are a master name, and the even entries are the last cached INFO output from that master and all its replicas.", "minItems": 0, "maxItems": 4294967295, "items": [ { "oneOf": [ { "type": "string", "description": "The master name." }, { "type": "array", "description": "This is an array of pairs, the odd entries are the INFO age, and the even entries are the cached INFO string. The first pair belong to the master and the rest are its replicas.", "minItems": 2, "maxItems": 2, "items": [ { "description": "The number of milliseconds since when the INFO was cached.", "type": "integer" }, { "description": "The cached INFO string or null.", "oneOf": [ { "description": "The cached INFO string.", "type": "string" }, { "description": "No cached INFO string.", "type": "null" } ] } ] } ] } ] }, "arguments": [ { "name": "nodename", "type": "string", "multiple": true } ] } } function-list.json000066400000006165152345610730010255 0ustar00{ "LIST": { "summary": "Returns information about all libraries.", "complexity": "O(N) where N is the number of functions", "group": "scripting", "since": "7.0.0", "arity": -2, "container": "FUNCTION", "function": "functionListCommand", "command_flags": [ "NOSCRIPT" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "acl_categories": [ "SCRIPTING" ], "reply_schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "library_name": { "description": " the name of the library", "type": "string" }, "engine": { "description": "the engine of the library", "type": "string" }, "functions": { "description": "the list of functions in the library", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "the name of the function", "type": "string" }, "description": { "description": "the function's description", "oneOf": [ { "type": "null" }, { "type": "string" } ] }, "flags": { "description": "an array of function flags", "type": "array", "items": { "type": "string" } } } } }, "library_code": { "description": "the library's source code (when given the WITHCODE modifier)", "type": "string" } } } }, "arguments": [ { "name": "library-name-pattern", "type": "string", "token": "LIBRARYNAME", "optional": true }, { "name": "withcode", "type": "pure-token", "token": "WITHCODE", "optional": true } ] } } trimslots.json000066400000002574152345610730007517 0ustar00{ "TRIMSLOTS": { "summary": "Trim the keys that belong to specified slots.", "complexity": "O(N) where N is the total number of keys in all databases", "group": "server", "since": "8.4.0", "arity": -5, "function": "trimslotsCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "ranges", "token": "RANGES", "type": "block", "arguments": [ { "name": "numranges", "type": "integer" }, { "name": "slots", "type": "block", "multiple": true, "arguments": [ { "name": "startslot", "type": "integer" }, { "name": "endslot", "type": "integer" } ] } ] } ] } } hotkeys.json000066400000000326152345610730007136 0ustar00{ "HOTKEYS": { "summary": "A container for hotkeys tracking commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "8.6.0", "arity": -2 } } cluster-slots.json000066400000011704152345610730010275 0ustar00{ "SLOTS": { "summary": "Returns the mapping of cluster slots to nodes.", "complexity": "O(N) where N is the total number of Cluster nodes", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "deprecated_since": "7.0.0", "replaced_by": "`CLUSTER SHARDS`", "doc_flags": [ "DEPRECATED" ], "history": [ [ "4.0.0", "Added node IDs." ], [ "7.0.0", "Added additional networking metadata field." ] ], "command_flags": [ "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "nested list of slot ranges with networking information", "type": "array", "items": { "type": "array", "minItems": 3, "maxItems": 4294967295, "items": [ { "description": "start slot number", "type": "integer" }, { "description": "end slot number", "type": "integer" }, { "type": "array", "description": "Master node for the slot range", "minItems": 4, "maxItems": 4, "items": [ { "description": "endpoint description", "oneOf": [ { "description": "hostname or ip", "type": "string" }, { "description": "unknown type", "type": "null" } ] }, { "description": "port", "type": "integer" }, { "description": "node name", "type": "string" }, { "description": "array of node descriptions", "type": "object", "additionalProperties": false, "properties": { "hostname": { "type": "string" }, "ip": { "type": "string" } } } ] } ], "additionalItems": { "type": "array", "description": "Replica node for the slot range", "minItems": 4, "maxItems": 4, "items": [ { "description": "endpoint description", "oneOf": [ { "description": "hostname or ip", "type": "string" }, { "description": "unknown type", "type": "null" } ] }, { "description": "port", "type": "integer" }, { "description": "node name", "type": "string" }, { "description": "array of node descriptions", "type": "object", "additionalProperties": false, "properties": { "hostname": { "type": "string" }, "ip": { "type": "string" } } } ] } } } } } getset.json000066400000003276152345610730006752 0ustar00{ "GETSET": { "summary": "Returns the previous string value of a key after setting it to a new value.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 3, "function": "getsetCommand", "deprecated_since": "6.2.0", "replaced_by": "`SET` with the `!GET` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The old value stored at the key.", "type": "string" }, { "description": "The key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] } } zunion.json000066400000006637152345610730007005 0ustar00{ "ZUNION": { "summary": "Returns the union of multiple sorted sets.", "complexity": "O(N)+O(M*log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.", "group": "sorted_set", "since": "6.2.0", "arity": -3, "function": "zunionCommand", "get_keys_function": "zunionInterDiffGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "anyOf": [ { "description": "The result of union when 'WITHSCORES' is not used.", "type": "array", "uniqueItems": true, "items": { "type": "string" } }, { "description": "The result of union when 'WITHSCORES' is used.", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "number" } ] } } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "token": "WEIGHTS", "name": "weight", "type": "integer", "optional": true, "multiple": true }, { "token": "AGGREGATE", "name": "aggregate", "type": "oneof", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "token": "SUM" }, { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } } xrange.json000066400000004633152345610730006741 0ustar00{ "XRANGE": { "summary": "Returns the messages from a stream within a range of IDs.", "complexity": "O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).", "group": "stream", "since": "5.0.0", "arity": -4, "function": "xrangeCommand", "history": [ [ "6.2.0", "Added exclusive ranges." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Stream entries with IDs matching the specified range.", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Data", "type": "array", "items": { "type": "string" } } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "string" }, { "name": "end", "type": "string" }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } } info.json000066400000002277152345610730006412 0ustar00{ "INFO": { "summary": "Returns information and statistics about the server.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": -1, "function": "infoCommand", "history": [ [ "7.0.0", "Added support for taking multiple section arguments." ] ], "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "DANGEROUS" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "description": "A map of info fields, one field per line in the form of : where the value can be a comma separated map like =. Also contains section header lines starting with `#` and blank lines.", "type": "string" }, "arguments": [ { "name": "section", "type": "string", "multiple": true, "optional": true } ] } } pexpireat.json000066400000005101152345610730007445 0ustar00{ "PEXPIREAT": { "summary": "Sets the expiration time of a key to a Unix milliseconds timestamp.", "complexity": "O(1)", "group": "generic", "since": "2.6.0", "arity": -3, "function": "pexpireatCommand", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 1, "description": "The timeout was set." }, { "const": 0, "description": "The timeout was not set. e.g. key doesn't exist, or operation skipped due to the provided arguments." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "unix-time-milliseconds", "type": "unix-time" }, { "name": "condition", "type": "oneof", "optional": true, "since": "7.0.0", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] } ] } } hotkeys-help.json000066400000001047152345610730010065 0ustar00{ "HELP": { "summary": "Return helpful text about HOTKEYS command parameters.", "complexity": "O(1)", "group": "server", "since": "8.6.1", "arity": 2, "container": "HOTKEYS", "function": "hotkeysCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } unlink.json000066400000003026152345610730006750 0ustar00{ "UNLINK": { "summary": "Asynchronously deletes one or more keys.", "complexity": "O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.", "group": "generic", "since": "4.0.0", "arity": -2, "function": "unlinkCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:AGG_SUM" ], "key_specs": [ { "flags": [ "RM", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ], "reply_schema": { "description": "the number of keys that were unlinked", "type": "integer", "minimum": 0 } } } zinter.json000066400000007172152345610730006771 0ustar00{ "ZINTER": { "summary": "Returns the intersect of multiple sorted sets.", "complexity": "O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.", "group": "sorted_set", "since": "6.2.0", "arity": -3, "function": "zinterCommand", "get_keys_function": "zunionInterDiffGetKeys", "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "anyOf": [ { "description": "Result of intersection, containing only the member names. Returned in case `WITHSCORES` was not used.", "type": "array", "items": { "type": "string" } }, { "description": "Result of intersection, containing members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } } ] }, "arguments": [ { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "token": "WEIGHTS", "name": "weight", "type": "integer", "optional": true, "multiple": true }, { "token": "AGGREGATE", "name": "aggregate", "type": "oneof", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "token": "SUM" }, { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } } hstrlen.json000066400000002524152345610730007131 0ustar00{ "HSTRLEN": { "summary": "Returns the length of the value of a field.", "complexity": "O(1)", "group": "hash", "since": "3.2.0", "arity": 3, "function": "hstrlenCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "String length of the value associated with the field, or zero when the field is not present in the hash or key does not exist at all.", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" } ] } } hscan.json000066400000005021152345610730006541 0ustar00{ "HSCAN": { "summary": "Iterates over fields and values of a hash.", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "group": "hash", "since": "2.8.0", "arity": -3, "function": "hscanCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer" }, { "token": "MATCH", "name": "pattern", "type": "pattern", "optional": true }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true }, { "token": "NOVALUES", "name": "novalues", "type": "pure-token", "optional": true } ], "reply_schema": { "description": "cursor and scan response in array form", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "cursor", "type": "string" }, { "description": "list of key/value pairs from the hash where each even element is the key, and each odd element is the value, or when novalues option is on, a list of keys from the hash", "type": "array", "items": { "type": "string" } } ] } } } sync.json000066400000000514152345610730006423 0ustar00{ "SYNC": { "summary": "An internal command used in replication.", "group": "server", "since": "1.0.0", "arity": 1, "function": "syncCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NO_MULTI", "NOSCRIPT" ] } } unsubscribe.json000066400000001205152345610730007771 0ustar00{ "UNSUBSCRIBE": { "summary": "Stops listening to messages posted to channels.", "complexity": "O(N) where N is the number of channels to unsubscribe.", "group": "pubsub", "since": "2.0.0", "arity": -1, "function": "unsubscribeCommand", "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "arguments": [ { "name": "channel", "type": "string", "optional": true, "multiple": true } ] } } object-encoding.json000066400000002646152345610730010511 0ustar00{ "ENCODING": { "summary": "Returns the internal encoding of a Redis object.", "complexity": "O(1)", "group": "generic", "since": "2.2.3", "arity": 3, "container": "OBJECT", "function": "objectCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "oneOf": [ { "description": "key doesn't exist", "type": "null" }, { "description": "encoding of the object", "type": "string" } ] } } } zrevrange.json000066400000005422152345610730007455 0ustar00{ "ZREVRANGE": { "summary": "Returns members in a sorted set within a range of indexes in reverse order.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.", "group": "sorted_set", "since": "1.2.0", "arity": -4, "function": "zrevrangeCommand", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "description": "List of member elements.", "type": "array", "uniqueItems": true, "items": { "type": "string" } }, { "description": "List of the members and their scores. Returned in case `WITHSCORES` was used.", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "member", "type": "string" }, { "description": "score", "type": "number" } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "stop", "type": "integer" }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } } time.json000066400000001307152345610730006406 0ustar00{ "TIME": { "summary": "Returns the server time.", "complexity": "O(1)", "group": "server", "since": "2.6.0", "arity": 1, "function": "timeCommand", "command_flags": [ "LOADING", "STALE", "FAST" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "type": "array", "description": "Array containing two elements: Unix time in seconds and microseconds.", "minItems": 2, "maxItems": 2, "items": { "type": "string", "pattern": "[0-9]+" } } } } mset.json000066400000003143152345610730006420 0ustar00{ "MSET": { "summary": "Atomically creates or modifies the string values of one or more keys.", "complexity": "O(N) where N is the number of keys to set.", "group": "string", "since": "1.0.1", "arity": -3, "function": "msetCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 2, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] } ] } } zunionstore.json000066400000006025152345610730010051 0ustar00{ "ZUNIONSTORE": { "summary": "Stores the union of multiple sorted sets in a key.", "complexity": "O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.", "group": "sorted_set", "since": "2.0.0", "arity": -4, "function": "zunionstoreCommand", "get_keys_function": "zunionInterDiffStoreGetKeys", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "description": "The number of elements in the resulting sorted set.", "type": "integer" }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true }, { "token": "WEIGHTS", "name": "weight", "type": "integer", "optional": true, "multiple": true }, { "token": "AGGREGATE", "name": "aggregate", "type": "oneof", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "token": "SUM" }, { "name": "min", "type": "pure-token", "token": "MIN" }, { "name": "max", "type": "pure-token", "token": "MAX" } ] } ] } } lpop.json000066400000004107152345610730006423 0ustar00{ "LPOP": { "summary": "Returns the first elements in a list after removing it. Deletes the list if the last element was popped.", "complexity": "O(N) where N is the number of elements returned", "group": "list", "since": "1.0.0", "arity": -2, "function": "lpopCommand", "history": [ [ "6.2.0", "Added the `count` argument." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Key does not exist.", "type": "null" }, { "description": "In case `count` argument was not given, the value of the first element.", "type": "string" }, { "description": "In case `count` argument was given, a list of popped elements", "type": "array", "items": { "type": "string" } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true, "since": "6.2.0" } ] } } dbsize.json000066400000001202152345610730006722 0ustar00{ "DBSIZE": { "summary": "Returns the number of keys in the database.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": 1, "function": "dbsizeCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:AGG_SUM" ], "reply_schema": { "type": "integer", "description": "The number of keys in the currently-selected database." } } } readonly.json000066400000000760152345610730007267 0ustar00{ "READONLY": { "summary": "Enables read-only queries for a connection to a Redis Cluster replica node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 1, "function": "readonlyCommand", "command_flags": [ "FAST", "LOADING", "STALE" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" } } } cluster-delslots.json000066400000001212152345610730010753 0ustar00{ "DELSLOTS": { "summary": "Sets hash slots as unbound for a node.", "complexity": "O(N) where N is the total number of hash slot arguments", "group": "cluster", "since": "3.0.0", "arity": -3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "slot", "type": "integer", "multiple": true } ], "reply_schema": { "const": "OK" } } } zrangebyscore.json000066400000007247152345610730010336 0ustar00{ "ZRANGEBYSCORE": { "summary": "Returns members in a sorted set within a range of scores.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).", "group": "sorted_set", "since": "1.0.5", "arity": -4, "function": "zrangebyscoreCommand", "history": [ [ "2.0.0", "Added the `WITHSCORES` modifier." ] ], "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `BYSCORE` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "type": "array", "description": "List of the elements in the specified score range, as not WITHSCORES", "uniqueItems": true, "items": { "type": "string", "description": "Element" } }, { "type": "array", "description": "List of the elements and their scores in the specified score range, as WITHSCORES used", "uniqueItems": true, "items": { "type": "array", "description": "Tuple of element and its score", "minItems": 2, "maxItems": 2, "items": [ { "description": "element", "type": "string" }, { "description": "score", "type": "number" } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "double" }, { "name": "max", "type": "double" }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true, "since": "2.0.0" }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] } ] } } acl-log.json000066400000005720152345610730006771 0ustar00{ "LOG": { "summary": "Lists recent security events generated due to ACL rules.", "complexity": "O(N) with N being the number of entries shown.", "group": "server", "since": "6.0.0", "arity": -2, "container": "ACL", "function": "aclCommand", "history": [ [ "7.2.0", "Added entry ID, timestamp created, and timestamp last updated." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "oneOf": [ { "description": "In case `RESET` was not given, a list of recent ACL security events.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "count": { "type": "integer" }, "reason": { "type": "string" }, "context": { "type": "string" }, "object": { "type": "string" }, "username": { "type": "string" }, "age-seconds": { "type": "number" }, "client-info": { "type": "string" }, "entry-id": { "type": "integer" }, "timestamp-created": { "type": "integer" }, "timestamp-last-updated": { "type": "integer" } } } }, { "const": "OK", "description": "In case `RESET` was given, OK indicates ACL log was cleared." } ] }, "arguments": [ { "name": "operation", "type": "oneof", "optional": true, "arguments": [ { "name": "count", "type": "integer" }, { "name": "reset", "type": "pure-token", "token": "RESET" } ] } ] } } acl-setuser.json000066400000002241152345610730007675 0ustar00{ "SETUSER": { "summary": "Creates and modifies an ACL user and its rules.", "complexity": "O(N). Where N is the number of rules provided.", "group": "server", "since": "6.0.0", "arity": -3, "container": "ACL", "function": "aclCommand", "history": [ [ "6.2.0", "Added Pub/Sub channel patterns." ], [ "7.0.0", "Added selectors and key based permissions." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "username", "type": "string" }, { "name": "rule", "type": "string", "optional": true, "multiple": true } ] } } xgroup-delconsumer.json000066400000002650152345610730011314 0ustar00{ "DELCONSUMER": { "summary": "Deletes a consumer from a consumer group.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 5, "container": "XGROUP", "function": "xgroupCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "consumer", "type": "string" } ], "reply_schema": { "description": "The number of pending messages that were yet associated with such a consumer", "type": "integer", "minimum": 0 } } } scard.json000066400000002262152345610730006545 0ustar00{ "SCARD": { "summary": "Returns the number of members in a set.", "complexity": "O(1)", "group": "set", "since": "1.0.0", "arity": 2, "function": "scardCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The cardinality (number of elements) of the set, or 0 if key does not exist.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } client-list.json000066400000005604152345610730007703 0ustar00{ "LIST": { "summary": "Lists open connections.", "complexity": "O(N) where N is the number of client connections", "group": "connection", "since": "2.4.0", "arity": -2, "container": "CLIENT", "function": "clientCommand", "history": [ [ "2.8.12", "Added unique client `id` field." ], [ "5.0.0", "Added optional `TYPE` filter." ], [ "6.0.0", "Added `user` field." ], [ "6.2.0", "Added `argv-mem`, `tot-mem`, `laddr` and `redir` fields and the optional `ID` filter." ], [ "7.0.0", "Added `resp`, `multi-mem`, `rbs` and `rbp` fields." ], [ "7.0.3", "Added `ssub` field." ], [ "7.2.0", "Added `lib-name` and `lib-ver` fields." ], [ "7.4.0", "Added `watch` field." ], [ "8.0.0", "Added `io-thread` field." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "type": "string", "description": "Information and statistics about client connections" }, "arguments": [ { "token": "TYPE", "name": "client-type", "type": "oneof", "optional": true, "since": "5.0.0", "arguments": [ { "name": "normal", "type": "pure-token", "token": "normal" }, { "name": "master", "type": "pure-token", "token": "master" }, { "name": "replica", "type": "pure-token", "token": "replica" }, { "name": "pubsub", "type": "pure-token", "token": "pubsub" } ] }, { "name": "client-id", "token": "ID", "type": "integer", "optional": true, "multiple": true, "since": "6.2.0" } ] } } ttl.json000066400000003343152345610730006255 0ustar00{ "TTL": { "summary": "Returns the expiration time in seconds of a key.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 2, "function": "ttlCommand", "history": [ [ "2.8.0", "Added the -2 reply." ] ], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "TTL in seconds.", "type": "integer", "minimum": 0 }, { "description": "The key exists but has no associated expire.", "const": -1 }, { "description": "The key does not exist.", "const": -2 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } renamenx.json000066400000004262152345610730007270 0ustar00{ "RENAMENX": { "summary": "Renames a key only when the target key name doesn't exist.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 3, "function": "renamenxCommand", "history": [ [ "3.2.0", "The command no longer returns an error when source and destination names are the same." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "newkey", "type": "key", "key_spec_index": 1 } ], "reply_schema": { "oneOf": [ { "description": "key was renamed to newkey", "const": 1 }, { "description": "new key already exists", "const": 0 } ] } } } zlexcount.json000066400000002745152345610730007512 0ustar00{ "ZLEXCOUNT": { "summary": "Returns the number of members in a sorted set within a lexicographical range.", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "group": "sorted_set", "since": "2.8.9", "arity": 4, "function": "zlexcountCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of elements in the specified score range.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "min", "type": "string" }, { "name": "max", "type": "string" } ] } } bzpopmax.json000066400000004777152345610730007326 0ustar00{ "BZPOPMAX": { "summary": "Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped.", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "group": "sorted_set", "since": "5.0.0", "arity": -3, "function": "bzpopmaxCommand", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "command_flags": [ "WRITE", "FAST", "BLOCKING" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -2, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Timeout reached and no elements were popped.", "type": "null" }, { "description": "The keyname, popped member, and its score.", "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "Keyname", "type": "string" }, { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double" } ] } } xidmprecord.json000066400000002657152345610730010001 0ustar00{ "XIDMPRECORD": { "summary": "An internal command for setting IDMP metadata on an existing stream message.", "complexity": "O(1)", "group": "stream", "since": "8.6.2", "arity": 5, "function": "xidmprecordCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "pid", "type": "string" }, { "name": "iid", "type": "string" }, { "name": "stream-id", "type": "string" } ], "reply_schema": { "const": "OK" } } } lmove.json000066400000005477152345610730006606 0ustar00{ "LMOVE": { "summary": "Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved.", "complexity": "O(1)", "group": "list", "since": "6.2.0", "arity": 5, "function": "lmoveCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The element being popped and pushed.", "type": "string" }, "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 }, { "name": "wherefrom", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] }, { "name": "whereto", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] } ] } } psetex.json000066400000002762152345610730006766 0ustar00{ "PSETEX": { "summary": "Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.", "complexity": "O(1)", "group": "string", "since": "2.6.0", "arity": 4, "function": "psetexCommand", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `PX` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "milliseconds", "type": "integer" }, { "name": "value", "type": "string" } ] } } blmove.json000066400000006256152345610730006744 0ustar00{ "BLMOVE": { "summary": "Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.", "complexity": "O(1)", "group": "list", "since": "6.2.0", "arity": 6, "function": "blmoveCommand", "command_flags": [ "WRITE", "DENYOOM", "BLOCKING" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The popped element.", "type": "string" }, { "description": "Operation timed-out", "type": "null" } ] }, "arguments": [ { "name": "source", "type": "key", "key_spec_index": 0 }, { "name": "destination", "type": "key", "key_spec_index": 1 }, { "name": "wherefrom", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] }, { "name": "whereto", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "token": "LEFT" }, { "name": "right", "type": "pure-token", "token": "RIGHT" } ] }, { "name": "timeout", "type": "double" } ] } } command-list.json000066400000003005152345610730010034 0ustar00{ "LIST": { "summary": "Returns a list of command names.", "complexity": "O(N) where N is the total number of Redis commands", "group": "server", "since": "7.0.0", "arity": -2, "container": "COMMAND", "function": "commandListCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "arguments": [ { "name": "filterby", "token": "FILTERBY", "type": "oneof", "optional": true, "arguments": [ { "name": "module-name", "type": "string", "token": "MODULE" }, { "name": "category", "type": "string", "token": "ACLCAT" }, { "name": "pattern", "type": "pattern", "token": "PATTERN" } ] } ], "reply_schema": { "type": "array", "items": { "description": "command name", "type": "string" }, "uniqueItems": true } } } setex.json000066400000002727152345610730006607 0ustar00{ "SETEX": { "summary": "Sets the string value and expiration time of a key. Creates the key if it doesn't exist.", "complexity": "O(1)", "group": "string", "since": "2.0.0", "arity": 4, "function": "setexCommand", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `EX` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "seconds", "type": "integer" }, { "name": "value", "type": "string" } ] } } sentinel-failover.json000066400000001243152345610730011075 0ustar00{ "FAILOVER": { "summary": "Forces a Redis Sentinel failover.", "group": "sentinel", "since": "2.8.4", "arity": 3, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "const": "OK", "description": "Force a fail over as if the master was not reachable, and without asking for agreement to other Sentinels." }, "arguments": [ { "name": "master-name", "type": "string" } ] } } xgroup-createconsumer.json000066400000003020152345610730012003 0ustar00{ "CREATECONSUMER": { "summary": "Creates a consumer in a consumer group.", "complexity": "O(1)", "group": "stream", "since": "6.2.0", "arity": 5, "container": "XGROUP", "function": "xgroupCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "consumer", "type": "string" } ], "reply_schema": { "description": "The number of created consumers (0 or 1)", "oneOf": [ { "const": 1 }, { "const": 0 } ] } } } xinfo-consumers.json000066400000004073152345610730010612 0ustar00{ "CONSUMERS": { "summary": "Returns a list of the consumers in a consumer group.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 4, "container": "XINFO", "function": "xinfoCommand", "history": [ [ "7.2.0", "Added the `inactive` field, and changed the meaning of `idle`." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" } ], "reply_schema": { "description": "Array list of consumers", "type": "array", "uniqueItems": true, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "pending": { "type": "integer" }, "idle": { "type": "integer" }, "inactive": { "type": "integer" } } } } } } substr.json000066400000003364152345610730006777 0ustar00{ "SUBSTR": { "summary": "Returns a substring from a string value.", "complexity": "O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.", "group": "string", "since": "1.0.0", "arity": 4, "function": "getrangeCommand", "deprecated_since": "2.0.0", "replaced_by": "`GETRANGE`", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "string", "description": "The substring of the string value stored at key, determined by the offsets start and end (both are inclusive)." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "end", "type": "integer" } ] } } xinfo-stream.json000066400000050547152345610730010076 0ustar00{ "STREAM": { "summary": "Returns information about a stream.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": -3, "container": "XINFO", "history": [ [ "6.0.0", "Added the `FULL` modifier." ], [ "7.0.0", "Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields" ], [ "7.2.0", "Added the `active-time` field, and changed the meaning of `seen-time`." ], [ "8.6.0", "Added the `idmp-duration`, `idmp-maxsize`, `pids-tracked`, `iids-tracked`, `iids-added` and `iids-duplicates` fields for IDMP tracking." ] ], "function": "xinfoCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Summary form, in case `FULL` was not given.", "type": "object", "additionalProperties": false, "properties": { "length": { "description": "the number of entries in the stream (see `XLEN`)", "type": "integer" }, "radix-tree-keys": { "description": "the number of keys in the underlying radix data structure", "type": "integer" }, "radix-tree-nodes": { "description": "the number of nodes in the underlying radix data structure", "type": "integer" }, "last-generated-id": { "description": "the ID of the least-recently entry that was added to the stream", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "max-deleted-entry-id": { "description": "the maximal entry ID that was deleted from the stream", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "recorded-first-entry-id": { "description": "cached copy of the first entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "entries-added": { "description": "the count of all entries added to the stream during its lifetime", "type": "integer" }, "idmp-duration": { "description": "the duration in seconds that each iid is kept in the stream's IDMP map", "type": "integer" }, "idmp-maxsize": { "description": "the maximum number of most recent iids kept for each pid in the stream's IDMP map", "type": "integer" }, "pids-tracked": { "description": "the number of idempotent producer ids currently tracked in the stream", "type": "integer" }, "iids-tracked": { "description": "the number of idempotent ids currently tracked in the stream", "type": "integer" }, "iids-added": { "description": "the count of all entries with an idempotent id added to the stream during its lifetime", "type": "integer" }, "iids-duplicates": { "description": "the count of duplicate idempotent ids detected during the stream's lifetime", "type": "integer" }, "groups": { "description": "the number of consumer groups defined for the stream", "type": "integer" }, "first-entry": { "description": "the first entry of the stream", "oneOf": [ { "type": "null" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "data", "type": "array", "items": { "type": "string" } } ] } ] }, "last-entry": { "description": "the last entry of the stream", "oneOf": [ { "type": "null" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "data", "type": "array", "items": { "type": "string" } } ] } ] } } }, { "description": "Extended form, in case `FULL` was given.", "type": "object", "additionalProperties": false, "properties": { "length": { "description": "the number of entries in the stream (see `XLEN`)", "type": "integer" }, "radix-tree-keys": { "description": "the number of keys in the underlying radix data structure", "type": "integer" }, "radix-tree-nodes": { "description": "the number of nodes in the underlying radix data structure", "type": "integer" }, "last-generated-id": { "description": "the ID of the least-recently entry that was added to the stream", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "max-deleted-entry-id": { "description": "the maximal entry ID that was deleted from the stream", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "recorded-first-entry-id": { "description": "cached copy of the first entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "entries-added": { "description": "the count of all entries added to the stream during its lifetime", "type": "integer" }, "idmp-duration": { "description": "the duration in seconds that each iid is kept in the stream's IDMP map", "type": "integer" }, "idmp-maxsize": { "description": "the maximum number of most recent iids kept for each pid in the stream's IDMP map", "type": "integer" }, "pids-tracked": { "description": "the number of idempotent producer ids currently tracked in the stream", "type": "integer" }, "iids-tracked": { "description": "the number of idempotent ids currently tracked in the stream", "type": "integer" }, "iids-added": { "description": "the count of all entries with an idempotent id added to the stream during its lifetime", "type": "integer" }, "iids-duplicates": { "description": "the count of duplicate idempotent ids detected during the stream's lifetime", "type": "integer" }, "entries": { "description": "all the entries of the stream", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "data", "type": "array", "items": { "type": "string" } } ] } }, "groups": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "description": "group name", "type": "string" }, "last-delivered-id": { "description": "last entry ID that was delivered to a consumer", "type": "string", "pattern": "[0-9]+-[0-9]+" }, "entries-read": { "description": "total number of entries ever read by consumers in the group", "oneOf": [ { "type": "null" }, { "type": "integer" } ] }, "lag": { "description": "number of entries left to be consumed from the stream", "oneOf": [ { "type": "null" }, { "type": "integer" } ] }, "pel-count": { "description": "total number of unacknowledged entries", "type": "integer" }, "pending": { "description": "data about all of the unacknowledged entries", "type": "array", "items": { "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Consumer name", "type": "string" }, { "description": "Delivery timestamp", "type": "integer" }, { "description": "Delivery count", "type": "integer" } ] } }, "consumers": { "description": "data about all of the consumers of the group", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "active-time": { "type": "integer", "description": "Last time this consumer was active (successful reading/claiming).", "minimum": 0 }, "name": { "description": "consumer name", "type": "string" }, "seen-time": { "description": "timestamp of the last interaction attempt of the consumer", "type": "integer", "minimum": 0 }, "pel-count": { "description": "number of unacknowledged entries that belong to the consumer", "type": "integer" }, "pending": { "description": "data about the unacknowledged entries", "type": "array", "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Delivery timestamp", "type": "integer" }, { "description": "Delivery count", "type": "integer" } ] } } } } } } } } } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "full-block", "type": "block", "optional": true, "arguments": [ { "name": "full", "token": "FULL", "type": "pure-token" }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true } ] } ] } } sentinel-config.json000066400000010113152345610730010527 0ustar00{ "CONFIG": { "summary": "Configures Redis Sentinel.", "complexity": "O(N) when N is the number of configuration parameters provided", "group": "sentinel", "since": "6.2.0", "arity": -4, "container": "SENTINEL", "function": "sentinelCommand", "history": [ [ "7.2.0", "Added the ability to set and get multiple parameters in one call." ] ], "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "oneOf": [ { "type": "object", "description": "When 'SENTINEL-CONFIG GET' is called, returns a map.", "properties": { "resolve-hostnames": { "oneOf": [ { "const": "yes" }, { "const": "no" } ] }, "announce-hostnames": { "oneOf": [ { "const": "yes" }, { "const": "no" } ] }, "announce-ip": { "type": "string" }, "announce-port": { "type": "string" }, "sentinel-user": { "type": "string" }, "sentinel-pass": { "type": "string" }, "loglevel": { "oneOf": [ { "const": "debug" }, { "const": "verbose" }, { "const": "notice" }, { "const": "warning" }, { "const": "nothing" }, { "const": "unknown" } ] } }, "additionalProperties": false }, { "const": "OK", "description": "When 'SENTINEL-CONFIG SET' is called, returns OK on success." } ] }, "arguments": [ { "name":"action", "type":"oneof", "arguments":[ { "name":"set", "token":"SET", "type":"block", "multiple": true, "arguments":[ { "name":"parameter", "type":"string" }, { "name":"value", "type":"string" } ] }, { "token":"GET", "name":"parameter", "type":"string", "multiple": true } ] } ] } } watch.json000066400000002321152345610730006553 0ustar00{ "WATCH": { "summary": "Monitors changes to keys to determine the execution of a transaction.", "complexity": "O(1) for every key.", "group": "transactions", "since": "2.2.0", "arity": -2, "function": "watchCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "ALLOW_BUSY" ], "acl_categories": [ "TRANSACTION" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } acl-getuser.json000066400000006165152345610730007672 0ustar00{ "GETUSER": { "summary": "Lists the ACL rules of a user.", "complexity": "O(N). Where N is the number of password, command and pattern rules that the user has.", "group": "server", "since": "6.0.0", "arity": 3, "container": "ACL", "function": "aclCommand", "history": [ [ "6.2.0", "Added Pub/Sub channel patterns." ], [ "7.0.0", "Added selectors and changed the format of key and channel patterns from a list to their rule representation." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "arguments": [ { "name": "username", "type": "string" } ], "reply_schema": { "oneOf": [ { "description": "a set of ACL rule definitions for the user", "type": "object", "additionalProperties": false, "properties": { "flags": { "type": "array", "items": { "type": "string" } }, "passwords": { "type": "array", "items": { "type": "string" } }, "commands": { "description": "root selector's commands", "type": "string" }, "keys": { "description": "root selector's keys", "type": "string" }, "channels": { "description": "root selector's channels", "type": "string" }, "selectors": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "commands": { "type": "string" }, "keys": { "type": "string" }, "channels": { "type": "string" } } } } } }, { "description": "If user does not exist", "type": "null" } ] } } } memory-purge.json000066400000000752152345610730010103 0ustar00{ "PURGE": { "summary": "Asks the allocator to release memory.", "complexity": "Depends on how much memory is allocated, could be slow", "group": "server", "since": "4.0.0", "arity": 2, "container": "MEMORY", "function": "memoryCommand", "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } acl-help.json000066400000001103152345610730007127 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "type": "array", "description": "A list of subcommands and their description", "items": { "type": "string" } } } } command-help.json000066400000001203152345610730010007 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "5.0.0", "arity": 2, "container": "COMMAND", "function": "commandHelpCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } zdiffstore.json000066400000004224152345610730007630 0ustar00{ "ZDIFFSTORE": { "summary": "Stores the difference of multiple sorted sets in a key.", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "group": "sorted_set", "since": "6.2.0", "arity": -4, "function": "zdiffstoreCommand", "get_keys_function": "zunionInterDiffStoreGetKeys", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "reply_schema": { "description": "Number of elements in the resulting sorted set at `destination`", "type": "integer" }, "arguments": [ { "name": "destination", "type": "key", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 1, "multiple": true } ] } } publish.json000066400000002045152345610730007116 0ustar00{ "PUBLISH": { "summary": "Posts a message to a channel.", "complexity": "O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).", "group": "pubsub", "since": "2.0.0", "arity": 3, "function": "publishCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE", "FAST", "MAY_REPLICATE", "SENTINEL" ], "arguments": [ { "name": "channel", "type": "string" }, { "name": "message", "type": "string" } ], "reply_schema": { "description": "the number of clients that received the message. Note that in a Redis Cluster, only clients that are connected to the same node as the publishing client are included in the count", "type": "integer", "minimum": 0 } } } slowlog.json000066400000000316152345610730007135 0ustar00{ "SLOWLOG": { "summary": "A container for slow log commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "2.2.12", "arity": -2 } } incr.json000066400000002374152345610730006410 0ustar00{ "INCR": { "summary": "Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 2, "function": "incrCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "description": "The value of key after the increment", "type": "integer" } } } script-help.json000066400000001147152345610730007704 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "scripting", "since": "5.0.0", "arity": 2, "container": "SCRIPT", "function": "scriptCommand", "command_flags": [ "LOADING", "STALE" ], "acl_categories": [ "SCRIPTING" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } script.json000066400000000335152345610730006754 0ustar00{ "SCRIPT": { "summary": "A container for Lua scripts management commands.", "complexity": "Depends on subcommand.", "group": "scripting", "since": "2.6.0", "arity": -2 } } xread.json000066400000007055152345610730006561 0ustar00{ "XREAD": { "summary": "Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.", "group": "stream", "since": "5.0.0", "arity": -4, "function": "xreadCommand", "get_keys_function": "xreadGetKeys", "command_flags": [ "BLOCKING", "READONLY" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "keyword": { "keyword": "STREAMS", "startfrom": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 2 } } } ], "arguments": [ { "token": "COUNT", "name": "count", "type": "integer", "optional": true }, { "token": "BLOCK", "name": "milliseconds", "type": "integer", "optional": true }, { "name": "streams", "token": "STREAMS", "type": "block", "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "ID", "type": "string", "multiple": true } ] } ], "reply_schema": { "oneOf": [ { "description": "A map of key-value elements when each element composed of key name and the entries reported for that key", "type": "object", "patternProperties": { "^.*$": { "description": "The entries reported for that key", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "entry id", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "array of field-value pairs", "type": "array", "items": { "type": "string" } } ] } } } }, { "description": "If BLOCK option is given, and a timeout occurs, or there is no stream we can serve", "type": "null" } ] } } } client-setinfo.json000066400000002243152345610730010373 0ustar00{ "SETINFO": { "summary": "Sets information specific to the client or connection.", "complexity": "O(1)", "group": "connection", "since": "7.2.0", "arity": 4, "container": "CLIENT", "function": "clientSetinfoCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "attr", "type": "oneof", "arguments": [ { "token": "lib-name", "name": "libname", "type": "string" }, { "token": "lib-ver", "name": "libver", "type": "string" } ] } ] } } xreadgroup.json000066400000016352152345610730007636 0ustar00{ "XREADGROUP": { "summary": "Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise.", "complexity": "For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.", "group": "stream", "since": "5.0.0", "arity": -7, "function": "xreadCommand", "get_keys_function": "xreadGetKeys", "command_flags": [ "BLOCKING", "WRITE" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "keyword": { "keyword": "STREAMS", "startfrom": 4 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 2 } } } ], "arguments": [ { "token": "GROUP", "name": "group-block", "type": "block", "arguments": [ { "name": "group", "type": "string" }, { "name": "consumer", "type": "string" } ] }, { "token": "COUNT", "name": "count", "type": "integer", "optional": true }, { "token": "BLOCK", "name": "milliseconds", "type": "integer", "optional": true }, { "token": "CLAIM", "name": "min-idle-time", "type": "integer", "optional": true }, { "name": "noack", "token": "NOACK", "type": "pure-token", "optional": true }, { "name": "streams", "token": "STREAMS", "type": "block", "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "ID", "type": "string", "multiple": true } ] } ], "reply_schema": { "oneOf": [ { "description": "If BLOCK option is specified and the timeout expired", "type": "null" }, { "description": "A map of key-value elements when each element composed of key name and the entries reported for that key", "type": "object", "additionalProperties": { "description": "The entries reported for that key", "type": "array", "items": { "oneOf": [ { "description": "Entry without CLAIM option", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Stream id", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "oneOf": [ { "description": "Array of field-value pairs", "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } ] }, { "description": "Entry with CLAIM option - includes elapsed milliseconds and delivery count", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "description": "Stream id", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "oneOf": [ { "description": "Array of field-value pairs", "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, { "description": "Milliseconds elapsed since last delivery", "type": "integer" }, { "description": "Delivery count (0 for new messages, 1+ for claimed messages)", "type": "integer" } ] } ] } } } ] } } } module-list.json000066400000002727152345610730007715 0ustar00{ "LIST": { "summary": "Returns all loaded modules.", "complexity": "O(N) where N is the number of loaded modules.", "group": "server", "since": "4.0.0", "arity": 2, "container": "MODULE", "function": "moduleCommand", "command_flags": [ "ADMIN", "NOSCRIPT" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "reply_schema": { "type": "array", "description": "Returns information about the modules loaded to the server.", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "description": "Name of the module." }, "ver": { "type": "integer", "description": "Version of the module." }, "path": { "type": "string", "description": "Module path." }, "args": { "type": "array", "description": "Module arguments.", "items": { "type": "string" } } } } } } } hincrby.json000066400000002745152345610730007115 0ustar00{ "HINCRBY": { "summary": "Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.", "complexity": "O(1)", "group": "hash", "since": "2.0.0", "arity": 4, "function": "hincrbyCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The value of the field after the increment operation." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" }, { "name": "increment", "type": "integer" } ] } } discard.json000066400000001033152345610730007055 0ustar00{ "DISCARD": { "summary": "Discards a transaction.", "complexity": "O(N), when N is the number of queued commands", "group": "transactions", "since": "2.0.0", "arity": 1, "function": "discardCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "ALLOW_BUSY" ], "acl_categories": [ "TRANSACTION" ], "reply_schema": { "const": "OK" } } } function-delete.json000066400000001335152345610730010536 0ustar00{ "DELETE": { "summary": "Deletes a library and its functions.", "complexity": "O(1)", "group": "scripting", "since": "7.0.0", "arity": 3, "container": "FUNCTION", "function": "functionDeleteCommand", "command_flags": [ "NOSCRIPT", "WRITE" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "library-name", "type": "string" } ], "reply_schema": { "const": "OK" } } } setrange.json000066400000003231152345610730007256 0ustar00{ "SETRANGE": { "summary": "Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.", "complexity": "O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.", "group": "string", "since": "2.2.0", "arity": 4, "function": "setrangeCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Length of the string after it was modified by the command.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer" }, { "name": "value", "type": "string" } ] } } debug.json000066400000000676152345610730006546 0ustar00{ "DEBUG": { "summary": "A container for debugging commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "1.0.0", "arity": -2, "function": "debugCommand", "doc_flags": [ "SYSCMD" ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "PROTECTED" ] } } zpopmax.json000066400000005421152345610730007147 0ustar00{ "ZPOPMAX": { "summary": "Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "group": "sorted_set", "since": "5.0.0", "arity": -2, "function": "zpopmaxCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "type": "array", "description": "List of popped elements and scores when 'COUNT' isn't specified.", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Popped element." }, { "type": "number", "description": "Score." } ] }, { "type": "array", "description": "List of popped elements and scores when 'COUNT' is specified.", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "Popped element." }, { "type": "number", "description": "Score." } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true } ] } } sentinel-debug.json000066400000002700152345610730010353 0ustar00{ "DEBUG": { "summary": "Lists or updates the current configurable parameters of Redis Sentinel.", "complexity": "O(N) where N is the number of configurable parameters", "group": "sentinel", "since": "7.0.0", "arity": -2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "oneOf": [ { "description": "The configuration update was successful.", "const": "OK" }, { "description": "List of configurable time parameters and their values (milliseconds).", "type": "object", "additionalProperties": { "type": "string" } } ] }, "arguments": [ { "name": "data", "type": "block", "optional": true, "multiple": true, "arguments": [ { "name": "parameter", "type": "string" }, { "name": "value", "type": "string" } ] } ] } } pubsub-numsub.json000066400000001542152345610730010260 0ustar00{ "NUMSUB": { "summary": "Returns a count of subscribers to channels.", "complexity": "O(N) for the NUMSUB subcommand, where N is the number of requested channels", "group": "pubsub", "since": "2.8.0", "arity": -2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "PUBSUB", "LOADING", "STALE" ], "arguments": [ { "name": "channel", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "the number of subscribers per channel, each even element (including 0th) is channel name, each odd element is the number of subscribers", "type": "array" } } } cluster-delslotsrange.json000066400000001762152345610730012002 0ustar00{ "DELSLOTSRANGE": { "summary": "Sets hash slot ranges as unbound for a node.", "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", "group": "cluster", "since": "7.0.0", "arity": -4, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "range", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer" }, { "name": "end-slot", "type": "integer" } ] } ], "reply_schema": { "const": "OK" } } } pubsub-help.json000066400000001045152345610730007675 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "pubsub", "since": "6.2.0", "arity": 2, "container": "PUBSUB", "function": "pubsubCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } latency-help.json000066400000001050152345610730010030 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 2, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } cluster-meet.json000066400000001732152345610730010063 0ustar00{ "MEET": { "summary": "Forces a node to handshake with another node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": -4, "container": "CLUSTER", "function": "clusterCommand", "history": [ [ "4.0.0", "Added the optional `cluster_bus_port` argument." ] ], "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "ip", "type": "string" }, { "name": "port", "type": "integer" }, { "name": "cluster-bus-port", "type": "integer", "optional": true, "since": "4.0.0" } ], "reply_schema": { "const": "OK" } } } sadd.json000066400000003172152345610730006365 0ustar00{ "SADD": { "summary": "Adds one or more members to a set. Creates the key if it doesn't exist.", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "group": "set", "since": "1.0.0", "arity": -3, "function": "saddCommand", "history": [ [ "2.4.0", "Accepts multiple `member` arguments." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Number of elements that were added to the set, not including all the elements already present in the set.", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true } ] } } hincrbyfloat.json000066400000002752152345610730010141 0ustar00{ "HINCRBYFLOAT": { "summary": "Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.", "complexity": "O(1)", "group": "hash", "since": "2.6.0", "arity": 4, "function": "hincrbyfloatCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "string", "description": "The value of the field after the increment operation." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "field", "type": "string" }, { "name": "increment", "type": "double" } ] } } module-unload.json000066400000001065152345610730010216 0ustar00{ "UNLOAD": { "summary": "Unloads a module.", "complexity": "O(1)", "group": "server", "since": "4.0.0", "arity": 3, "container": "MODULE", "function": "moduleCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "PROTECTED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "name", "type": "string" } ] } } asking.json000066400000000661152345610730006726 0ustar00{ "ASKING": { "summary": "Signals that a cluster client is following an -ASK redirect.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 1, "function": "askingCommand", "command_flags": [ "FAST" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" } } } sentinel-flushconfig.json000066400000001074152345610730011577 0ustar00{ "FLUSHCONFIG": { "summary": "Rewrites the Redis Sentinel configuration file.", "complexity": "O(1)", "group": "sentinel", "since": "2.8.4", "arity": 2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "const": "OK", "description": "Force Sentinel to rewrite its configuration on disk, including the current Sentinel state." } } } save.json000066400000000742152345610730006410 0ustar00{ "SAVE": { "summary": "Synchronously saves the database(s) to disk.", "complexity": "O(N) where N is the total number of keys in all databases", "group": "server", "since": "1.0.0", "arity": 1, "function": "saveCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "NOSCRIPT", "NO_MULTI" ], "reply_schema": { "const": "OK" } } } getex.json000066400000005016152345610730006565 0ustar00{ "GETEX": { "summary": "Returns the string value of a key after setting its expiration time.", "complexity": "O(1)", "group": "string", "since": "6.2.0", "arity": -2, "function": "getexCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "notes": "RW and UPDATE because it changes the TTL", "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The value of the key.", "type": "string" }, { "description": "Key does not exist.", "type": "null" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "token": "EX" }, { "name": "milliseconds", "type": "integer", "token": "PX" }, { "name": "unix-time-seconds", "type": "unix-time", "token": "EXAT" }, { "name": "unix-time-milliseconds", "type": "unix-time", "token": "PXAT" }, { "name": "persist", "type": "pure-token", "token": "PERSIST" } ] } ] } } shutdown.json000066400000004156152345610730007330 0ustar00{ "SHUTDOWN": { "summary": "Synchronously saves the database(s) to disk and shuts down the Redis server.", "complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)", "group": "server", "since": "1.0.0", "arity": -1, "function": "shutdownCommand", "history": [ [ "7.0.0", "Added the `NOW`, `FORCE` and `ABORT` modifiers." ] ], "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "NO_MULTI", "SENTINEL", "ALLOW_BUSY" ], "arguments": [ { "name": "save-selector", "type": "oneof", "optional": true, "arguments": [ { "name": "nosave", "type": "pure-token", "token": "NOSAVE" }, { "name": "save", "type": "pure-token", "token": "SAVE" } ] }, { "name": "now", "type": "pure-token", "token": "NOW", "optional": true, "since": "7.0.0" }, { "name": "force", "type": "pure-token", "token": "FORCE", "optional": true, "since": "7.0.0" }, { "name": "abort", "type": "pure-token", "token": "ABORT", "optional": true, "since": "7.0.0" } ], "reply_schema": { "description": "OK if ABORT was specified and shutdown was aborted. On successful shutdown, nothing is returned since the server quits and the connection is closed. On failure, an error is returned.", "const": "OK" } } } acl-save.json000066400000001202152345610730007135 0ustar00{ "SAVE": { "summary": "Saves the effective ACL rules in the configured ACL file.", "complexity": "O(N). Where N is the number of configured users.", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } latency-histogram.json000066400000003540152345610730011103 0ustar00{ "HISTOGRAM": { "summary": "Returns the cumulative distribution of latencies of a subset or all commands.", "complexity": "O(N) where N is the number of commands with latency information being retrieved.", "group": "server", "since": "7.0.0", "arity": -2, "container": "LATENCY", "function": "latencyCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT", "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:SPECIAL" ], "reply_schema": { "type": "object", "description": "A map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets.", "patternProperties": { "^.*$": { "type": "object", "additionalProperties": false, "properties": { "calls": { "description": "The total calls for the command.", "type": "integer", "minimum": 0 }, "histogram_usec": { "description": "Histogram map, bucket id to latency", "type": "object", "additionalProperties": { "type": "integer" } } } } } }, "arguments": [ { "name": "COMMAND", "type": "string", "optional": true, "multiple": true } ] } } httl.json000066400000004640152345610730006426 0ustar00{ "HTTL": { "summary": "Returns the TTL in seconds of a hash field.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -5, "function": "httlCommand", "history": [], "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "HASH" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "The field exists but has no associated expire.", "const": -1 }, { "description": "TTL in seconds.", "type": "integer", "minimum": 1 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } cluster-links.json000066400000005054152345610730010252 0ustar00{ "LINKS": { "summary": "Returns a list of all TCP links to and from peer nodes.", "complexity": "O(N) where N is the total number of Cluster nodes", "group": "cluster", "since": "7.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "an array of cluster links and their attributes", "type": "array", "items": { "type": "object", "properties": { "direction": { "description": "This link is established by the local node _to_ the peer, or accepted by the local node _from_ the peer.", "oneOf": [ { "description": "connection initiated from peer", "const": "from" }, { "description": "connection initiated to peer", "const": "to" } ] }, "node": { "description": "the node id of the peer", "type": "string" }, "create-time": { "description": "unix time creation time of the link. (In the case of a _to_ link, this is the time when the TCP link is created by the local node, not the time when it is actually established.)", "type": "integer" }, "events": { "description": "events currently registered for the link. r means readable event, w means writable event", "type": "string" }, "send-buffer-allocated": { "description": "allocated size of the link's send buffer, which is used to buffer outgoing messages toward the peer", "type": "integer" }, "send-buffer-used": { "description": "size of the portion of the link's send buffer that is currently holding data(messages)", "type": "integer" } }, "additionalProperties": false } } } } lrange.json000066400000003064152345610730006722 0ustar00{ "LRANGE": { "summary": "Returns a range of elements from a list.", "complexity": "O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.", "group": "list", "since": "1.0.0", "arity": 4, "function": "lrangeCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "stop", "type": "integer" } ], "reply_schema": { "description": "List of elements in the specified range", "type": "array", "items": { "type": "string" } } } } georadius_ro.json000066400000015405152345610730010136 0ustar00{ "GEORADIUS_RO": { "summary": "Returns members from a geospatial index that are within a distance from a coordinate.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "group": "geo", "since": "3.2.10", "arity": -6, "function": "georadiusroCommand", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ], [ "7.0.0", "Added support for uppercase unit names." ] ], "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` with the `BYRADIUS` argument", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "READONLY" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "longitude", "type": "double" }, { "name": "latitude", "type": "double" }, { "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] }, { "name": "withcoord", "token": "WITHCOORD", "type": "pure-token", "optional": true }, { "name": "withdist", "token": "WITHDIST", "type": "pure-token", "optional": true }, { "name": "withhash", "token": "WITHHASH", "type": "pure-token", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true, "since": "6.2.0" } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] } ], "reply_schema": { "description": "Array of matched members information", "anyOf": [ { "description": "If no WITH* option is specified, array of matched members names", "type": "array", "items": { "description": "name", "type": "string" } }, { "type": "array", "items": { "type": "array", "minItems": 1, "maxItems": 4, "items": [ { "description": "Matched member name", "type": "string" } ], "additionalItems": { "oneOf": [ { "description": "If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius", "type": "string" }, { "description": "If WITHHASH option is specified, the geohash integer", "type": "integer" }, { "description": "If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "latitude (x)", "type": "number" }, { "description": "longitude (y)", "type": "number" } ] } ] } } } ] } } } cluster-saveconfig.json000066400000000710152345610730011250 0ustar00{ "SAVECONFIG": { "summary": "Forces a node to save the cluster configuration to disk.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "reply_schema": { "const": "OK" } } } pfdebug.json000066400000002327152345610730007067 0ustar00{ "PFDEBUG": { "summary": "Internal commands for debugging HyperLogLog values.", "complexity": "N/A", "group": "hyperloglog", "since": "2.8.9", "arity": 3, "function": "pfdebugCommand", "doc_flags": [ "SYSCMD" ], "command_flags": [ "WRITE", "DENYOOM", "ADMIN" ], "acl_categories": [ "HYPERLOGLOG" ], "key_specs": [ { "flags": [ "RW", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "subcommand", "type": "string" }, { "name": "key", "type": "key", "key_spec_index": 0 } ] } } pfselftest.json000066400000000754152345610730007634 0ustar00{ "PFSELFTEST": { "summary": "An internal command for testing HyperLogLog values.", "complexity": "N/A", "group": "hyperloglog", "since": "2.8.9", "arity": 1, "function": "pfselftestCommand", "doc_flags": [ "SYSCMD" ], "command_flags": [ "ADMIN" ], "acl_categories": [ "HYPERLOGLOG" ], "reply_schema": { "const": "OK" } } } lrem.json000066400000002702152345610730006407 0ustar00{ "LREM": { "summary": "Removes elements from a list. Deletes the list if the last element was removed.", "complexity": "O(N+M) where N is the length of the list and M is the number of elements removed.", "group": "list", "since": "1.0.0", "arity": 4, "function": "lremCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The number of removed elements.", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer" }, { "name": "element", "type": "string" } ] } } xpending.json000066400000015610152345610730007266 0ustar00{ "XPENDING": { "summary": "Returns the information and entries from a stream consumer group's pending entries list.", "complexity": "O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer.", "group": "stream", "since": "5.0.0", "arity": -3, "function": "xpendingCommand", "history": [ [ "6.2.0", "Added the `IDLE` option and exclusive range intervals." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Extended form, in case `start` was given.", "type": "array", "items": { "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "description": "Entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Consumer name", "type": "string" }, { "description": "Idle time", "type": "integer" }, { "description": "Delivery count", "type": "integer" } ] } }, { "description": "Summary form, in case `start` was not given.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "description": "Total number of pending messages", "type": "integer" }, { "description": "Minimal pending entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Maximal pending entry ID", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "Consuers with pending messages", "oneOf": [ { "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Consumer name", "type": "string" }, { "description": "Number of pending messages", "type": "string" } ] } }, { "type": "null", "description": "When there are no consumers with pending messages" } ] } ] }, { "description": "Summary form, in case `start` was not given and there are no pending messages.", "type": "array", "minItems": 4, "maxItems": 4, "items": [ { "description": "Total number of pending messages", "const": 0 }, { "type": "null" }, { "type": "null" }, { "type": "null" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "filters", "type": "block", "optional": true, "arguments": [ { "token": "IDLE", "name": "min-idle-time", "type": "integer", "optional": true, "since": "6.2.0" }, { "name": "start", "type": "string" }, { "name": "end", "type": "string" }, { "name": "count", "type": "integer" }, { "name": "consumer", "type": "string", "optional": true } ] } ] } } randomkey.json000066400000001576152345610730007451 0ustar00{ "RANDOMKEY": { "summary": "Returns a random key name from the database.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 1, "function": "randomkeyCommand", "command_flags": [ "READONLY", "TOUCHES_ARBITRARY_KEYS" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:SPECIAL", "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "oneOf": [ { "description": "when the database is empty", "type": "null" }, { "description": "random key in db", "type": "string" } ] } } } rpop.json000066400000004045152345610730006432 0ustar00{ "RPOP": { "summary": "Returns and removes the last elements of a list. Deletes the list if the last element was popped.", "complexity": "O(N) where N is the number of elements returned", "group": "list", "since": "1.0.0", "arity": -2, "function": "rpopCommand", "history": [ [ "6.2.0", "Added the `count` argument." ] ], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "Key does not exist." }, { "type": "string", "description": "When 'COUNT' was not given, the value of the last element." }, { "type": "array", "description": "When 'COUNT' was given, list of popped elements.", "items": { "type": "string" } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "optional": true, "since": "6.2.0" } ] } } config-resetstat.json000066400000001070152345610730010726 0ustar00{ "RESETSTAT": { "summary": "Resets the server's statistics.", "complexity": "O(1)", "group": "server", "since": "2.0.0", "arity": 2, "container": "CONFIG", "function": "configResetStatCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } module.json000066400000000312152345610730006730 0ustar00{ "MODULE": { "summary": "A container for module commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "4.0.0", "arity": -2 } } del.json000066400000003075152345610730006220 0ustar00{ "DEL": { "summary": "Deletes one or more keys.", "complexity": "O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).", "group": "generic", "since": "1.0.0", "arity": -2, "function": "delCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "REQUEST_POLICY:MULTI_SHARD", "RESPONSE_POLICY:AGG_SUM" ], "key_specs": [ { "flags": [ "RM", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "the number of keys that were removed", "type": "integer", "minimum": 0 }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true } ] } } lastsave.json000066400000001231152345610730007266 0ustar00{ "LASTSAVE": { "summary": "Returns the Unix timestamp of the last successful save to disk.", "complexity": "O(1)", "group": "server", "since": "1.0.0", "arity": 1, "function": "lastsaveCommand", "command_flags": [ "LOADING", "STALE", "FAST" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "acl_categories": [ "ADMIN", "DANGEROUS" ], "reply_schema": { "type": "integer", "description": "UNIX TIME of the last DB save executed with success." } } } smembers.json000066400000002501152345610730007262 0ustar00{ "SMEMBERS": { "summary": "Returns all members of a set.", "complexity": "O(N) where N is the set cardinality.", "group": "set", "since": "1.0.0", "arity": 2, "function": "smembersCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "SET" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "description": "All elements of the set.", "uniqueItems": true, "items": { "type": "string" } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } zrangestore.json000066400000006331152345610730010015 0ustar00{ "ZRANGESTORE": { "summary": "Stores a range of members from sorted set in a key.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.", "group": "sorted_set", "since": "6.2.0", "arity": -5, "function": "zrangestoreCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "OW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "Number of elements in the resulting sorted set." }, "arguments": [ { "name": "dst", "type": "key", "key_spec_index": 0 }, { "name": "src", "type": "key", "key_spec_index": 1 }, { "name": "min", "type": "string" }, { "name": "max", "type": "string" }, { "name": "sortby", "type": "oneof", "optional": true, "arguments": [ { "name": "byscore", "type": "pure-token", "token": "BYSCORE" }, { "name": "bylex", "type": "pure-token", "token": "BYLEX" } ] }, { "name": "rev", "token": "REV", "type": "pure-token", "optional": true }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] } ] } } cluster-info.json000066400000001157152345610730010065 0ustar00{ "INFO": { "summary": "Returns information about the state of a node.", "complexity": "O(1)", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "A map between named fields and values in the form of : lines separated by newlines composed by the two bytes CRLF", "type": "string" } } } type.json000066400000002500152345610730006425 0ustar00{ "TYPE": { "summary": "Determines the type of value stored at a key.", "complexity": "O(1)", "group": "generic", "since": "1.0.0", "arity": 2, "function": "typeCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "Key doesn't exist", "type": "null" }, { "description": "Type of the key", "type": "string" } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } decr.json000066400000002403152345610730006363 0ustar00{ "DECR": { "summary": "Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 2, "function": "decrCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The value of the key after decrementing it." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } client-help.json000066400000001201152345610730007645 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "connection", "since": "5.0.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } blpop.json000066400000004552152345610730006571 0ustar00{ "BLPOP": { "summary": "Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "complexity": "O(N) where N is the number of provided keys.", "group": "list", "since": "2.0.0", "arity": -3, "function": "blpopCommand", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "command_flags": [ "WRITE", "BLOCKING" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -2, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "null", "description": "No element could be popped and timeout expired" }, { "description": "The key from which the element was popped and the value of the popped element", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "List key from which the element was popped.", "type": "string" }, { "description": "Value of the popped element.", "type": "string" } ] } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double" } ] } } command-count.json000066400000001067152345610730010217 0ustar00{ "COUNT": { "summary": "Returns a count of commands.", "complexity": "O(1)", "group": "server", "since": "2.8.13", "arity": 2, "container": "COMMAND", "function": "commandCountCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "description": "Number of total commands in this Redis server.", "type": "integer" } } } script-load.json000066400000001551152345610730007672 0ustar00{ "LOAD": { "summary": "Loads a server-side Lua script to the script cache.", "complexity": "O(N) with N being the length in bytes of the script body.", "group": "scripting", "since": "2.6.0", "arity": 3, "container": "SCRIPT", "function": "scriptCommand", "command_flags": [ "NOSCRIPT", "STALE" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "script", "type": "string" } ], "reply_schema": { "description": "The SHA1 digest of the script added into the script cache", "type": "string" } } } failover.json000066400000002704152345610730007261 0ustar00{ "FAILOVER": { "summary": "Starts a coordinated failover from a server to one of its replicas.", "complexity": "O(1)", "group": "server", "since": "6.2.0", "arity": -1, "function": "failoverCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "STALE" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "target", "token": "TO", "type": "block", "optional": true, "arguments": [ { "name": "host", "type": "string" }, { "name": "port", "type": "integer" }, { "token": "FORCE", "name": "force", "type": "pure-token", "optional": true } ] }, { "token": "ABORT", "name": "abort", "type": "pure-token", "optional": true }, { "token": "TIMEOUT", "name": "milliseconds", "type": "integer", "optional": true } ] } } client-id.json000066400000001101152345610730007310 0ustar00{ "ID": { "summary": "Returns the unique client ID of the connection.", "complexity": "O(1)", "group": "connection", "since": "5.0.0", "arity": 2, "container": "CLIENT", "function": "clientCommand", "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "type": "integer", "description": "The id of the client" } } } xgroup-destroy.json000066400000002727152345610730010472 0ustar00{ "DESTROY": { "summary": "Destroys a consumer group.", "complexity": "O(N) where N is the number of entries in the group's pending entries list (PEL).", "group": "stream", "since": "5.0.0", "arity": 4, "container": "XGROUP", "function": "xgroupCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" } ], "reply_schema": { "description": "The number of destroyed consumer groups (0 or 1)", "oneOf": [ { "const": 1 }, { "const": 0 } ] } } } eval.json000066400000003544152345610730006404 0ustar00{ "EVAL": { "summary": "Executes a server-side Lua script.", "complexity": "Depends on the script that is executed.", "group": "scripting", "since": "2.6.0", "arity": -3, "function": "evalCommand", "get_keys_function": "evalGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "MAY_REPLICATE", "NO_MANDATORY_KEYS", "STALE" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE", "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "script", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the script that is executed" } } } zcard.json000066400000002262152345610730006554 0ustar00{ "ZCARD": { "summary": "Returns the number of members in a sorted set.", "complexity": "O(1)", "group": "sorted_set", "since": "1.2.0", "arity": 2, "function": "zcardCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "The cardinality (number of elements) of the sorted set, or 0 if key does not exist", "type": "integer" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } expiretime.json000066400000003123152345610730007621 0ustar00{ "EXPIRETIME": { "summary": "Returns the expiration time of a key as a Unix timestamp.", "complexity": "O(1)", "group": "generic", "since": "7.0.0", "arity": 2, "function": "expiretimeCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "KEYSPACE" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "type": "integer", "description": "Expiration Unix timestamp in seconds.", "minimum": 0 }, { "const": -1, "description": "The key exists but has no associated expiration time." }, { "const": -2, "description": "The key does not exist." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } zrange.json000066400000010012152345610730006727 0ustar00{ "ZRANGE": { "summary": "Returns members in a sorted set within a range of indexes.", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.", "group": "sorted_set", "since": "1.2.0", "arity": -4, "function": "zrangeCommand", "history": [ [ "6.2.0", "Added the `REV`, `BYSCORE`, `BYLEX` and `LIMIT` options." ] ], "command_flags": [ "READONLY" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "anyOf": [ { "description": "A list of member elements", "type": "array", "uniqueItems": true, "items": { "type": "string" } }, { "description": "Members and their scores. Returned in case `WITHSCORES` was used. In RESP2 this is returned as a flat array", "type": "array", "uniqueItems": true, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "Member", "type": "string" }, { "description": "Score", "type": "number" } ] } } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "string" }, { "name": "stop", "type": "string" }, { "name": "sortby", "type": "oneof", "optional": true, "since": "6.2.0", "arguments": [ { "name": "byscore", "type": "pure-token", "token": "BYSCORE" }, { "name": "bylex", "type": "pure-token", "token": "BYLEX" } ] }, { "name": "rev", "token": "REV", "type": "pure-token", "optional": true, "since": "6.2.0" }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "since": "6.2.0", "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] }, { "name": "withscores", "token": "WITHSCORES", "type": "pure-token", "optional": true } ] } } xgroup-create.json000066400000004223152345610730010235 0ustar00{ "CREATE": { "summary": "Creates a consumer group.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": -5, "container": "XGROUP", "function": "xgroupCommand", "history": [ [ "7.0.0", "Added the `entries_read` named argument." ] ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RW", "INSERT" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "group", "type": "string" }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "id", "type": "string" }, { "name": "new-id", "type": "pure-token", "token": "$" } ] }, { "token": "MKSTREAM", "name": "mkstream", "type": "pure-token", "optional": true }, { "name": "entriesread", "display": "entries-read", "token": "ENTRIESREAD", "type": "integer", "optional": true } ], "reply_schema": { "const": "OK" } } } georadiusbymember.json000066400000021156152345610730011161 0ustar00{ "GEORADIUSBYMEMBER": { "summary": "Queries a geospatial index for members within a distance from a member, optionally stores the result.", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "group": "geo", "since": "3.2.0", "arity": -5, "function": "georadiusbymemberCommand", "get_keys_function": "georadiusGetKeys", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ], [ "7.0.0", "Added support for uppercase unit names." ] ], "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` and `FROMMEMBER` arguments", "doc_flags": [ "DEPRECATED" ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "keyword": { "keyword": "STORE", "startfrom": 5 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "flags": [ "OW", "UPDATE" ], "begin_search": { "keyword": { "keyword": "STOREDIST", "startfrom": 5 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" }, { "name": "radius", "type": "double" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "token": "m" }, { "name": "km", "type": "pure-token", "token": "km" }, { "name": "ft", "type": "pure-token", "token": "ft" }, { "name": "mi", "type": "pure-token", "token": "mi" } ] }, { "name": "withcoord", "token": "WITHCOORD", "type": "pure-token", "optional": true }, { "name": "withdist", "token": "WITHDIST", "type": "pure-token", "optional": true }, { "name": "withhash", "token": "WITHHASH", "type": "pure-token", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "token": "COUNT", "name": "count", "type": "integer" }, { "name": "any", "token": "ANY", "type": "pure-token", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "store", "type": "oneof", "optional": true, "arguments": [ { "token": "STORE", "name": "storekey", "display": "key", "type": "key", "key_spec_index": 1 }, { "token": "STOREDIST", "name": "storedistkey", "display": "key", "type": "key", "key_spec_index": 2 } ] } ], "reply_schema": { "description": "Array of matched members information", "anyOf": [ { "description": "If no WITH* option is specified, array of matched members names", "type": "array", "items": { "description": "name", "type": "string" } }, { "type": "array", "items": { "type": "array", "minItems": 1, "maxItems": 4, "items": [ { "description": "Matched member name", "type": "string" } ], "additionalItems": { "oneOf": [ { "description": "If WITHDIST option is specified, the distance from the center as a floating point number, in the same unit specified in the radius", "type": "string" }, { "description": "If WITHHASH option is specified, the geohash integer", "type": "integer" }, { "description": "If WITHCOORD option is specified, the coordinates as a two items x,y array (longitude,latitude)", "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "description": "latitude (x)", "type": "number" }, { "description": "longitude (y)", "type": "number" } ] } ] } } }, { "description": "number of items stored in key", "type": "integer" } ] } } } msetnx.json000066400000003450152345610730006767 0ustar00{ "MSETNX": { "summary": "Atomically modifies the string values of one or more keys only when all keys don't exist.", "complexity": "O(N) where N is the number of keys to set.", "group": "string", "since": "1.0.1", "arity": -3, "function": "msetnxCommand", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "OW", "INSERT" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": -1, "step": 2, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "No key was set (at least one key already existed).", "const": 0 }, { "description": "All the keys were set.", "const": 1 } ] }, "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "value", "type": "string" } ] } ] } } auth.json000066400000002020152345610730006402 0ustar00{ "AUTH": { "summary": "Authenticates the connection.", "complexity": "O(N) where N is the number of passwords defined for the user", "group": "connection", "since": "1.0.0", "arity": -2, "function": "authCommand", "history": [ [ "6.0.0", "Added ACL style (username and password)." ] ], "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "NO_AUTH", "SENTINEL", "ALLOW_BUSY" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "username", "type": "string", "optional": true, "since": "6.0.0" }, { "name": "password", "type": "string" } ] } } xadd.json000066400000017055152345610730006377 0ustar00{ "XADD": { "summary": "Appends a new message to a stream. Creates the key if it doesn't exist.", "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.", "group": "stream", "since": "5.0.0", "arity": -5, "function": "xaddCommand", "history": [ [ "6.2.0", "Added the `NOMKSTREAM` option, `MINID` trimming strategy and the `LIMIT` option." ], [ "7.0.0", "Added support for the `-*` explicit ID form." ], [ "8.2.0", "Added the `KEEPREF`, `DELREF` and `ACKED` options." ] ], "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STREAM" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "notes": "UPDATE instead of INSERT because of the optional trimming feature", "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "token": "NOMKSTREAM", "name": "nomkstream", "type": "pure-token", "optional": true, "since": "6.2.0" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "keepref", "type": "pure-token", "token": "KEEPREF" }, { "name": "delref", "type": "pure-token", "token": "DELREF" }, { "name": "acked", "type": "pure-token", "token": "ACKED" } ] }, { "name": "idmp", "type": "oneof", "optional": true, "arguments": [ { "name": "idmpauto-with-pid", "type": "block", "arguments": [ { "token": "IDMPAUTO", "name": "idmpauto-token", "type": "pure-token" }, { "name": "pid", "type": "string", "display_text": "producer-id" } ] }, { "name": "idmp-with-pid-iid", "type": "block", "arguments": [ { "token": "IDMP", "name": "idmp-token", "type": "pure-token" }, { "name": "pid", "type": "string", "display_text": "producer-id" }, { "name": "iid", "type": "string", "display_text": "idempotent-id" } ] } ] }, { "name": "trim", "type": "block", "optional": true, "arguments": [ { "name": "strategy", "type": "oneof", "arguments": [ { "name": "maxlen", "type": "pure-token", "token": "MAXLEN" }, { "name": "minid", "type": "pure-token", "token": "MINID", "since": "6.2.0" } ] }, { "name": "operator", "type": "oneof", "optional": true, "arguments": [ { "name": "equal", "type": "pure-token", "token": "=" }, { "name": "approximately", "type": "pure-token", "token": "~" } ] }, { "name": "threshold", "type": "string" }, { "token": "LIMIT", "name": "count", "type": "integer", "optional": true, "since": "6.2.0" } ] }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "auto-id", "type": "pure-token", "token": "*" }, { "name": "id", "type": "string" } ] }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string" }, { "name": "value", "type": "string" } ] } ], "reply_schema": { "oneOf":[ { "description": "The ID of the added entry. The ID is the one auto-generated if * is passed as ID argument, otherwise the command just returns the same ID specified by the user during insertion.", "type": "string", "pattern": "[0-9]+-[0-9]+" }, { "description": "The NOMKSTREAM option is given and the key doesn't exist.", "type": "null" } ] } } } command-info.json000066400000025445152345610730010030 0ustar00{ "INFO": { "summary": "Returns information about one, multiple or all commands.", "complexity": "O(N) where N is the number of commands to look up", "group": "server", "since": "2.8.13", "arity": -2, "container": "COMMAND", "function": "commandInfoCommand", "history": [ [ "7.0.0", "Allowed to be called with no argument to get info on all commands." ] ], "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "arguments": [ { "name": "command-name", "type": "string", "optional": true, "multiple": true } ], "reply_schema": { "type": "array", "items": { "oneOf": [ { "description": "command does not exist", "type": "null" }, { "description": "command info array output", "type": "array", "minItems": 10, "maxItems": 10, "items": [ { "description": "command name", "type": "string" }, { "description": "command arity", "type": "integer" }, { "description": "command flags", "type": "array", "items": { "description": "command flag", "type": "string" } }, { "description": "command first key index", "type": "integer" }, { "description": "command last key index", "type": "integer" }, { "description": "command key step index", "type": "integer" }, { "description": "command categories", "type": "array", "items": { "description": "command category", "type": "string" } }, { "description": "command tips", "type": "array", "items": { "description": "command tip", "type": "string" } }, { "description": "command key specs", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "notes": { "type": "string" }, "flags": { "type": "array", "items": { "type": "string" } }, "begin_search": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string" }, "spec": { "anyOf": [ { "description": "unknown type, empty map", "type": "object", "additionalProperties": false }, { "description": "index type", "type": "object", "additionalProperties": false, "properties": { "index": { "type": "integer" } } }, { "description": "keyword type", "type": "object", "additionalProperties": false, "properties": { "keyword": { "type": "string" }, "startfrom": { "type": "integer" } } } ] } } }, "find_keys": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "string" }, "spec": { "anyOf": [ { "description": "unknown type", "type": "object", "additionalProperties": false }, { "description": "range type", "type": "object", "additionalProperties": false, "properties": { "lastkey": { "type": "integer" }, "keystep": { "type": "integer" }, "limit": { "type": "integer" } } }, { "description": "keynum type", "type": "object", "additionalProperties": false, "properties": { "keynumidx": { "type": "integer" }, "firstkey": { "type": "integer" }, "keystep": { "type": "integer" } } } ] } } } } } }, { "type": "array", "description": "subcommands" } ] } ] } } } } function-flush.json000066400000002257152345610730010421 0ustar00{ "FLUSH": { "summary": "Deletes all libraries and functions.", "complexity": "O(N) where N is the number of functions deleted", "group": "scripting", "since": "7.0.0", "arity": -2, "container": "FUNCTION", "function": "functionFlushCommand", "command_flags": [ "NOSCRIPT", "WRITE" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "token": "ASYNC" }, { "name": "sync", "type": "pure-token", "token": "SYNC" } ] } ], "reply_schema": { "const": "OK" } } } sort.json000066400000012006152345610730006435 0ustar00{ "SORT": { "summary": "Sorts the elements in a list, a set, or a sorted set, optionally storing the result.", "complexity": "O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is O(N).", "group": "generic", "since": "1.0.0", "arity": -2, "function": "sortCommand", "get_keys_function": "sortGetKeys", "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "SET", "SORTEDSET", "LIST", "DANGEROUS" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } }, { "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort", "flags": [ "RO", "ACCESS" ], "begin_search": { "unknown": null }, "find_keys": { "unknown": null } }, { "notes": "For the optional STORE keyword. It is marked 'unknown' because the keyword can appear anywhere in the argument array", "flags": [ "OW", "UPDATE" ], "begin_search": { "unknown": null }, "find_keys": { "unknown": null } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "token": "BY", "name": "by-pattern", "display": "pattern", "type": "pattern", "key_spec_index": 1, "optional": true }, { "token": "LIMIT", "name": "limit", "type": "block", "optional": true, "arguments": [ { "name": "offset", "type": "integer" }, { "name": "count", "type": "integer" } ] }, { "token": "GET", "name": "get-pattern", "display": "pattern", "key_spec_index": 1, "type": "pattern", "optional": true, "multiple": true, "multiple_token": true }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "token": "ASC" }, { "name": "desc", "type": "pure-token", "token": "DESC" } ] }, { "name": "sorting", "token": "ALPHA", "type": "pure-token", "optional": true }, { "token": "STORE", "name": "destination", "type": "key", "key_spec_index": 2, "optional": true } ], "reply_schema": { "oneOf": [ { "description": "when the store option is specified the command returns the number of sorted elements in the destination list", "type": "integer", "minimum": 0 }, { "description": "when not passing the store option the command returns a list of sorted elements", "type": "array", "items": { "oneOf": [ { "type": "string" }, { "description": "GET option is specified, but no object was found", "type": "null" } ] } } ] } } } hello.json000066400000006513152345610730006557 0ustar00{ "HELLO": { "summary": "Handshakes with the Redis server.", "complexity": "O(1)", "group": "connection", "since": "6.0.0", "arity": -1, "function": "helloCommand", "history": [ [ "6.2.0", "`protover` made optional; when called without arguments the command reports the current connection's context." ] ], "command_flags": [ "NOSCRIPT", "LOADING", "STALE", "FAST", "NO_AUTH", "SENTINEL", "ALLOW_BUSY" ], "acl_categories": [ "CONNECTION" ], "reply_schema": { "type": "object", "additionalProperties": false, "properties": { "server": { "type": "string" }, "version": { "type": "string" }, "proto": { "const": 3 }, "id": { "type": "integer" }, "mode": { "type": "string" }, "role": { "type": "string" }, "modules": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "ver": { "type": "integer" }, "path": { "type": "string" }, "args": { "type": "array", "items": { "type": "string" } } } } } } }, "arguments": [ { "name": "arguments", "type": "block", "optional": true, "arguments": [ { "name": "protover", "type": "integer" }, { "token": "AUTH", "name": "auth", "type": "block", "optional": true, "arguments": [ { "name": "username", "type": "string" }, { "name": "password", "type": "string" } ] }, { "token": "SETNAME", "name": "clientname", "type": "string", "optional": true } ] } ] } } script-exists.json000066400000002531152345610730010271 0ustar00{ "EXISTS": { "summary": "Determines whether server-side Lua scripts exist in the script cache.", "complexity": "O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).", "group": "scripting", "since": "2.6.0", "arity": -3, "container": "SCRIPT", "function": "scriptCommand", "command_flags": [ "NOSCRIPT" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:AGG_LOGICAL_AND" ], "arguments": [ { "name": "sha1", "type": "string", "multiple": true } ], "reply_schema": { "description": "An array of integers that correspond to the specified SHA1 digest arguments.", "type": "array", "items": { "oneOf": [ { "description": "sha1 hash exists in script cache", "const": 1 }, { "description": "sha1 hash does not exist in script cache", "const": 0 } ] } } } } zmscore.json000066400000003437152345610730007140 0ustar00{ "ZMSCORE": { "summary": "Returns the score of one or more members in a sorted set.", "complexity": "O(N) where N is the number of members being requested.", "group": "sorted_set", "since": "6.2.0", "arity": -3, "function": "zmscoreCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SORTEDSET" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "number", "description": "The score of the member (a double precision floating point number). In RESP2, this is returned as string." }, { "type": "null", "description": "Member does not exist in the sorted set." } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "multiple": true } ] } } sentinel-pending-scripts.json000066400000003277152345610730012410 0ustar00{ "PENDING-SCRIPTS": { "summary": "Returns information about pending scripts for Redis Sentinel.", "group": "sentinel", "since": "2.8.4", "arity": 2, "container": "SENTINEL", "function": "sentinelCommand", "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ], "reply_schema": { "type": "array", "description": "List of pending scripts.", "items": { "type": "object", "additionalProperties": false, "properties": { "argv": { "type": "array", "description": "Script arguments.", "items": { "type": "string" } }, "flags": { "type": "string", "description": "Script flags." }, "pid": { "type": "string", "description": "Script pid." }, "run-time": { "type": "string", "description": "Script run-time." }, "run-delay": { "type": "string", "description": "Script run-delay." }, "retry-num": { "type": "string", "description": "Number of times we tried to execute the script." } } } } } } sismember.json000066400000002734152345610730007443 0ustar00{ "SISMEMBER": { "summary": "Determines whether a member belongs to a set.", "complexity": "O(1)", "group": "set", "since": "1.0.0", "arity": 3, "function": "sismemberCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "SET" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "const": 0, "description": "The element is not a member of the set, or the key does not exist." }, { "const": 1, "description": "The element is a member of the set." } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "member", "type": "string" } ] } } cluster-addslots.json000066400000001205152345610730010741 0ustar00{ "ADDSLOTS": { "summary": "Assigns new hash slots to a node.", "complexity": "O(N) where N is the total number of hash slot arguments", "group": "cluster", "since": "3.0.0", "arity": -3, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "NO_ASYNC_LOADING", "ADMIN", "STALE" ], "arguments": [ { "name": "slot", "type": "integer", "multiple": true } ], "reply_schema": { "const": "OK" } } } flushall.json000066400000002751152345610730007266 0ustar00{ "FLUSHALL": { "summary": "Removes all keys from all databases.", "complexity": "O(N) where N is the total number of keys in all databases", "group": "server", "since": "1.0.0", "arity": -1, "function": "flushallCommand", "history": [ [ "4.0.0", "Added the `ASYNC` flushing mode modifier." ], [ "6.2.0", "Added the `SYNC` flushing mode modifier." ] ], "command_flags": [ "WRITE" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "token": "ASYNC", "since": "4.0.0" }, { "name": "sync", "type": "pure-token", "token": "SYNC", "since": "6.2.0" } ] } ] } } xinfo.json000066400000000327152345610730006574 0ustar00{ "XINFO": { "summary": "A container for stream introspection commands.", "complexity": "Depends on subcommand.", "group": "stream", "since": "5.0.0", "arity": -2 } } sentinel.json000066400000000505152345610730007270 0ustar00{ "SENTINEL": { "summary": "A container for Redis Sentinel commands.", "complexity": "Depends on subcommand.", "group": "sentinel", "since": "2.8.4", "arity": -2, "command_flags": [ "ADMIN", "SENTINEL", "ONLY_SENTINEL" ] } } evalsha_ro.json000066400000003366152345610730007602 0ustar00{ "EVALSHA_RO": { "summary": "Executes a read-only server-side Lua script by SHA1 digest.", "complexity": "Depends on the script that is executed.", "group": "scripting", "since": "7.0.0", "arity": -3, "function": "evalShaRoCommand", "get_keys_function": "evalGetKeys", "command_flags": [ "NOSCRIPT", "SKIP_MONITOR", "NO_MANDATORY_KEYS", "STALE", "READONLY" ], "acl_categories": [ "SCRIPTING" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "keynum": { "keynumidx": 0, "firstkey": 1, "step": 1 } } } ], "arguments": [ { "name": "sha1", "type": "string" }, { "name": "numkeys", "type": "integer" }, { "name": "key", "type": "key", "key_spec_index": 0, "optional":true, "multiple": true }, { "name": "arg", "type": "string", "optional":true, "multiple": true } ], "reply_schema": { "description": "Return value depends on the script that is executed" } } } acl-list.json000066400000001215152345610730007156 0ustar00{ "LIST": { "summary": "Dumps the effective rules in ACL file format.", "complexity": "O(N). Where N is the number of configured users.", "group": "server", "since": "6.0.0", "arity": 2, "container": "ACL", "function": "aclCommand", "command_flags": [ "ADMIN", "NOSCRIPT", "LOADING", "STALE", "SENTINEL" ], "reply_schema": { "type": "array", "description": "A list of currently active ACL rules", "items": { "type": "string" } } } } script-kill.json000066400000001140152345610730007700 0ustar00{ "KILL": { "summary": "Terminates a server-side Lua script during execution.", "complexity": "O(1)", "group": "scripting", "since": "2.6.0", "arity": 2, "container": "SCRIPT", "function": "scriptCommand", "command_flags": [ "NOSCRIPT", "ALLOW_BUSY" ], "acl_categories": [ "SCRIPTING" ], "command_tips": [ "REQUEST_POLICY:ALL_SHARDS", "RESPONSE_POLICY:ONE_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } decrby.json000066400000002562152345610730006724 0ustar00{ "DECRBY": { "summary": "Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn't exist.", "complexity": "O(1)", "group": "string", "since": "1.0.0", "arity": 3, "function": "decrbyCommand", "command_flags": [ "WRITE", "DENYOOM", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "integer", "description": "The value of the key after decrementing it." }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "decrement", "type": "integer" } ] } } object-refcount.json000066400000002320152345610730010535 0ustar00{ "REFCOUNT": { "summary": "Returns the reference count of a value of a key.", "complexity": "O(1)", "group": "generic", "since": "2.2.3", "arity": 3, "container": "OBJECT", "function": "objectCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "KEYSPACE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "description": "the number of references", "type": "integer" } } } cluster-help.json000066400000001050152345610730010052 0ustar00{ "HELP": { "summary": "Returns helpful text about the different subcommands.", "complexity": "O(1)", "group": "cluster", "since": "5.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "LOADING", "STALE" ], "reply_schema": { "type": "array", "description": "Helpful text about subcommands.", "items": { "type": "string" } } } } ltrim.json000066400000002542152345610730006601 0ustar00{ "LTRIM": { "summary": "Removes elements from both ends a list. Deletes the list if all elements were trimmed.", "complexity": "O(N) where N is the number of elements to be removed by the operation.", "group": "list", "since": "1.0.0", "arity": 4, "function": "ltrimCommand", "command_flags": [ "WRITE" ], "acl_categories": [ "LIST" ], "key_specs": [ { "flags": [ "RW", "DELETE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "const": "OK" }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer" }, { "name": "stop", "type": "integer" } ] } } slowlog-reset.json000066400000001120152345610730010247 0ustar00{ "RESET": { "summary": "Clears all entries from the slow log.", "complexity": "O(N) where N is the number of entries in the slowlog", "group": "server", "since": "2.2.12", "arity": 2, "container": "SLOWLOG", "function": "slowlogCommand", "command_flags": [ "ADMIN", "LOADING", "STALE" ], "command_tips": [ "REQUEST_POLICY:ALL_NODES", "RESPONSE_POLICY:ALL_SUCCEEDED" ], "reply_schema": { "const": "OK" } } } xlen.json000066400000002227152345610730006420 0ustar00{ "XLEN": { "summary": "Return the number of messages in a stream.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 2, "function": "xlenCommand", "command_flags": [ "READONLY", "FAST" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ], "reply_schema": { "description": "The number of entries of the stream at key", "type": "integer", "minimum": 0 } } } xinfo-groups.json000066400000005000152345610730010102 0ustar00{ "GROUPS": { "summary": "Returns a list of the consumer groups of a stream.", "complexity": "O(1)", "group": "stream", "since": "5.0.0", "arity": 3, "container": "XINFO", "history": [ [ "7.0.0", "Added the `entries-read` and `lag` fields" ] ], "function": "xinfoCommand", "command_flags": [ "READONLY" ], "acl_categories": [ "STREAM" ], "key_specs": [ { "flags": [ "RO", "ACCESS" ], "begin_search": { "index": { "pos": 2 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "consumers": { "type": "integer" }, "pending": { "type": "integer" }, "last-delivered-id": { "type": "string", "pattern": "[0-9]+-[0-9]+" }, "entries-read": { "oneOf": [ { "type": "null" }, { "type": "integer" } ] }, "lag": { "oneOf": [ { "type": "null" }, { "type": "integer" } ] } } } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 } ] } } psubscribe.json000066400000001226152345610730007611 0ustar00{ "PSUBSCRIBE": { "summary": "Listens for messages published to channels that match one or more patterns.", "complexity": "O(N) where N is the number of patterns to subscribe to.", "group": "pubsub", "since": "2.0.0", "arity": -2, "function": "psubscribeCommand", "command_flags": [ "PUBSUB", "NOSCRIPT", "LOADING", "STALE", "SENTINEL", "DENYOOM" ], "arguments": [ { "name": "pattern", "type": "pattern", "multiple": true } ] } } delex.json000066400000005125152345610730006553 0ustar00{ "DELEX": { "summary": "Conditionally removes the specified key based on value or digest comparison.", "complexity": "O(1) for IFEQ/IFNE, O(N) for IFDEQ/IFDNE where N is the length of the string value.", "group": "string", "since": "8.4.0", "arity": -2, "function": "delexCommand", "get_keys_function": "delexGetKeys", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "STRING" ], "key_specs": [ { "flags": [ "RW", "DELETE", "VARIABLE_FLAGS" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "oneOf": [ { "description": "The key exists but holds a non-string value", "const": "WRONGTYPE" }, { "description": "The key does not exist or the specified condition was not met.", "const": 0 }, { "description": "The key was deleted.", "const": 1 } ] }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "ifeq-value", "type": "string", "token": "IFEQ" }, { "name": "ifne-value", "type": "string", "token": "IFNE" }, { "name": "ifdeq-digest", "type": "integer", "token": "IFDEQ" }, { "name": "ifdne-digest", "type": "integer", "token": "IFDNE" } ] } ] } } command-docs.json000066400000022004152345610730010011 0ustar00{ "DOCS": { "summary": "Returns documentary information about one, multiple or all commands.", "complexity": "O(N) where N is the number of commands to look up", "group": "server", "since": "7.0.0", "arity": -2, "container": "COMMAND", "function": "commandDocsCommand", "command_flags": [ "LOADING", "STALE", "SENTINEL" ], "acl_categories": [ "CONNECTION" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT_ORDER" ], "reply_schema": { "description": "A map where each key is a command name, and each value is the documentary information", "type": "object", "additionalProperties": false, "patternProperties": { "^.*$": { "type": "object", "additionalProperties": false, "properties": { "summary": { "description": "short command description", "type": "string" }, "since": { "description": "the Redis version that added the command (or for module commands, the module version).", "type": "string" }, "group": { "description": "the functional group to which the command belongs", "oneOf": [ { "const": "bitmap" }, { "const": "cluster" }, { "const": "connection" }, { "const": "generic" }, { "const": "geo" }, { "const": "hash" }, { "const": "hyperloglog" }, { "const": "list" }, { "const": "module" }, { "const": "pubsub" }, { "const": "scripting" }, { "const": "sentinel" }, { "const": "server" }, { "const": "set" }, { "const": "sorted-set" }, { "const": "stream" }, { "const": "string" }, { "const": "transactions" } ] }, "complexity": { "description": "a short explanation about the command's time complexity.", "type": "string" }, "module": { "type": "string" }, "doc_flags": { "description": "an array of documentation flags", "type": "array", "items": { "oneOf": [ { "description": "the command is deprecated.", "const": "deprecated" }, { "description": "a system command that isn't meant to be called by users.", "const": "syscmd" } ] } }, "deprecated_since": { "description": "the Redis version that deprecated the command (or for module commands, the module version)", "type": "string" }, "replaced_by": { "description": "the alternative for a deprecated command.", "type": "string" }, "history": { "description": "an array of historical notes describing changes to the command's behavior or arguments.", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string", "description": "The Redis version that the entry applies to." }, { "type": "string", "description": "The description of the change." } ] } }, "arguments": { "description": "an array of maps that describe the command's arguments.", "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "type": { "type": "string" }, "display_text": { "type": "string" }, "key_spec_index": { "type": "integer" }, "token": { "type": "string" }, "summary": { "type": "string" }, "since": { "type": "string" }, "deprecated_since": { "type": "string" }, "flags": { "type": "array", "items": { "type": "string" } }, "arguments": { "type": "array" } } } }, "reply_schema": { "description": "command reply schema", "type": "object" }, "subcommands": { "description": "A map where each key is a subcommand, and each value is the documentary information", "$ref": "#" } } } } }, "arguments": [ { "name": "command-name", "type": "string", "optional": true, "multiple": true } ] } } hgetex.json000066400000006306152345610730006740 0ustar00{ "HGETEX": { "summary": "Get the value of one or more fields of a given hash key, and optionally set their expiration.", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "8.0.0", "arity": -5, "function": "hgetexCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "notes": "RW and UPDATE because it changes the TTL", "flags": [ "RW", "ACCESS", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "List of values associated with the given fields, in the same order as they are requested.", "type": "array", "minItems": 1, "items": { "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "token": "EX" }, { "name": "milliseconds", "type": "integer", "token": "PX" }, { "name": "unix-time-seconds", "type": "unix-time", "token": "EXAT" }, { "name": "unix-time-milliseconds", "type": "unix-time", "token": "PXAT" }, { "name": "persist", "type": "pure-token", "token": "PERSIST" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } } acl.json000066400000000421152345610730006203 0ustar00{ "ACL": { "summary": "A container for Access List Control commands.", "complexity": "Depends on subcommand.", "group": "server", "since": "6.0.0", "arity": -2, "command_flags": [ "SENTINEL" ] } } geoadd.json000066400000005547152345610730006705 0ustar00{ "GEOADD": { "summary": "Adds one or more members to a geospatial index. The key is created if it doesn't exist.", "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.", "group": "geo", "since": "3.2.0", "arity": -5, "function": "geoaddCommand", "history": [ [ "6.2.0", "Added the `CH`, `NX` and `XX` options." ] ], "command_flags": [ "WRITE", "DENYOOM" ], "acl_categories": [ "GEO" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "optional": true, "since": "6.2.0", "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" } ] }, { "name": "change", "token": "CH", "type": "pure-token", "optional": true, "since": "6.2.0" }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "longitude", "type": "double" }, { "name": "latitude", "type": "double" }, { "name": "member", "type": "string" } ] } ], "reply_schema": { "description": "When used without optional arguments, the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated).", "type": "integer" } } } cluster-nodes.json000066400000001101152345610730010227 0ustar00{ "NODES": { "summary": "Returns the cluster configuration for a node.", "complexity": "O(N) where N is the total number of Cluster nodes", "group": "cluster", "since": "3.0.0", "arity": 2, "container": "CLUSTER", "function": "clusterCommand", "command_flags": [ "STALE" ], "command_tips": [ "NONDETERMINISTIC_OUTPUT" ], "reply_schema": { "description": "the serialized cluster configuration", "type": "string" } } } hexpireat.json000066400000006726152345610730007453 0ustar00{ "HEXPIREAT": { "summary": "Set expiry for hash field using an absolute Unix timestamp (seconds)", "complexity": "O(N) where N is the number of specified fields", "group": "hash", "since": "7.4.0", "arity": -6, "function": "hexpireatCommand", "history": [], "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "HASH" ], "key_specs": [ { "flags": [ "RW", "UPDATE" ], "begin_search": { "index": { "pos": 1 } }, "find_keys": { "range": { "lastkey": 0, "step": 1, "limit": 0 } } } ], "reply_schema": { "description": "Array of results. Returns empty array if the key does not exist.", "type": "array", "minItems": 0, "maxItems": 4294967295, "items": { "oneOf": [ { "description": "The field does not exist.", "const": -2 }, { "description": "Specified NX | XX | GT | LT condition not met", "const": 0 }, { "description": "Expiration time was set or updated.", "const": 1 }, { "description": "Field deleted because the specified expiration time is in the past.", "const": 2 } ] } }, "arguments": [ { "name": "key", "type": "key", "key_spec_index": 0 }, { "name": "unix-time-seconds", "type": "unix-time" }, { "name": "condition", "type": "oneof", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "token": "NX" }, { "name": "xx", "type": "pure-token", "token": "XX" }, { "name": "gt", "type": "pure-token", "token": "GT" }, { "name": "lt", "type": "pure-token", "token": "LT" } ] }, { "name": "fields", "token": "FIELDS", "type": "block", "arguments": [ { "name": "numfields", "type": "integer" }, { "name": "field", "type": "string", "multiple": true } ] } ] } }swapdb.json000066400000001357152345610730006735 0ustar00{ "SWAPDB": { "summary": "Swaps two Redis databases.", "complexity": "O(N) where N is the count of clients watching or blocking on keys from both databases.", "group": "server", "since": "4.0.0", "arity": 3, "function": "swapdbCommand", "command_flags": [ "WRITE", "FAST" ], "acl_categories": [ "KEYSPACE", "DANGEROUS" ], "arguments": [ { "name": "index1", "type": "integer" }, { "name": "index2", "type": "integer" } ], "reply_schema": { "const": "OK" } } } index.py000064400000011232152350770610006232 0ustar00import logging from optparse import Values from typing import Any, Iterable, List, Optional, Union from pip._vendor.packaging.version import LegacyVersion, Version from pip._internal.cli import cmdoptions from pip._internal.cli.req_command import IndexGroupCommand from pip._internal.cli.status_codes import ERROR, SUCCESS from pip._internal.commands.search import print_dist_installation_info from pip._internal.exceptions import CommandError, DistributionNotFound, PipError from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal.models.selection_prefs import SelectionPreferences from pip._internal.models.target_python import TargetPython from pip._internal.network.session import PipSession from pip._internal.utils.misc import write_output logger = logging.getLogger(__name__) class IndexCommand(IndexGroupCommand): """ Inspect information available from package indexes. """ usage = """ %prog versions """ def add_options(self) -> None: cmdoptions.add_target_python_options(self.cmd_opts) self.cmd_opts.add_option(cmdoptions.ignore_requires_python()) self.cmd_opts.add_option(cmdoptions.pre()) self.cmd_opts.add_option(cmdoptions.no_binary()) self.cmd_opts.add_option(cmdoptions.only_binary()) index_opts = cmdoptions.make_option_group( cmdoptions.index_group, self.parser, ) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, self.cmd_opts) def run(self, options: Values, args: List[str]) -> int: handlers = { "versions": self.get_available_package_versions, } logger.warning( "pip index is currently an experimental command. " "It may be removed/changed in a future release " "without prior warning." ) # Determine action if not args or args[0] not in handlers: logger.error( "Need an action (%s) to perform.", ", ".join(sorted(handlers)), ) return ERROR action = args[0] # Error handling happens here, not in the action-handlers. try: handlers[action](options, args[1:]) except PipError as e: logger.error(e.args[0]) return ERROR return SUCCESS def _build_package_finder( self, options: Values, session: PipSession, target_python: Optional[TargetPython] = None, ignore_requires_python: Optional[bool] = None, ) -> PackageFinder: """ Create a package finder appropriate to the index command. """ link_collector = LinkCollector.create(session, options=options) # Pass allow_yanked=False to ignore yanked versions. selection_prefs = SelectionPreferences( allow_yanked=False, allow_all_prereleases=options.pre, ignore_requires_python=ignore_requires_python, ) return PackageFinder.create( link_collector=link_collector, selection_prefs=selection_prefs, target_python=target_python, ) def get_available_package_versions(self, options: Values, args: List[Any]) -> None: if len(args) != 1: raise CommandError("You need to specify exactly one argument") target_python = cmdoptions.make_target_python(options) query = args[0] with self._build_session(options) as session: finder = self._build_package_finder( options=options, session=session, target_python=target_python, ignore_requires_python=options.ignore_requires_python, ) versions: Iterable[Union[LegacyVersion, Version]] = ( candidate.version for candidate in finder.find_all_candidates(query) ) if not options.pre: # Remove prereleases versions = ( version for version in versions if not version.is_prerelease ) versions = set(versions) if not versions: raise DistributionNotFound( "No matching distribution found for {}".format(query) ) formatted_versions = [str(ver) for ver in sorted(versions, reverse=True)] latest = formatted_versions[0] write_output("{} ({})".format(query, latest)) write_output("Available versions: {}".format(", ".join(formatted_versions))) print_dist_installation_info(query, latest) debug.py000064400000014745152350770610006225 0ustar00import locale import logging import os import sys from optparse import Values from types import ModuleType from typing import Any, Dict, List, Optional import pip._vendor from pip._vendor.certifi import where from pip._vendor.packaging.version import parse as parse_version from pip import __file__ as pip_location from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import Command from pip._internal.cli.cmdoptions import make_target_python from pip._internal.cli.status_codes import SUCCESS from pip._internal.configuration import Configuration from pip._internal.metadata import get_environment from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import get_pip_version logger = logging.getLogger(__name__) def show_value(name: str, value: Any) -> None: logger.info("%s: %s", name, value) def show_sys_implementation() -> None: logger.info("sys.implementation:") implementation_name = sys.implementation.name with indent_log(): show_value("name", implementation_name) def create_vendor_txt_map() -> Dict[str, str]: vendor_txt_path = os.path.join( os.path.dirname(pip_location), "_vendor", "vendor.txt" ) with open(vendor_txt_path) as f: # Purge non version specifying lines. # Also, remove any space prefix or suffixes (including comments). lines = [ line.strip().split(" ", 1)[0] for line in f.readlines() if "==" in line ] # Transform into "module" -> version dict. return dict(line.split("==", 1) for line in lines) # type: ignore def get_module_from_module_name(module_name: str) -> ModuleType: # Module name can be uppercase in vendor.txt for some reason... module_name = module_name.lower() # PATCH: setuptools is actually only pkg_resources. if module_name == "setuptools": module_name = "pkg_resources" __import__(f"pip._vendor.{module_name}", globals(), locals(), level=0) return getattr(pip._vendor, module_name) def get_vendor_version_from_module(module_name: str) -> Optional[str]: module = get_module_from_module_name(module_name) version = getattr(module, "__version__", None) if not version: # Try to find version in debundled module info. env = get_environment([os.path.dirname(module.__file__)]) dist = env.get_distribution(module_name) if dist: version = str(dist.version) return version def show_actual_vendor_versions(vendor_txt_versions: Dict[str, str]) -> None: """Log the actual version and print extra info if there is a conflict or if the actual version could not be imported. """ for module_name, expected_version in vendor_txt_versions.items(): extra_message = "" actual_version = get_vendor_version_from_module(module_name) if not actual_version: extra_message = ( " (Unable to locate actual module version, using" " vendor.txt specified version)" ) actual_version = expected_version elif parse_version(actual_version) != parse_version(expected_version): extra_message = ( " (CONFLICT: vendor.txt suggests version should" " be {})".format(expected_version) ) logger.info("%s==%s%s", module_name, actual_version, extra_message) def show_vendor_versions() -> None: logger.info("vendored library versions:") vendor_txt_versions = create_vendor_txt_map() with indent_log(): show_actual_vendor_versions(vendor_txt_versions) def show_tags(options: Values) -> None: tag_limit = 10 target_python = make_target_python(options) tags = target_python.get_tags() # Display the target options that were explicitly provided. formatted_target = target_python.format_given() suffix = "" if formatted_target: suffix = f" (target: {formatted_target})" msg = "Compatible tags: {}{}".format(len(tags), suffix) logger.info(msg) if options.verbose < 1 and len(tags) > tag_limit: tags_limited = True tags = tags[:tag_limit] else: tags_limited = False with indent_log(): for tag in tags: logger.info(str(tag)) if tags_limited: msg = ( "...\n[First {tag_limit} tags shown. Pass --verbose to show all.]" ).format(tag_limit=tag_limit) logger.info(msg) def ca_bundle_info(config: Configuration) -> str: levels = set() for key, _ in config.items(): levels.add(key.split(".")[0]) if not levels: return "Not specified" levels_that_override_global = ["install", "wheel", "download"] global_overriding_level = [ level for level in levels if level in levels_that_override_global ] if not global_overriding_level: return "global" if "global" in levels: levels.remove("global") return ", ".join(levels) class DebugCommand(Command): """ Display debug information. """ usage = """ %prog """ ignore_require_venv = True def add_options(self) -> None: cmdoptions.add_target_python_options(self.cmd_opts) self.parser.insert_option_group(0, self.cmd_opts) self.parser.config.load() def run(self, options: Values, args: List[str]) -> int: logger.warning( "This command is only meant for debugging. " "Do not use this with automation for parsing and getting these " "details, since the output and options of this command may " "change without notice." ) show_value("pip version", get_pip_version()) show_value("sys.version", sys.version) show_value("sys.executable", sys.executable) show_value("sys.getdefaultencoding", sys.getdefaultencoding()) show_value("sys.getfilesystemencoding", sys.getfilesystemencoding()) show_value( "locale.getpreferredencoding", locale.getpreferredencoding(), ) show_value("sys.platform", sys.platform) show_sys_implementation() show_value("'cert' config value", ca_bundle_info(self.parser.config)) show_value("REQUESTS_CA_BUNDLE", os.environ.get("REQUESTS_CA_BUNDLE")) show_value("CURL_CA_BUNDLE", os.environ.get("CURL_CA_BUNDLE")) show_value("pip._vendor.certifi.where()", where()) show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED) show_vendor_versions() show_tags(options) return SUCCESS __pycache__/list.cpython-39.pyc000064400000023712152350770610012373 0ustar00a Re/@sdddlZddlZddlmZddlmZmZmZmZm Z m Z m Z ddl m Z ddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZdd lm Z ddl!m"Z"ddl#m$Z$m%Z%ddl&m'Z'erddl(m)Z)GdddeZ*e e*Z+e,e-Z.GdddeZ/dee eee0ee0fdddZ1dee0dddZ2dS)N)Values) TYPE_CHECKINGIteratorListOptionalSequenceTuplecastcanonicalize_name) cmdoptions)IndexGroupCommand)SUCCESS) CommandError) LinkCollector) PackageFinder)BaseDistributionget_environment)SelectionPreferences) PipSession) stdlib_pkgs)tabulate write_output)map_multithread)DistributionVersionc@s"eZdZUdZeed<eed<dS)_DistWithLatestInfozGive the distribution object a couple of extra fields. These will be populated during ``get_outdated()``. This is dirty but makes the rest of the code much cleaner. latest_versionlatest_filetypeN)__name__ __module__ __qualname____doc__r__annotations__strr$r$/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/list.pyrs rc@seZdZdZdZdZddddZeee dd d Z ee e e d d d ZdeddddZdeddddZdeddddZdeeddddZdeddddZe e e e e ddddZdS) ListCommandzt List installed packages, including editables. Packages are listed in a case-insensitive sorted order. Tz %prog [options]N)returncCs*|jjdddddd|jjddddd d|jjd d ddd d|jjd ddddd|jjdddddd|jt|jjddddd|jjddddddd|jjddddd |jjd!d"d#d$d |jjd%dd#d&d'd(|jtttj|j}|jd)||jd)|jdS)*Nz-oz --outdated store_trueFzList outdated packages)actiondefaulthelpz-uz --uptodatezList uptodate packagesz-ez --editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--useruserz,Only output packages installed in user-site.)destr)r*r+z--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--formatstore list_formatcolumns)r0freezejsonzBSelect the output format among: columns (default), freeze, or json)r)r-r*choicesr+z--not-required not_requiredz>List packages that are not dependencies of installed packages.)r)r-r+z--exclude-editable store_falseinclude_editablez%Exclude editable package from output.z--include-editablez%Include editable package from output.T)r)r-r+r*r) cmd_opts add_optionr list_path list_excludemake_option_group index_groupparserinsert_option_group)self index_optsr$r$r% add_options3s   zListCommand.add_options)optionssessionr'cCs*tj||d}td|jd}tj||dS)zK Create a package finder appropriate to this list command. )rBF) allow_yankedallow_all_prereleases)link_collectorselection_prefs)rcreaterprer)r?rBrCrFrGr$r$r%_build_package_findersz!ListCommand._build_package_finder)rBargsr'cCs|jr|jrtdt|tt}|jrB|dd|jDddt |j j |j |j |j|j|dD}|jr|||}|jr|||}n|jr|||}|||tS)Nz5Options --outdated and --uptodate cannot be combined.css|]}t|VqdSNr ).0nr$r$r% z"ListCommand.run..cSsg|]}td|qS)r)r )rMdr$r$r% sz#ListCommand.run..) local_only user_onlyeditables_onlyinclude_editablesskip)outdatedZuptodaterr check_list_path_optionsetrexcludesupdaterpathiter_installed_distributionslocalr,editabler6r4get_not_required get_outdated get_uptodateoutput_package_listingr)r?rBrKrWpackagesr$r$r%runs.      zListCommand.run_ProcessedDistsrerBr'cCsdd|||DS)NcSsg|]}|j|jkr|qSr$rversionrMdistr$r$r%rRs z,ListCommand.get_outdated..iter_packages_latest_infosr?rerBr$r$r%rbs zListCommand.get_outdatedcCsdd|||DS)NcSsg|]}|j|jkr|qSr$rirkr$r$r%rRs z,ListCommand.get_uptodate..rmror$r$r%rcs zListCommand.get_uptodatecs$dd|Dtfdd|DS)NcSs(h|] }|pdD]}t|jqqS)r$)iter_dependenciesr name)rMrldepr$r$r% sz/ListCommand.get_not_required..csh|]}|jvr|qSr$canonical_name)rMpkgZdep_keysr$r%rsrP)listror$rwr%ras zListCommand.get_not_requiredrc#sr|T}||dtddfdd }t||D]}|dur<|Vq.latest_info..) project_namewheelsdist) find_all_candidatesrurImake_candidate_evaluatorsort_best_candidaterjlinkis_wheelrr)rlZall_candidatesZ evaluatorbest_candidateremote_versiontypfinderrBr$r% latest_infos$  z;ListCommand.iter_packages_latest_infos..latest_info)_build_sessionrJrr)r?rerBrCrrlr$rr%rns  z&ListCommand.iter_packages_latest_infoscCst|ddd}|jdkr:|r:t||\}}|||n^|jdkr|D]4}|jdkrltd|j|j|jqHtd|j|jqHn|jd krtt ||dS) NcSs|jSrLrt)rlr$r$r% rPz4ListCommand.output_package_listing..)keyr0r1z %s==%s (%s)z%s==%sr2) sortedr/format_for_columnsoutput_package_listing_columnsverboserraw_namerjlocationformat_for_json)r?rerBdataheaderrlr$r$r%rds    z"ListCommand.output_package_listing)rrr'cCsbt|dkr|d|t|\}}t|dkrL|ddtdd||D] }t|qPdS)Nrr cSsd|S)N-r$)xr$r$r%r%rPz.)leninsertrjoinmapr)r?rrZ pkg_stringssizesvalr$r$r%rs    z*ListCommand.output_package_listing_columns)rrr r!ignore_require_venvusagerArrrrJrr#intrfrbrcrarrnrdrr$r$r$r%r&(s4V %    ' r&rg)pkgsrBr'cCsddg}|j}|r |ddgtdd|D}|r@|d|jdkrT|d |jdkrh|d g}|D]}|jt|jg}|r|t|j||j |r||j pd |jdkr||j pd |jdkr||j ||qp||fS) z_ Convert the package data into something usable by output_package_listing_columns. PackageVersionZLatestTypecss|] }|jVqdSrL)r`)rMrr$r$r%rO8rPz%format_for_columns..zEditable project locationrZLocationZ Installer) rXextendanyappendrrr#rjrreditable_project_locationr installer)rrBrZrunning_outdatedZ has_editablesrZprojrowr$r$r%r+s2          rrhcCsg}|D]r}|jt|jd}|jdkr@|jp0d|d<|j|d<|jr^t|j|d<|j|d<|j }|rp||d<| |qt |S) N)rqrjrrrrrrr) rr#rjrrrrXrrrrr2dumps)rerBrrlinforr$r$r%rXs     r)3r2loggingoptparsertypingrrrrrrr pip._vendor.packaging.utilsr Zpip._internal.clir pip._internal.cli.req_commandr pip._internal.cli.status_codesrpip._internal.exceptionsrpip._internal.index.collectorr"pip._internal.index.package_finderrpip._internal.metadatarr$pip._internal.models.selection_prefsrpip._internal.network.sessionrpip._internal.utils.compatrpip._internal.utils.miscrrZpip._internal.utils.parallelrZpip._internal.metadata.baserrrg getLoggerrloggerr&r#rrr$r$r$r%s8 $               -__pycache__/search.cpython-39.pyc000064400000012360152350770610012662 0ustar00a ReA@s|ddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z m Z mZddlmZddlmZddlmZddlmZmZdd lmZdd lmZdd lmZdd lm Z dd l!m"Z"ddl#m$Z$e rddl m%Z%Gddde%Z&e'e(Z)GdddeeZ*e e e+e+fe ddddZ,e+e+ddddZ-d e dee.ee.ddddZ/e e+e+dddZ0dS)!N) OrderedDict)Values) TYPE_CHECKINGDictListOptional)parse)Command)SessionCommandMixin)NO_MATCHES_FOUNDSUCCESS) CommandError)get_default_environment)PyPI)PipXmlrpcTransport) indent_log) write_output) TypedDictc@s*eZdZUeed<eed<eeed<dS)TransformedHitnamesummaryversionsN)__name__ __module__ __qualname__str__annotations__rrr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/search.pyrs rc@s^eZdZdZdZdZddddZeee e dd d Z ee eee e e fd d d Z dS) SearchCommandz@Search for PyPI packages whose name or summary contains .z %prog [options] TN)returncCs.|jjddddtjdd|jd|jdS)Nz-iz--indexindexURLz3Base URL of Python Package Index (default %default))destmetavardefaulthelpr)cmd_opts add_optionrpypi_urlparserinsert_option_group)selfrrr add_options)s zSearchCommand.add_options)optionsargsr cCsV|s td|}|||}t|}d}tjr>td}t||d|rRt St S)Nz)Missing required argument (search query).r)terminal_width) r searchtransform_hitssysstdoutisattyshutilget_terminal_size print_resultsr r )r,r.r/queryZ pypi_hitshitsr0rrrrun5s    zSearchCommand.run)r9r.r c Cs|j}||}t||}tj||}z|||dd}WnBtjjy}z&dj|j |j d} t | WYd}~n d}~00t |t sJ|S)N)rrorz-XMLRPC request failed [code: {code}] {string})codestring)r!get_default_sessionrxmlrpcclient ServerProxyr1Faultformat faultCode faultStringr isinstancelist) r,r9r. index_urlsession transportpypir:faultmessagerrrr1Es  zSearchCommand.search)rrr__doc__usageignore_require_venvr-rrrintr;rr1rrrrr"s  r)r:r cCst}|D]n}|d}|d}|d}||vrF|||gd||<q ||d||t||dkr |||d<q t|S)z The list from pypi is really a list of versions. We want a list of packages with the list of versions stored inline. This converts the list from pypi into one we can use. rrversion)rrrr)rkeysappendhighest_versionrHvalues)r:packageshitrrrSrrrr2Xs  r2)rlatestr cCst}||}|durtT|j|kr8td|jn,td|jt|jrZtd|n td|Wdn1sx0YdS)NzINSTALLED: %s (latest)z INSTALLED: %sz=LATEST: %s (pre-release; install with `pip install --pre`)z LATEST: %s)rget_distributionrrSr parse_versionpre)rrZenvdistrrrprint_dist_installation_infots    r`)r:name_column_widthr0r c Cs|sdS|dur&tdd|Dd}|D]}|d}|dp@d}t|ddg}|dur||d }|d krt||}d d |d |}|d|d} | |d|} zt| t||Wq*tyYq*0q*dS)Nc Ss.g|]&}t|dtt|ddgqS)rr-)lenrVget).0rYrrr sz!print_results..rrrrb   z ()z - ) maxrVrdtextwrapwrapjoinrr`UnicodeEncodeError) r:rar0rYrrrZZ target_widthZ summary_linesZ name_latestlinerrrr8s6     r8)rr cCs t|tdS)N)key)ror\)rrrrrVsrV)NN)1loggingr6r3rp xmlrpc.clientr@ collectionsroptparsertypingrrrrZpip._vendor.packaging.versionrr\pip._internal.cli.base_commandr pip._internal.cli.req_commandr pip._internal.cli.status_codesr r pip._internal.exceptionsr pip._internal.metadatarpip._internal.models.indexrZpip._internal.network.xmlrpcrpip._internal.utils.loggingrpip._internal.utils.miscrrr getLoggerrloggerrrr2r`rRr8rVrrrrsB             6  &__pycache__/index.cpython-39.pyc000064400000010716152350770610012527 0ustar00a Re@sddlZddlmZddlmZmZmZmZmZddl m Z m Z ddl m Z ddlmZddlmZmZddlmZdd lmZmZmZdd lmZdd lmZdd lmZdd lm Z ddl!m"Z"ddl#m$Z$e%e&Z'GdddeZ(dS)N)Values)AnyIterableListOptionalUnion) LegacyVersionVersion) cmdoptions)IndexGroupCommand)ERRORSUCCESS)print_dist_installation_info) CommandErrorDistributionNotFoundPipError) LinkCollector) PackageFinder)SelectionPreferences) TargetPython) PipSession) write_outputc@sneZdZdZdZddddZeeee ddd Z dee e e e eed d d Zeeeddd dZdS) IndexCommandz= Inspect information available from package indexes. z& %prog versions N)returncCs~t|j|jt|jt|jt|jtttj |j }|j d||j d|jdS)Nr) r add_target_python_optionscmd_opts add_optionignore_requires_pythonpre no_binary only_binarymake_option_group index_groupparserinsert_option_group)self index_optsr'/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/index.py add_optionss zIndexCommand.add_options)optionsargsrc Csd|ji}td|r$|d|vr>tddt|tS|d}z||||ddWn8ty}z t|jdtWYd}~Sd}~00t S)Nversionsztpip index is currently an experimental command. It may be removed/changed in a future release without prior warning.rzNeed an action (%s) to perform., ) get_available_package_versionsloggerwarningerrorjoinsortedr rr+r )r%r*r+handlersactioner'r'r(run/s$ zIndexCommand.run)r*session target_pythonrrcCs.tj||d}td|j|d}tj|||dS)zK Create a package finder appropriate to the index command. )r*F) allow_yankedallow_all_prereleasesr)link_collectorselection_prefsr:)rcreaterrr)r%r*r9r:rr=r>r'r'r(_build_package_finderMs z"IndexCommand._build_package_finderc Cst|dkrtdt|}|d}||}|j||||jd}dd||D}|jsndd|D}t |}|st d |d d t |d d D}|d} Wdn1s0Yt d || t d d|t|| dS)Nr.z(You need to specify exactly one argumentr)r*r9r:rcss|] }|jVqdSN)version).0 candidater'r'r( usz>IndexCommand.get_available_package_versions..css|]}|js|VqdSrA) is_prerelease)rCrBr'r'r(rE{sz%No matching distribution found for {}cSsg|] }t|qSr')str)rCverr'r'r( z?IndexCommand.get_available_package_versions..T)reversez{} ({})zAvailable versions: {}r-)lenrr make_target_python_build_sessionr@rfind_all_candidatesrsetrformatr4rr3r) r%r*r+r:queryr9finderr,Zformatted_versionsZlatestr'r'r(r/fs8   &z+IndexCommand.get_available_package_versions)NN)__name__ __module__ __qualname____doc__usager)rrrGintr8rrrboolrr@rr/r'r'r'r(rs" r))loggingoptparsertypingrrrrrZpip._vendor.packaging.versionrr Zpip._internal.clir pip._internal.cli.req_commandr pip._internal.cli.status_codesr r Zpip._internal.commands.searchrpip._internal.exceptionsrrrpip._internal.index.collectorr"pip._internal.index.package_finderr$pip._internal.models.selection_prefsr"pip._internal.models.target_pythonrpip._internal.network.sessionrpip._internal.utils.miscr getLoggerrTr0rr'r'r'r(s            __pycache__/hash.cpython-39.pyc000064400000004172152350770610012342 0ustar00a Re@sddlZddlZddlZddlmZddlmZddlmZddl m Z m Z ddl m Z mZddlmZmZeeZGdd d eZeeed d d ZdS) N)Values)List)Command)ERRORSUCCESS) FAVORITE_HASH STRONG_HASHES) read_chunks write_outputc@s<eZdZdZdZdZddddZeee e dd d Z dS) HashCommandz Compute a hash of a local package archive. These can be used with --hash in a requirements file to do repeatable installs. z%prog [options] ...TN)returnc Cs:|jjdddtdtddtd|jd|jdS) Nz-az --algorithm algorithmstorez$The hash algorithm to use: one of {}z, )destchoicesactiondefaulthelpr)cmd_opts add_optionrrformatjoinparserinsert_option_group)selfr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/hash.py add_optionss zHashCommand.add_options)optionsargsr cCs>|s|jtjtS|j}|D]}td||t||q tS)Nz%s: --hash=%s:%s) r print_usagesysstderrrr r _hash_of_filer)rrrr pathrrrrun(szHashCommand.run) __name__ __module__ __qualname____doc__usageignore_require_venvrrrstrintr%rrrrr s r )r$r r cCsTt|d2}t|}t|D]}||qWdn1sB0Y|S)z!Return the hash digest of a file.rbN)openhashlibnewr update hexdigest)r$r archivehashchunkrrrr#5s    *r#)r0loggingr!optparsertypingrpip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.utils.hashesrrpip._internal.utils.miscr r getLoggerr&loggerr r,r#rrrrs    &__pycache__/install.cpython-39.pyc000064400000042472152350770610013072 0ustar00a Rel@sHddlZddlZddlZddlZddlZddlmZmZddlm Z m Z m Z ddl m Z ddlmZddlmZddlmZddlmZmZmZdd lmZmZdd lmZmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9ddl:m;Z;ddlZ>ddl?m@Z@mAZAmBZBe4eCZDe#e@dddZEGdddeZFd/eGe eHe eHeGe eHe eHd d!d"ZIe eHeGeGd#d$d%ZJd0e eGe eHe eHe eHeGeGd&d'd(ZKe e*e e eHdd)d*d+ZLeMeGeGeHd,d-d.ZNdS)1N) SUPPRESS_HELPValues)IterableListOptional)canonicalize_name) WheelCache) cmdoptions)make_target_python)RequirementCommandwarn_if_run_as_root with_cleanup)ERRORSUCCESS) CommandErrorInstallationError) get_scheme)get_environment) FormatControl)ConflictDetailscheck_install_conflicts)install_given_reqs)InstallRequirement)get_requirement_tracker)WINDOWS)parse_distutils_argstest_writable_dir) getLogger) ensure_dirget_pip_version(protect_pip_from_modification_on_windows write_output) TempDirectory)running_under_virtualenvvirtualenv_no_global)BinaryAllowedPredicatebuild should_build_for_install_command)format_controlreturncsttdfdd }|S)N)reqr*cs t|jp d}|}d|vS)Nbinary)rnameget_allowed_formats)r+canonical_nameallowed_formatsr)/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/install.pycheck_binary_allowed5s z6get_check_binary_allowed..check_binary_allowed)rbool)r)r5r3r2r4get_check_binary_allowed4sr7c@szeZdZdZdZddddZeeee e ddd Z e e e dd d d Zeeeed ddZee ddddZdS)InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. a% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...N)r*cCsj|jt|jt|jt|jt|jt|jjdddddddt|j|jjddd d d |jjd dd t d |jjdddddd|jjdddddd|jt |jjdddd dd |jjdddddgdd|jjddd d d |jjd!d"d#d d$d |jt |jt |jt |jt|jt|jt|jjd%d d&d'd(d)|jjd*d d&d+d,|jjd-d d.d'd/d)|jjd0d d1d'd2d)|jt|jt|jt|jt|jtttj|j}|jd3||jd3|jdS)4Nz-tz--target target_dirdirzInstall packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)destmetavardefaulthelpz--user use_user_site store_truezInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r;actionr>z --no-user store_falsez--root root_pathz=Install everything relative to this alternate root directory.z--prefix prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-Uz --upgradeupgradezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategyupgrade_strategyzonly-if-neededeageraGDetermines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r;r=choicesr>z--force-reinstallforce_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedzIgnore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z --compilecompileTz'Compile Python source files to bytecode)rAr;r=r>z --no-compilez.Do not compile Python source files to bytecode)rAr;r>z--no-warn-script-locationwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictswarn_about_conflictsz%Do not warn about broken dependenciesr)cmd_opts add_optionr requirements constraintsno_depspreeditableadd_target_python_optionsrsrcignore_requires_pythonno_build_isolation use_pep517 no_use_pep517install_optionsglobal_options no_binary only_binary prefer_binaryrequire_hashes progress_barmake_option_group index_groupparserinsert_option_group)self index_optsr3r3r4 add_optionsQs     zInstallCommand.add_options)optionsargsr*c) s.|jr|jdurtdt|d}|jr2|j}tj|dd|jpHg}t dt t |j|j |j|j|jd|_d}d}|jrd|_tj|j|_tj|jrtj|jstdtdd }|j}|||jpg}||}t|} |j||| |jd } t|j|j} |t } t|j! d dd } zx|"||| |}|D] }d|_#qLt$||j|j%| || || |jd }|j&|| || |j|j|j|j'||j(d }|)| |j*||j d}z|+d}Wnt,yd}Yn 0|j-du}t.|dt/| jfdd|j01D}t2|| dggd\}}dd|D}|r^t3d4d5||D]}|j(sbd|_6qb|7|}d}|j8 o|j9}|r|:|}|j;}|js|j rd}t<||||j||j ||j|j=d }t>|j||j|j |jd}t?|} |j@tABddg}!|D]T}"|"jC}#z(| D|#}$|$durN|#d|$jE}#WntFydYn0|!G|#q|dur|jH||I|dd 5|!}%|%rtJd!|%WnPtKy}&z6|jLd"k}'tM|&|'|j}(t jN|(|'d#tOWYd}&~&Sd}&~&00|jr$|sJ|P|j||jtQtRS)$Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT) check_targetzUsing %s)rDr9rC isolated_modez=Target path exists but is not a directory, will not continue.target)kind)risession target_pythonrWinstall)deleternglobally_managed)temp_build_dirri req_trackerrofinderr?) preparerrvri wheel_cacher?rJrWrIrFrY)check_supported_wheelspipF) modifying_pipcsg|]}t|r|qSr3)r(.0rr5r3r4 bs z&InstallCommand.run..)rxverify build_optionsr\cSsg|]}|jr|jqSr3)rYr.r|r3r3r4rrszYCould not build wheels for {}, which is required to install pyproject.toml-based projectsz, i )roothomeprefixrLr? pycompile)userrrrisolatedr.)key-)resolver_variant zSuccessfully installed %s)exc_info)Sr?r9rr check_install_build_globalrErFcheck_dist_restrictionr[loggerverboser decide_user_installrDrCrlrJospathabspathexistsisdirr# enter_contextr\get_default_sessionr _build_package_finderrWr cache_dirr)rno_cleanget_requirementspermit_editable_wheels'reject_location_related_install_optionsmake_requirement_preparer make_resolverrIrYtrace_basic_inforesolveget_requirementKeyError satisfied_byr!r7rPvaluesr'rformatjoinlegacy_install_reasonget_installation_orderignore_dependenciesrM_determine_conflictsrLrrKget_lib_location_guessesrsortoperator attrgetterr.get_distributionversion Exceptionappend_warn_about_conflictsdetermine_resolver_variantr"OSError verbositycreate_os_error_messageerrorr_handle_target_dirr r))rfrirjrFr[target_temp_dirtarget_temp_dir_pathr\rorprvrxru directoryreqsr+rwresolverrequirement_setpip_reqr{ reqs_to_build_build_failurespep517_build_failure_namesr~ to_install conflictsshould_warn_about_conflictsrL installed lib_locationsenvitemsresultiteminstalled_distinstalled_descrshow_tracebackmessager3rr4runsV                              zInstallCommand.run)r9rrEr*c sNt|g}td|jd}|j}|j}|j}tj|rB||tj|r`||kr`||tj|rv|||D]} t | D]} | |krtj || t fdd|ddDrqtj || } tj| r0|st d| qtj| r t d| qtj| r&t| n t| ttj | | | qqzdS)Nr,)rc3s|]}|VqdSN) startswith)r}sddirr3r4 z4InstallCommand._handle_target_dir..zKTarget directory %s already exists. Specify --upgrade to force replacement.zTarget directory %s already exists and is a link. pip will not automatically replace links, please remove if replacement is desired.)rrrpurelibplatlibdatarrrlistdirranyrwarningislinkrshutilrmtreeremovemove) rfr9rrE lib_dir_listscheme purelib_dir platlib_dirdata_dirlib_dirrtarget_item_dirr3rr4rsH       z!InstallCommand._handle_target_dir)rr*cCs.z t|WSty(tdYdS0dS)NzwError while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new)rrr exception)rfrr3r3r4r s  z#InstallCommand._determine_conflicts)conflict_detailsrr*c Cs|\}\}}|s|sdSg}|dkr0|dn|dks.rr)allsetrrr3r3r4site_packages_writableasr )r?rDr9rCrlr*cCs|dur|stddS|rF|r*tdtr8tdtddS|dusRJ|sZ|rhtddStjs|td dSt||d rtd dStd dS) aZDetermine whether to do a user install based on the input options. If use_user_site is False, no additional checks are done. If use_user_site is True, it is checked for compatibility with other options. If use_user_site is None, the default behaviour depends on the environment, which is provided by the other arguments. Nz$Non-user install by explicit requestFzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z User install by explicit requestTz3Non-user install due to --prefix or --target optionz4Non-user install because user site-packages disabledrz0Non-user install because site-packages writeablezMDefaulting to user installation because normal site-packages is not writeable) rdebugrr%rsiteENABLE_USER_SITEr info)r?rDr9rCrlr3r3r4rhs8        r)rPrir*cCsttttddd}g}|D]0}|j}t|}|r |d|||q |rzt|}|rz|d|||sdStdd |dS) zIf any location-changing --install-option arguments were passed for requirements or on the command-line, then show a deprecation warning. ) option_namesr*cSsdd|DS)NcSsg|]}d|ddqS)z--{}rr)rreplace)r}r.r3r3r4rrzSreject_location_related_install_options..format_options..r3)rr3r3r4format_optionssz?reject_location_related_install_options..format_optionsz {!r} from {}z{!r} from command lineNzLocation-changing options found in --install-option: {}. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.z; ) rrrr[rrrkeysrr)rPrir offendersrr[location_optionsr3r3r4rs0 r)rrusing_user_siter*cCsg}|d|s,|d|t|n |d|dd7<|jtjkrd}d}tsz|sz||d|gn |||d tr|jtjkr|j rt |j d kr|d d | dS) zrFormat an error message for an OSError It may occur anytime during the execution of the install command. z,Could not install packages due to an OSErrorz: .rrz"Consider using the `--user` optionzCheck the permissionsz or z. izHINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths r,) rrerrnoEACCESr$extendlowerrENOENTfilenamelenrstrip)rrrruser_option_partpermissions_partr3r3r4rs>         r)FNNFN)NNNF)Orrrrr optparserrtypingrrrpip._vendor.packaging.utilsrpip._internal.cacherZpip._internal.clir Zpip._internal.cli.cmdoptionsr pip._internal.cli.req_commandr r r pip._internal.cli.status_codesrrpip._internal.exceptionsrrpip._internal.locationsrpip._internal.metadatar#pip._internal.models.format_controlrpip._internal.operations.checkrrpip._internal.reqrZpip._internal.req.req_installrpip._internal.req.req_trackerrpip._internal.utils.compatr"pip._internal.utils.distutils_argsrpip._internal.utils.filesystemrpip._internal.utils.loggingrpip._internal.utils.miscrr r!r"pip._internal.utils.temp_dirr#pip._internal.utils.virtualenvr$r%pip._internal.wheel_builderr&r'r(rrr7r8r6rrr rrrrr3r3r3r4s                   > (__pycache__/debug.cpython-39.pyc000064400000015045152350770610012506 0ustar00a Re@sddlZddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z ddl ZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd l m!Z!ddl"m#Z#ddl$m%Z%e&e'Z(e)e ddddZ*ddddZ+e e)e)fdddZ,e)edddZ-e)e e)dddZ.e e)e)fddddZ/ddd d!Z0edd"d#d$Z1ee)d%d&d'Z2Gd(d)d)eZ3dS)*N)Values) ModuleType)AnyDictListOptional)where)parse)__file__) cmdoptions)Command)make_target_python)SUCCESS) Configuration)get_environment) indent_log)get_pip_version)namevaluereturncCstd||dS)Nz%s: %s)loggerinfo)rrr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/debug.py show_valuesrrcCsFtdtjj}ttd|Wdn1s80YdS)Nzsys.implementation:r)rrsysimplementationrrr)implementation_namerrrshow_sys_implementations rcCsdtjtjtdd}t|"}dd|D}Wdn1sH0Ytdd|DS)N_vendorz vendor.txtcSs(g|] }d|vr|dddqS)== r)stripsplit.0linerrr -sz)create_vendor_txt_map..css|]}|ddVqdS)r!r#N)r%r&rrr 2z(create_vendor_txt_map..)ospathjoindirname pip_locationopen readlinesdict)Zvendor_txt_pathflinesrrrcreate_vendor_txt_map%s $r6) module_namercCs:|}|dkrd}td|ttddttj|S)N setuptools pkg_resourcesz pip._vendor.r)level)lower __import__globalslocalsgetattrpipr )r7rrrget_module_from_module_name5s rAcCsHt|}t|dd}|sDttj|jg}||}|rDt|j }|S)N __version__) rAr?rr,r-r/r get_distributionstrversion)r7modulerEenvdistrrrget_vendor_version_from_module@s   rI)vendor_txt_versionsrcCsZ|D]L\}}d}t|}|s*d}|}nt|t|krDd|}td|||qdS)z{Log the actual version and print extra info if there is a conflict or if the actual version could not be imported. zM (Unable to locate actual module version, using vendor.txt specified version)z5 (CONFLICT: vendor.txt suggests version should be {})z%s==%s%sN)itemsrI parse_versionformatrr)rJr7Zexpected_versionZ extra_messageZactual_versionrrrshow_actual_vendor_versionsNsrOcCsBtdt}tt|Wdn1s40YdS)Nzvendored library versions:)rrr6rrO)rJrrrshow_vendor_versionscs rP)optionsrc Csd}t|}|}|}d}|r0d|d}dt||}t||jdkrrt||krrd}|d|}nd}tB|D]}tt |q|rd j|d }t|Wdn1s0YdS) N rKz (target: )zCompatible tags: {}{}r#TFz?... [First {tag_limit} tags shown. Pass --verbose to show all.]) tag_limit) r get_tags format_givenrNlenrrverboserrD) rQrT target_pythontagsZformatted_targetsuffixmsgZ tags_limitedtagrrr show_tagsks,  r^)configrcsrt}|D]\}}||ddq|s4dSgdfdd|D}|sVdSd|vrh|dd|S) N.rz Not specified)installwheeldownloadcsg|]}|vr|qSrr)r'r:Zlevels_that_override_globalrrr)sz"ca_bundle_info..globalz, )setrLaddr%remover.)r_Zlevelskey_Zglobal_overriding_levelrrdrca_bundle_infos  rkc@s<eZdZdZdZdZddddZeee e dd d Z dS) DebugCommandz$ Display debug information. z %prog TNrcCs,t|j|jd|j|jjdS)Nr)r add_target_python_optionscmd_optsparserinsert_option_groupr_load)selfrrr add_optionss zDebugCommand.add_options)rQargsrcCstdtdttdtjtdtjtdttdttdt tdtj t td t |jjtd tjd td tjd td ttd tjjtt|tS)NzThis command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.z pip versionz sys.versionzsys.executablezsys.getdefaultencodingzsys.getfilesystemencodingzlocale.getpreferredencodingz sys.platformz'cert' config valueREQUESTS_CA_BUNDLECURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)rwarningrrrrE executablegetdefaultencodinggetfilesystemencodinglocalegetpreferredencodingplatformrrkror_r,environgetrr@r DEBUNDLEDrPr^r)rrrQrtrrrruns,     zDebugCommand.run) __name__ __module__ __qualname____doc__usageignore_require_venvrsrrrDintrrrrrrls rl)4r{loggingr,roptparsertypesrtypingrrrr pip._vendorr@pip._vendor.certifirZpip._vendor.packaging.versionr rMr r0Zpip._internal.clir pip._internal.cli.base_commandr Zpip._internal.cli.cmdoptionsr pip._internal.cli.status_codesrpip._internal.configurationrpip._internal.metadatarpip._internal.utils.loggingrpip._internal.utils.miscr getLoggerrrrDrrr6rArIrOrPr^rkrlrrrrs:                __pycache__/show.cpython-39.pyc000064400000020471152350770610012377 0ustar00a Re@sddlZddlZddlZddlmZddlmZmZmZm Z m Z ddl m Z ddl mZddlmZmZddlmZmZddlmZeeZGd d d eZGd d d eZe ed fe ed fedddZeeeedddZeeeeedddZ dS)N)Values)IteratorList NamedTupleOptionalTuplecanonicalize_name)Command)ERRORSUCCESS)BaseDistributionget_default_environment) write_outputc@s<eZdZdZdZdZddddZeee e dd d Z dS) ShowCommandzx Show information about one or more installed packages. The output is in RFC-compliant mail header format. z$ %prog [options] ...TN)returncCs,|jjddddddd|jd|jdS) Nz-fz--filesfiles store_trueFz7Show the full list of installed files for each package.)destactiondefaulthelpr)cmd_opts add_optionparserinsert_option_group)selfr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/show.py add_optionss zShowCommand.add_options)optionsargsrcCs8|stdtS|}t|}t||j|jds4tStS)Nz.ERROR: Please provide a package name or names.) list_filesverbose)loggerwarningr search_packages_info print_resultsrr#r )rr r!queryresultsrrrrun(s  zShowCommand.run) __name__ __module__ __qualname____doc__usageignore_require_venvrrrstrintr*rrrrrs  rc@seZdZUeed<eed<eed<eeed<eeed<eed<eed<eeed<eed <eed <eed <eed <eed <eeed<eeeed<dS) _PackageInfonameversionlocationrequires required_by installermetadata_version classifierssummaryhomepageauthor author_emaillicense entry_pointsrN)r+r,r-r1__annotations__rrrrrrr36s     r3.)entryinforcCs\|rD|ddkrD|r |ddkr*|d7}n |dd}|dd}qttjg||RS)aConvert a legacy installed-files.txt path into modern RECORD path. The legacy format stores paths relative to the info directory, while the modern format stores paths relative to the package root, e.g. the site-packages directory. :param entry: Path parts of the installed-files.txt entry. :param info: Path parts of the egg-info directory relative to package root. :returns: The converted entry. For best compatibility with symlinks, this does not use ``abspath()`` or ``Path.resolve()``, but tries to work with path parts: 1. While ``entry`` starts with ``..``, remove the equal amounts of parts from ``info``; if ``info`` is empty, start appending ``..`` instead. 2. Join the two directly. r..)rENr1pathlibPath)rCrDrrr_convert_legacy_entryHs   rK)r(rc#st}dd|Ddd|D}tfddt||D}|rXtdd|ttt dfd d }tt tt d d d }tt tt d dd}|D],}z |}Wnt yYqYn0tdd| Dt j d} t||t j d} z|d} | jdd} Wnty.g} Yn0||p@||} | durRd}nt| }|j}t|jt |j|jpxd| | |j|jpd|dg|dd|dd|dd|dd|dd| |dVqdS)z Gather details from installed distributions. Print distribution name, version, location, and installed files. Installed files requires a pip generated 'installed-files.txt' in the distributions '.egg-info' directory. cSsi|] }|j|qSr)canonical_name.0distrrr lz(search_packages_info..cSsg|] }t|qSrr)rNr4rrr mrQz(search_packages_info..csg|]\}}|vr|qSrr)rNr4pkg installedrrrRorQzPackage(s) not found: %s, ) current_distrcsfddDS)Nc3s4|],}jdd|Dvr|jdp*dVqdS)cSsh|]}t|jqSr)r r4)rNdrrr yrQzRsearch_packages_info.._get_requiring_packages...NameUNKNOWNN)rLiter_dependenciesmetadatarMrWrr us zHsearch_packages_info.._get_requiring_packages..)valuesr^rTr^r_get_requiring_packagests z5search_packages_info.._get_requiring_packages)rOrcSs<z|d}Wnty"YdS0ddt|DS)NRECORDcss |]}tt|dVqdS)rNrH)rNrowrrrr_rQzCsearch_packages_info.._files_from_record..) read_textFileNotFoundErrorcsvreader splitlines)rOtextrrr_files_from_record|s  z0search_packages_info.._files_from_recordcsz|d}Wnty"YdS0dd|jddD}|j}|j}|dusV|durZ|Szt||Wnty|YS0j s|Sfdd|DS)Nzinstalled-files.txtcss|]}|r|VqdSNrrNprrrr_rQzCsearch_packages_info.._files_from_legacy..Fkeependsc3s"|]}tt|jjVqdSrk)rKrIrJpartsrlZinfo_relrrr_s) rdrerhr6info_directoryrIrJ relative_to ValueErrorrp)rOripathsrootrDrrqr_files_from_legacys$    z0search_packages_info.._files_from_legacycss|] }|jVqdSrk)r4)rNreqrrrr_rQz'search_packages_info..)keyzentry_points.txtFrnN ClassifierZSummaryz Home-pageZAuthorz Author-emailZLicense)r4r5r6r7r8r9r:r;r<r=r>r?r@rAr)riter_distributionssortedzipr$r%joinr rr1rKeyErrorr\lowerrdrhrer]r3raw_namer5r6r9r:get_allget)r(envZ query_namesmissingrarjrwZ query_namerOr7r8Zentry_points_textrAZ files_iterrr]rrTrr&csZ               r&) distributionsr"r#rc CsPd}t|D]<\}}d}|dkr*tdtd|jtd|jtd|jtd|jtd |jtd |jtd |jtd |j td d |j tdd |j |r td|j td|jtd|jD]}td|qtd|jD]}td|q|r td|jdur.tdq |jD]}td|q4q |S)zC Print the information from installed distributions found. FTrz---zName: %sz Version: %sz Summary: %sz Home-page: %sz Author: %szAuthor-email: %sz License: %sz Location: %sz Requires: %srVzRequired-by: %szMetadata-Version: %sz Installer: %sz Classifiers:z %sz Entry-points:zFiles:Nz+Cannot locate RECORD or installed-files.txt) enumeraterr4r5r<r=r>r?r@r6rr7r8r:r9r;rAstripr) rr"r#Zresults_printedirO classifierrClinerrrr's>                r')!rfloggingrIoptparsertypingrrrrrpip._vendor.packaging.utilsr pip._internal.cli.base_commandr pip._internal.cli.status_codesr r pip._internal.metadatar rpip._internal.utils.miscr getLoggerr+r$rr3r1rKr&boolr'rrrrs&     %"`__pycache__/wheel.cpython-39.pyc000064400000011402152350770610012515 0ustar00a Re@sddlZddlZddlZddlmZddlmZddlmZddl m Z ddl m Z m Z ddlmZddlmZdd lmZdd lmZdd lmZmZdd lmZdd lmZmZeeZ Gddde Z!dS)N)Values)List) WheelCache) cmdoptions)RequirementCommand with_cleanup)SUCCESS) CommandError)InstallRequirement)get_requirement_tracker) ensure_dirnormalize_path) TempDirectory)buildshould_build_for_wheel_commandc@s<eZdZdZdZddddZeeee e ddd Z dS) WheelCommanda Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. z %prog [options] ... %prog [options] -r ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...N)returncCsv|jjddddtjdd|jt|jt|jt|jt|jt |jt |jt |jt |jt |jt|jt|jt|jt|jjddd d d d |jt|jt|jjd d d dd|jtttj|j}|jd||jd|jdS)Nz-wz --wheel-dir wheel_dirdirzLBuild wheels into , where the default is the current working directory.)destmetavardefaulthelpz --no-verify no_verify store_trueFz%Don't verify if built wheel is valid.)ractionrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)cmd_opts add_optionoscurdirr no_binary only_binary prefer_binaryno_build_isolation use_pep517 no_use_pep517 constraintseditable requirementssrcignore_requires_pythonno_deps progress_bar build_optionsglobal_optionsrequire_hashesmake_option_group index_groupparserinsert_option_group)self index_optsr6/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/wheel.py add_options+sV  zWheelCommand.add_options)optionsargsrc Cst|||}|||}t|j|j}t|j|_t |j| t }t |j ddd}|||||}|j||||||jdd} |j| ||||j|jd} ||| j|dd} g} | jD](} | jr| | qt| r| | qt| ||j |jp g|jpgd\}}|D]~} | jr:| jjs>J| j sJJzt!"| j |jWn@t#y}z&t$%d | j&||| WYd}~n d}~00q$t'|d krt(d t)S) NwheelT)deletekindglobally_managedF)temp_build_dirr9 req_trackersessionfinder download_dir use_user_site)preparerrBr9 wheel_cacher*r$)check_supported_wheels)rFverifyr-r.z Building wheel for %s failed: %srz"Failed to build one or more wheels)*rcheck_install_build_globalget_default_session_build_package_finderr cache_dirformat_controlr rr enter_contextr rno_cleanget_requirementsmake_requirement_preparer make_resolverr*r$trace_basic_inforesolver(valuesis_wheelsave_linked_requirementrappendrrr-r.linklocal_file_pathshutilcopyOSErrorloggerwarningnamelenr r)r4r9r:rArBrFr@ directoryreqsrEresolverrequirement_set reqs_to_buildreqbuild_successesbuild_failureser6r6r7runesx             $zWheelCommand.run) __name__ __module__ __qualname____doc__usager8rrrstrintrkr6r6r6r7rs :r)"loggingrr[optparsertypingrpip._internal.cacherZpip._internal.clirpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.exceptionsr Zpip._internal.req.req_installr pip._internal.req.req_trackerr pip._internal.utils.miscr r pip._internal.utils.temp_dirrpip._internal.wheel_builderrr getLoggerrlr^rr6r6r6r7s           __pycache__/help.cpython-39.pyc000064400000002476152350770610012354 0ustar00a Rel@sPddlmZddlmZddlmZddlmZddlm Z GdddeZ dS) )Values)List)Command)SUCCESS) CommandErrorc@s.eZdZdZdZdZeeee dddZ dS) HelpCommandzShow help for commandsz %prog T)optionsargsreturnc Csddlm}m}m}z |d}Wnty6tYS0||vrz||}d|dg}|rl|d|dtd|||} | j tS)Nr) commands_dictcreate_commandget_similar_commandszunknown command ""zmaybe you meant "z - ) pip._internal.commandsr r r IndexErrorrappendrjoinparser print_help) selfrr r r r cmd_nameguessmsgcommandr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/help.pyruns    zHelpCommand.runN) __name__ __module__ __qualname____doc__usageignore_require_venvrrstrintrrrrrr srN) optparsertypingrpip._internal.cli.base_commandrpip._internal.cli.status_codesrpip._internal.exceptionsrrrrrrs     __pycache__/freeze.cpython-39.pyc000064400000005162152350770610012677 0ustar00a Re @sxddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZhd ZGd d d eZdS) N)Values)List) cmdoptions)Command)SUCCESS)freeze) stdlib_pkgs> setuptoolswheelZ distributepipc@s<eZdZdZdZdZddddZeee e dd d Z dS) FreezeCommandzx Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. z %prog [options])ext://sys.stderrr N)returnc Cs|jjddddgddd|jjdd d d d d d|jjddd d dd|jt|jjddd ddtd|jjddd dd|jt|j d|jdS)Nz-rz --requirement requirementsappendfilez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)destactiondefaultmetavarhelpz-lz--locallocal store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.)rrrrz--useruserz,Only output packages installed in user-site.z--all freeze_allz,Do not skip these packages in the output: {}z, )rrrz--exclude-editableexclude_editablez%Exclude editable package from output.r) cmd_opts add_optionr list_pathformatjoinDEV_PKGS list_excludeparserinsert_option_group)selfr&/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/freeze.py add_optionssR   zFreezeCommand.add_options)optionsargsrc Csptt}|js|t|jr*||jt|t|j |j |j |j |j ||jdD]}tj|dqVtS)N) requirement local_only user_onlypathsisolatedskipr )setrrupdater!excludesrcheck_list_path_optionrrrrpath isolated_modersysstdoutwriter)r%r)r*r0liner&r&r'runMs"    zFreezeCommand.run) __name__ __module__ __qualname____doc__usage log_streamsr(rrstrintr<r&r&r&r'r s 4r )r8optparsertypingrZpip._internal.clirpip._internal.cli.base_commandrpip._internal.cli.status_codesrZpip._internal.operations.freezerpip._internal.utils.compatrr!r r&r&r&r's       __pycache__/uninstall.cpython-39.pyc000064400000006102152350770610013423 0ustar00a Re @sddlZddlmZddlmZddlmZddlmZddl m Z m Z ddl m Z ddlmZdd lmZdd lmZmZdd lmZeeZGd d d ee ZdS)N)Values)List)canonicalize_name)Command)SessionCommandMixinwarn_if_run_as_root)SUCCESS)InstallationError)parse_requirements)install_req_from_line#install_req_from_parsed_requirement)(protect_pip_from_modification_on_windowsc@s8eZdZdZdZddddZeeee ddd Z dS) UninstallCommandaB Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutils packages installed with ``python setup.py install``, which leave behind no metadata to determine what files were installed. - Script wrappers installed by ``python setup.py develop``. zU %prog [options] ... %prog [options] -r ...N)returnc CsD|jjddddgddd|jjdd d d d d |jd|jdS)Nz-rz --requirement requirementsappendfilezjUninstall all the packages listed in the given requirements file. This option can be used multiple times.)destactiondefaultmetavarhelpz-yz--yesyes store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)cmd_opts add_optionparserinsert_option_group)selfr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/uninstall.py add_options$s" zUninstallCommand.add_options)optionsargsrc Cs||}i}|D]4}t||jd}|jr:||t|j<qtd|q|jD]:}t|||dD]&}t ||jd}|jr`||t|j<q`qN|st d|jd|jdt d|vd| D]&}|j |j|jd kd } | r| qttS) N)isolatedzSInvalid requirement: %r ignored - the uninstall command expects named requirements.)r"sessionz*You must give at least one requirement to z (see "pip help z")pip) modifying_pipr) auto_confirmverbose)get_default_sessionr isolated_modenamerloggerwarningrr r r r values uninstallr verbositycommitrr) rr"r#r%Zreqs_to_uninstallr,reqfilename parsed_reqZuninstall_pathsetrrr run;sP      zUninstallCommand.run) __name__ __module__ __qualname____doc__usager!rrstrintr6rrrr rs r)loggingoptparsertypingrpip._vendor.packaging.utilsrpip._internal.cli.base_commandrpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.exceptionsr pip._internal.reqr pip._internal.req.constructorsr r pip._internal.utils.miscr getLoggerr7r-rrrrr s         __pycache__/configuration.cpython-39.pyc000064400000020246152350770610014266 0ustar00a Re"@sddlZddlZddlZddlmZddlmZmZmZddl m Z ddl m Z m Z ddlmZmZmZmZddlmZddlmZdd lmZmZeeZGd d d e ZdS) N)Values)AnyListOptional)Command)ERRORSUCCESS) ConfigurationKindget_configuration_fileskinds)PipError) indent_log)get_prog write_outputc@s*eZdZdZdZdZddddZeee e dd d Z ee e ed d d Zeee ddddZeee ddddZeee ddddZeee ddddZeee ddddZeddddZddddZeee ddddZee e e edd d!Zddd"d#Zee d$d%d&ZdS)'ConfigurationCommandaa Manage local and global configuration. Subcommands: - list: List the active configuration (or from the file specified) - edit: Edit the configuration file in an editor - get: Get the value associated with name - set: Set the name=value - unset: Unset the value associated with name - debug: List the configuration files and values defined under them If none of --user, --global and --site are passed, a virtual environment configuration file is used if one is active and the file exists. Otherwise, all modifications happen to the user file by default. Ta %prog [] list %prog [] [--editor ] edit %prog [] get name %prog [] set name value %prog [] unset name %prog [] debug N)returncCsl|jjdddddd|jjdddd d d|jjd d dd d d|jjdddd dd|jd|jdS)Nz--editoreditorstorez\Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided.)destactiondefaulthelpz--global global_file store_trueFz+Use the system-wide configuration file onlyz--user user_filez$Use the user configuration file onlyz--site site_filez3Use the current environment configuration file onlyr)cmd_opts add_optionparserinsert_option_groupselfr#/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/configuration.py add_options4s: z ConfigurationCommand.add_options)optionsargsrc Cs|j|j|j|j|j|jd}|r.|d|vrHtddt |t S|d}z|j ||dvd}Wn8t y}z t|j dt WYd}~Sd}~00t|j|d|_|jz||||ddWn:t y}z t|j dt WYd}~Sd}~00tS) N)listeditgetsetunsetdebugrzNeed an action (%s) to perform.z, )r*r+r,r)) need_value)isolated load_only) list_valuesopen_in_editorget_nameset_name_value unset_namelist_config_valuesloggererrorjoinsortedr_determine_filer r'r isolated_mode configurationloadr)r"r&r'handlersrr0er#r#r$runZs>    zConfigurationCommand.run)r&r.rcCsddtj|jftj|jftj|jffD}|s`|s8dStddttjDrXtjStjSnt |dkrt|dSt ddS)NcSsg|]\}}|r|qSr#r#).0keyvaluer#r#r$ sz8ConfigurationCommand._determine_file..css|]}tj|VqdS)N)ospathexists)rCsite_config_filer#r#r$ sz7ConfigurationCommand._determine_file..r1rzLNeed exactly one file to operate upon (--user, --site, --global) to perform.) r USERrGLOBALrSITEranyr lenr )r"r&r.Z file_optionsr#r#r$r<s&      z$ConfigurationCommand._determine_filecCs8|j|dddt|jD]\}}td||qdS)Nr(rn%s=%r) _get_n_argsr;r>itemsrr"r&r'rDrEr#r#r$r2sz ConfigurationCommand.list_valuescCs*|j|ddd}|j|}td|dS)Nz get [name]r1rQz%s)rTr> get_valuerrVr#r#r$r4s zConfigurationCommand.get_namecCs.|j|ddd\}}|j|||dS)Nzset [name] [value]rQ)rTr> set_value_save_configurationrVr#r#r$r5sz#ConfigurationCommand.set_name_valuecCs(|j|ddd}|j||dS)Nz unset [name]r1rQ)rTr> unset_valuerZ)r"r&r'rDr#r#r$r6s zConfigurationCommand.unset_namec Cs|j|ddd|t|jD]h\}}td||D]P}t6tj |}td|||rn| |Wdq<1s0Yqiter_config_filesrrrGrHrIprint_config_file_values)r"r&r'variantfilesfnameZ file_existsr#r#r$r7s   z'ConfigurationCommand.list_config_values)r`rc CsP|j|D]:\}}ttd||Wdq1s@0YqdS)z.Get key-value pairs from the file of a variantz%s: %sN)r>get_values_in_configrUrr)r"r`namerEr#r#r$r_sz-ConfigurationCommand.print_config_file_valuescCsftddtBt|jD]"\}}d|}td||q Wdn1sX0YdS)z5Get key-values pairs present as environment variablesr\env_varPIP_rSN)rrr;r>get_environ_varsupper)r"rDrErer#r#r$r]s  z)ConfigurationCommand.print_env_var_valuesc Csr||}|j}|dur$tdzt||gWn6tjyl}ztd|jWYd}~n d}~00dS)Nz%Could not determine appropriate file.z*Editor Subprocess exited with exit code {}) _determine_editorr>get_file_to_editr subprocess check_callCalledProcessErrorformat returncode)r"r&r'rrbrAr#r#r$r3s   z#ConfigurationCommand.open_in_editor)r'examplerRrcCs<t||kr$d|t|}t||dkr4|dS|SdS)zAHelper to make sure the command got the right number of argumentszJGot unexpected number of arguments, expected {}. (example: "{} config {}")r1rN)rPrnrr )r"r'rprRmsgr#r#r$rTs z ConfigurationCommand._get_n_argscCs8z|jWn$ty2tdtdYn0dS)Nz:Unable to save configuration. Please report this as a bug.zInternal Error.)r>save Exceptionr8 exceptionr r!r#r#r$rZs z(ConfigurationCommand._save_configuration)r&rcCsD|jdur|jSdtjvr$tjdSdtjvr8tjdStddS)NZVISUALZEDITORz"Could not determine editor to use.)rrGenvironr )r"r&r#r#r$ris     z&ConfigurationCommand._determine_editor)__name__ __module__ __qualname____doc__ignore_require_venvusager%rrstrintrBboolrr r<r2r4r5r6r7r_r]r3rrTrZrir#r#r#r$rs" &- r)loggingrGrkoptparsertypingrrrpip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.configurationr r r r pip._internal.exceptionsr pip._internal.utils.loggingrpip._internal.utils.miscrr getLoggerrvr8rr#r#r#r$s     __pycache__/download.cpython-39.pyc000064400000007637152350770610013237 0ustar00a Re(@sddlZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddl mZddlmZdd lmZmZmZdd lmZeeZGd d d e ZdS) N)Values)List) cmdoptions)make_target_python)RequirementCommand with_cleanup)SUCCESS)get_requirement_tracker) ensure_dirnormalize_path write_output) TempDirectoryc@s<eZdZdZdZddddZeeee e ddd Z dS) DownloadCommandaL Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. a %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] ... %prog [options] ... %prog [options] ...N)returnc CsL|jt|jt|jt|jt|jt|jt|jt |jt |jt |jt |jt |jt|jt|jt|jt|jjddddddtjddt|jttj|j}|jd ||jd |jdS) Nz-dz--destz--destination-dirz--destination-directory download_dirdirzDownload packages into .)destmetavardefaulthelpr)cmd_opts add_optionr constraints requirementsno_depsglobal_options no_binary only_binary prefer_binarysrcprerequire_hashes progress_barno_build_isolation use_pep517 no_use_pep517ignore_requires_pythonoscurdiradd_target_python_optionsmake_option_group index_groupparserinsert_option_group)self index_optsr0/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/download.py add_options%s@ zDownloadCommand.add_options)optionsargsrc Cs&d|_g|_t|t|j|_t|j||}t|}|j ||||j d}| t }t |j ddd}|||||}|j||||||jdd} |j| |||j |jd} ||| j|dd} g} | jD]2} | jdur| jdusJ| | | | jq| r"td d | tS) NT)r3session target_pythonr&download)deletekindglobally_managedF)temp_build_dirr3 req_trackerr5finderr use_user_site)preparerr=r3r&py_version_info)check_supported_wheelszSuccessfully downloaded %s )ignore_installed editablesrcheck_dist_restrictionr rr get_default_sessionr_build_package_finderr& enter_contextr r no_cleanget_requirementsmake_requirement_preparer make_resolverpython_versiontrace_basic_inforesolvervalues satisfied_bynamesave_linked_requirementappendr joinr)r.r3r4r5r6r=r< directoryreqsr?resolverrequirement_set downloadedreqr0r0r1runKs^         zDownloadCommand.run) __name__ __module__ __qualname____doc__usager2rrrstrintr\r0r0r0r1rs  &r)loggingr'optparsertypingrZpip._internal.clirZpip._internal.cli.cmdoptionsrpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.req.req_trackerr pip._internal.utils.miscr r r pip._internal.utils.temp_dirr getLoggerr]loggerrr0r0r0r1s        __pycache__/__init__.cpython-39.pyc000064400000006020152350770610013150 0ustar00a Re@s$UdZddlZddlmZddlmZmZmZddlm Z eddZ e dd d e d d d e ddde ddde ddde ddde ddde ddde d d!d"e d#d$d%e d&d'd(e d)d*d+e d,d-d.e d/d0d1e d2d3d4e d5d6d7d8Z ee e fe d9<e ee d:d;d<Ze ee d=d>d?ZdS)@z% Package containing all pip commands N) namedtuple)AnyDictOptional)Command CommandInfoz module_path, class_name, summaryzpip._internal.commands.installInstallCommandzInstall packages.zpip._internal.commands.downloadDownloadCommandzDownload packages.z pip._internal.commands.uninstallUninstallCommandzUninstall packages.zpip._internal.commands.freeze FreezeCommandz1Output installed packages in requirements format.zpip._internal.commands.list ListCommandzList installed packages.zpip._internal.commands.show ShowCommandz*Show information about installed packages.zpip._internal.commands.check CheckCommandz7Verify installed packages have compatible dependencies.z$pip._internal.commands.configurationConfigurationCommandz&Manage local and global configuration.zpip._internal.commands.search SearchCommandzSearch PyPI for packages.zpip._internal.commands.cache CacheCommandz%Inspect and manage pip's wheel cache.zpip._internal.commands.index IndexCommandz3Inspect information available from package indexes.zpip._internal.commands.wheel WheelCommandz$Build wheels from your requirements.zpip._internal.commands.hash HashCommandz#Compute hashes of package archives.z!pip._internal.commands.completionCompletionCommandz-A helper command used for command completion.zpip._internal.commands.debug DebugCommandz&Show information useful for debugging.zpip._internal.commands.help HelpCommandzShow help for commands.)installdownload uninstallfreezelistshowcheckconfigsearchcacheindexwheelhash completiondebughelp commands_dict)namekwargsreturncKs:t|\}}}t|}t||}|f||d|}|S)zF Create an instance of the Command class with the given name. )r)summary)r( importlib import_modulegetattr)r)r* module_path class_namer,module command_classcommandr5/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/__init__.pycreate_commandhs   r7)r)r+cCs6ddlm}|}||t}|r.|dSdSdS)zCommand name auto-correct.r)get_close_matchesN)difflibr8lowerr(keys)r)r8close_commandsr5r5r6get_similar_commandsts  r=)__doc__r- collectionsrtypingrrrpip._internal.cli.base_commandrrr(str__annotations__r7r=r5r5r5r6s   T __pycache__/check.cpython-39.pyc000064400000003104152350770610012466 0ustar00a Re@svddlZddlmZddlmZddlmZddlmZm Z ddl m Z m Z ddl mZeeZGdd d eZdS) N)Values)List)Command)ERRORSUCCESS)check_package_set!create_package_set_from_installed) write_outputc@s*eZdZdZdZeeeedddZ dS) CheckCommandz7Verify installed packages have compatible dependencies.z %prog [options])optionsargsreturnc Cst\}}t|\}}|D].}||j}||D]} td||| dq0q|D]4}||j}||D]\} } } td||| | | qdqN|s|s|rtStdtSdS)Nz*%s %s requires %s, which is not installed.rz-%s %s has requirement %s, but you have %s %s.zNo broken requirements found.)rrversionr rr) selfr r package_setZ parsing_probsmissing conflicting project_namer dependencydep_name dep_versionreqr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/check.pyruns4      zCheckCommand.runN) __name__ __module__ __qualname____doc__usagerrstrintrrrrrr sr )loggingoptparsertypingrpip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.operations.checkrrpip._internal.utils.miscr getLoggerrloggerr rrrrs     __pycache__/completion.cpython-39.pyc000064400000006151152350770610013567 0ustar00a Re @spddlZddlZddlmZddlmZddlmZddlm Z ddl m Z dZ dd d d Z Gd d d eZdS)N)Values)List)Command)SUCCESS)get_progzD # pip {shell} completion start{script}# pip {shell} completion end a _pip_completion() {{ COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \ COMP_CWORD=$COMP_CWORD \ PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) ) }} complete -o default -F _pip_completion {prog} aM function _pip_completion {{ local words cword read -Ac words read -cn cword reply=( $( COMP_WORDS="$words[*]" \ COMP_CWORD=$(( cword-1 )) \ PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )) }} compctl -K _pip_completion {prog} au function __fish_complete_pip set -lx COMP_WORDS (commandline -o) "" set -lx COMP_CWORD ( \ math (contains -i -- (commandline -t) $COMP_WORDS)-1 \ ) set -lx PIP_AUTO_COMPLETE 1 string split \ -- (eval $COMP_WORDS[1]) end complete -fa "(__fish_complete_pip)" -c {prog} )bashzshfishc@s8eZdZdZdZddddZeeee ddd Z dS) CompletionCommandz3A helper command to be used for command completion.TN)returncCs\|jjddddddd|jjdd dd dd d|jjd d ddddd|jd|jdS)Nz--bashz-b store_constrshellzEmit completion code for bash)actionconstdesthelpz--zshz-zrzEmit completion code for zshz--fishz-fr zEmit completion code for fishr)cmd_opts add_optionparserinsert_option_group)selfr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/completion.py add_options6s2 zCompletionCommand.add_options)optionsargsr cCszt}ddt|D}|j|vrZtt|jdjtd}t t j||jdt St j dd|t SdS) z-Prints the completion code of the given shellcSsg|] }d|qS)z--r).0r rrr Uz)CompletionCommand.run..)prog)scriptr zERROR: You must pass {} z or N)COMPLETION_SCRIPTSkeyssortedr textwrapdedentgetformatrprintBASE_COMPLETIONrsysstderrwritejoin)rrrZshellsZ shell_optionsr!rrrrunRs zCompletionCommand.run) __name__ __module__ __qualname____doc__ignore_require_venvrrrstrintr/rrrrr 1sr )r+r%optparsertypingrpip._internal.cli.base_commandrpip._internal.cli.status_codesrpip._internal.utils.miscrr*r"r rrrrs       #__pycache__/cache.cpython-39.pyc000064400000014107152350770610012461 0ustar00a Red@sddlZddlZddlmZddlmZmZddlmm m Z ddl m Z ddl mZmZddlmZmZddlmZeeZGdd d e ZdS) N)Values)AnyList)Command)ERRORSUCCESS) CommandErrorPipError) getLoggerc@seZdZdZdZdZddddZeee e dd d Z eee ddd d Z eee ddd dZeee ddddZee ddddZee ddddZeee ddddZeee ddddZee e dddZeee dddZee ee d d!d"ZdS)# CacheCommandaw Inspect and manage pip's wheel cache. Subcommands: - dir: Show the cache directory. - info: Show information about the cache. - list: List filenames of packages stored in the cache. - remove: Remove one or more package from the cache. - purge: Remove all items from the cache. ```` can be a glob expression or a package name. Tz %prog dir %prog info %prog list [] [--format=[human, abspath]] %prog remove %prog purge N)returncCs,|jjddddddd|jd|jdS) Nz--formatstore list_formathuman)rabspathz:Select the output format among: human (default) or abspath)actiondestdefaultchoiceshelpr)cmd_opts add_optionparserinsert_option_group)selfr/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_internal/commands/cache.py add_options's zCacheCommand.add_options)optionsargsr c Cs|j|j|j|j|jd}|js.tdtS|r>|d|vrXtdd t |tS|d}z||||ddWn8t y}z t|j dtWYd}~Sd}~00t S)N)dirinfolistremovepurgezrEr,warningrNunlinkverboser!)rrrrKZno_matching_msgrTrrrr)s    zCacheCommand.remove_cache_itemscCs|r td||dgS)Nr3r5)rr)r4rrrr*szCacheCommand.purge_cache)rsubdirr cCstj|j|S)N)rNrOr.r+)rrrZrrrr@szCacheCommand._cache_dir)rr cCs||d}t|dS)Nr6r5r@rA find_files)rrZhttp_dirrrrr>s zCacheCommand._find_http_files)rrJr cCs,||d}|d|vrdnd}t||S)Nr7-z*.whlz-*.whlr[)rrrJ wheel_dirrrrr?s zCacheCommand._find_wheels)__name__ __module__ __qualname____doc__ignore_require_venvusagerrrstrintr2rr&r'r(rHrIr)r*r@r>r?rrrrr s  $  r )rNrCoptparsertypingrrpip._internal.utils.filesystem _internalutilsrApip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.exceptionsrr pip._internal.utils.loggingr r_r,r rrrrs   cache.py000064400000016544152350770610006201 0ustar00import os import textwrap from optparse import Values from typing import Any, List import pip._internal.utils.filesystem as filesystem from pip._internal.cli.base_command import Command from pip._internal.cli.status_codes import ERROR, SUCCESS from pip._internal.exceptions import CommandError, PipError from pip._internal.utils.logging import getLogger logger = getLogger(__name__) class CacheCommand(Command): """ Inspect and manage pip's wheel cache. Subcommands: - dir: Show the cache directory. - info: Show information about the cache. - list: List filenames of packages stored in the cache. - remove: Remove one or more package from the cache. - purge: Remove all items from the cache. ```` can be a glob expression or a package name. """ ignore_require_venv = True usage = """ %prog dir %prog info %prog list [] [--format=[human, abspath]] %prog remove %prog purge """ def add_options(self) -> None: self.cmd_opts.add_option( "--format", action="store", dest="list_format", default="human", choices=("human", "abspath"), help="Select the output format among: human (default) or abspath", ) self.parser.insert_option_group(0, self.cmd_opts) def run(self, options: Values, args: List[str]) -> int: handlers = { "dir": self.get_cache_dir, "info": self.get_cache_info, "list": self.list_cache_items, "remove": self.remove_cache_items, "purge": self.purge_cache, } if not options.cache_dir: logger.error("pip cache commands can not function since cache is disabled.") return ERROR # Determine action if not args or args[0] not in handlers: logger.error( "Need an action (%s) to perform.", ", ".join(sorted(handlers)), ) return ERROR action = args[0] # Error handling happens here, not in the action-handlers. try: handlers[action](options, args[1:]) except PipError as e: logger.error(e.args[0]) return ERROR return SUCCESS def get_cache_dir(self, options: Values, args: List[Any]) -> None: if args: raise CommandError("Too many arguments") logger.info(options.cache_dir) def get_cache_info(self, options: Values, args: List[Any]) -> None: if args: raise CommandError("Too many arguments") num_http_files = len(self._find_http_files(options)) num_packages = len(self._find_wheels(options, "*")) http_cache_location = self._cache_dir(options, "http") wheels_cache_location = self._cache_dir(options, "wheels") http_cache_size = filesystem.format_directory_size(http_cache_location) wheels_cache_size = filesystem.format_directory_size(wheels_cache_location) message = ( textwrap.dedent( """ Package index page cache location: {http_cache_location} Package index page cache size: {http_cache_size} Number of HTTP files: {num_http_files} Wheels location: {wheels_cache_location} Wheels size: {wheels_cache_size} Number of wheels: {package_count} """ ) .format( http_cache_location=http_cache_location, http_cache_size=http_cache_size, num_http_files=num_http_files, wheels_cache_location=wheels_cache_location, package_count=num_packages, wheels_cache_size=wheels_cache_size, ) .strip() ) logger.info(message) def list_cache_items(self, options: Values, args: List[Any]) -> None: if len(args) > 1: raise CommandError("Too many arguments") if args: pattern = args[0] else: pattern = "*" files = self._find_wheels(options, pattern) if options.list_format == "human": self.format_for_human(files) else: self.format_for_abspath(files) def format_for_human(self, files: List[str]) -> None: if not files: logger.info("Nothing cached.") return results = [] for filename in files: wheel = os.path.basename(filename) size = filesystem.format_file_size(filename) results.append(f" - {wheel} ({size})") logger.info("Cache contents:\n") logger.info("\n".join(sorted(results))) def format_for_abspath(self, files: List[str]) -> None: if not files: return results = [] for filename in files: results.append(filename) logger.info("\n".join(sorted(results))) def remove_cache_items(self, options: Values, args: List[Any]) -> None: if len(args) > 1: raise CommandError("Too many arguments") if not args: raise CommandError("Please provide a pattern") files = self._find_wheels(options, args[0]) no_matching_msg = "No matching packages" if args[0] == "*": # Only fetch http files if no specific pattern given files += self._find_http_files(options) else: # Add the pattern to the log message no_matching_msg += ' for pattern "{}"'.format(args[0]) if not files: logger.warning(no_matching_msg) for filename in files: os.unlink(filename) logger.verbose("Removed %s", filename) logger.info("Files removed: %s", len(files)) def purge_cache(self, options: Values, args: List[Any]) -> None: if args: raise CommandError("Too many arguments") return self.remove_cache_items(options, ["*"]) def _cache_dir(self, options: Values, subdir: str) -> str: return os.path.join(options.cache_dir, subdir) def _find_http_files(self, options: Values) -> List[str]: http_dir = self._cache_dir(options, "http") return filesystem.find_files(http_dir, "*") def _find_wheels(self, options: Values, pattern: str) -> List[str]: wheel_dir = self._cache_dir(options, "wheels") # The wheel filename format, as specified in PEP 427, is: # {distribution}-{version}(-{build})?-{python}-{abi}-{platform}.whl # # Additionally, non-alphanumeric values in the distribution are # normalized to underscores (_), meaning hyphens can never occur # before `-{version}`. # # Given that information: # - If the pattern we're given contains a hyphen (-), the user is # providing at least the version. Thus, we can just append `*.whl` # to match the rest of it. # - If the pattern we're given doesn't contain a hyphen (-), the # user is only providing the name. Thus, we append `-*.whl` to # match the hyphen before the version, followed by anything else. # # PEP 427: https://www.python.org/dev/peps/pep-0427/ pattern = pattern + ("*.whl" if "-" in pattern else "-*.whl") return filesystem.find_files(wheel_dir, pattern) hash.py000064400000003075152350770610006054 0ustar00from __future__ import absolute_import import hashlib import logging import sys from pip.basecommand import Command from pip.status_codes import ERROR from pip.utils import read_chunks from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES logger = logging.getLogger(__name__) class HashCommand(Command): """ Compute a hash of a local package archive. These can be used with --hash in a requirements file to do repeatable installs. """ name = 'hash' usage = '%prog [options] ...' summary = 'Compute hashes of package archives.' def __init__(self, *args, **kw): super(HashCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-a', '--algorithm', dest='algorithm', choices=STRONG_HASHES, action='store', default=FAVORITE_HASH, help='The hash algorithm to use: one of %s' % ', '.join(STRONG_HASHES)) self.parser.insert_option_group(0, self.cmd_opts) def run(self, options, args): if not args: self.parser.print_usage(sys.stderr) return ERROR algorithm = options.algorithm for path in args: logger.info('%s:\n--hash=%s:%s', path, algorithm, _hash_of_file(path, algorithm)) def _hash_of_file(path, algorithm): """Return the hash digest of a file.""" with open(path, 'rb') as archive: hash = hashlib.new(algorithm) for chunk in read_chunks(archive): hash.update(chunk) return hash.hexdigest() search.py000064400000010626152350770610006376 0ustar00from __future__ import absolute_import import logging import sys import textwrap from pip.basecommand import Command, SUCCESS from pip.compat import OrderedDict from pip.download import PipXmlrpcTransport from pip.models import PyPI from pip.utils import get_terminal_size from pip.utils.logging import indent_log from pip.exceptions import CommandError from pip.status_codes import NO_MATCHES_FOUND from pip._vendor.packaging.version import parse as parse_version from pip._vendor import pkg_resources from pip._vendor.six.moves import xmlrpc_client logger = logging.getLogger(__name__) class SearchCommand(Command): """Search for PyPI packages whose name or summary contains .""" name = 'search' usage = """ %prog [options] """ summary = 'Search PyPI for packages.' def __init__(self, *args, **kw): super(SearchCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-i', '--index', dest='index', metavar='URL', default=PyPI.pypi_url, help='Base URL of Python Package Index (default %default)') self.parser.insert_option_group(0, self.cmd_opts) def run(self, options, args): if not args: raise CommandError('Missing required argument (search query).') query = args pypi_hits = self.search(query, options) hits = transform_hits(pypi_hits) terminal_width = None if sys.stdout.isatty(): terminal_width = get_terminal_size()[0] print_results(hits, terminal_width=terminal_width) if pypi_hits: return SUCCESS return NO_MATCHES_FOUND def search(self, query, options): index_url = options.index with self._build_session(options) as session: transport = PipXmlrpcTransport(index_url, session) pypi = xmlrpc_client.ServerProxy(index_url, transport) hits = pypi.search({'name': query, 'summary': query}, 'or') return hits def transform_hits(hits): """ The list from pypi is really a list of versions. We want a list of packages with the list of versions stored inline. This converts the list from pypi into one we can use. """ packages = OrderedDict() for hit in hits: name = hit['name'] summary = hit['summary'] version = hit['version'] if name not in packages.keys(): packages[name] = { 'name': name, 'summary': summary, 'versions': [version], } else: packages[name]['versions'].append(version) # if this is the highest version, replace summary and score if version == highest_version(packages[name]['versions']): packages[name]['summary'] = summary return list(packages.values()) def print_results(hits, name_column_width=None, terminal_width=None): if not hits: return if name_column_width is None: name_column_width = max([ len(hit['name']) + len(hit.get('versions', ['-'])[-1]) for hit in hits ]) + 4 installed_packages = [p.project_name for p in pkg_resources.working_set] for hit in hits: name = hit['name'] summary = hit['summary'] or '' version = hit.get('versions', ['-'])[-1] if terminal_width is not None: target_width = terminal_width - name_column_width - 5 if target_width > 10: # wrap and indent summary to fit terminal summary = textwrap.wrap(summary, target_width) summary = ('\n' + ' ' * (name_column_width + 3)).join(summary) line = '%-*s - %s' % (name_column_width, '%s (%s)' % (name, version), summary) try: logger.info(line) if name in installed_packages: dist = pkg_resources.get_distribution(name) with indent_log(): latest = highest_version(hit['versions']) if dist.version == latest: logger.info('INSTALLED: %s (latest)', dist.version) else: logger.info('INSTALLED: %s', dist.version) logger.info('LATEST: %s', latest) except UnicodeEncodeError: pass def highest_version(versions): return max(versions, key=parse_version) check.py000064400000002546152350770610006210 0ustar00import logging from pip.basecommand import Command from pip.operations.check import check_requirements from pip.utils import get_installed_distributions logger = logging.getLogger(__name__) class CheckCommand(Command): """Verify installed packages have compatible dependencies.""" name = 'check' usage = """ %prog [options]""" summary = 'Verify installed packages have compatible dependencies.' def run(self, options, args): dists = get_installed_distributions(local_only=False, skip=()) missing_reqs_dict, incompatible_reqs_dict = check_requirements(dists) for dist in dists: key = '%s==%s' % (dist.project_name, dist.version) for requirement in missing_reqs_dict.get(key, []): logger.info( "%s %s requires %s, which is not installed.", dist.project_name, dist.version, requirement.project_name) for requirement, actual in incompatible_reqs_dict.get(key, []): logger.info( "%s %s has requirement %s, but you have %s %s.", dist.project_name, dist.version, requirement, actual.project_name, actual.version) if missing_reqs_dict or incompatible_reqs_dict: return 1 else: logger.info("No broken requirements found.") freeze.py000064400000005423152350770610006410 0ustar00from __future__ import absolute_import import sys import pip from pip.compat import stdlib_pkgs from pip.basecommand import Command from pip.operations.freeze import freeze from pip.wheel import WheelCache DEV_PKGS = ('pip', 'setuptools', 'distribute', 'wheel') class FreezeCommand(Command): """ Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. """ name = 'freeze' usage = """ %prog [options]""" summary = 'Output installed packages in requirements format.' log_streams = ("ext://sys.stderr", "ext://sys.stderr") def __init__(self, *args, **kw): super(FreezeCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-r', '--requirement', dest='requirements', action='append', default=[], metavar='file', help="Use the order in the given requirements file and its " "comments when generating output. This option can be " "used multiple times.") self.cmd_opts.add_option( '-f', '--find-links', dest='find_links', action='append', default=[], metavar='URL', help='URL for finding packages, which will be added to the ' 'output.') self.cmd_opts.add_option( '-l', '--local', dest='local', action='store_true', default=False, help='If in a virtualenv that has global access, do not output ' 'globally-installed packages.') self.cmd_opts.add_option( '--user', dest='user', action='store_true', default=False, help='Only output packages installed in user-site.') self.cmd_opts.add_option( '--all', dest='freeze_all', action='store_true', help='Do not skip these packages in the output:' ' %s' % ', '.join(DEV_PKGS)) self.parser.insert_option_group(0, self.cmd_opts) def run(self, options, args): format_control = pip.index.FormatControl(set(), set()) wheel_cache = WheelCache(options.cache_dir, format_control) skip = set(stdlib_pkgs) if not options.freeze_all: skip.update(DEV_PKGS) freeze_kwargs = dict( requirement=options.requirements, find_links=options.find_links, local_only=options.local, user_only=options.user, skip_regex=options.skip_requirements_regex, isolated=options.isolated_mode, wheel_cache=wheel_cache, skip=skip) for line in freeze(**freeze_kwargs): sys.stdout.write(line + '\n') completion.py000064400000004625152350770610007304 0ustar00from __future__ import absolute_import import sys from pip.basecommand import Command BASE_COMPLETION = """ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end """ COMPLETION_SCRIPTS = { 'bash': """ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ COMP_CWORD=$COMP_CWORD \\ PIP_AUTO_COMPLETE=1 $1 ) ) } complete -o default -F _pip_completion pip """, 'zsh': """ function _pip_completion { local words cword read -Ac words read -cn cword reply=( $( COMP_WORDS="$words[*]" \\ COMP_CWORD=$(( cword-1 )) \\ PIP_AUTO_COMPLETE=1 $words[1] ) ) } compctl -K _pip_completion pip """, 'fish': """ function __fish_complete_pip set -lx COMP_WORDS (commandline -o) "" set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1) set -lx PIP_AUTO_COMPLETE 1 string split \ -- (eval $COMP_WORDS[1]) end complete -fa "(__fish_complete_pip)" -c pip """} class CompletionCommand(Command): """A helper command to be used for command completion.""" name = 'completion' summary = 'A helper command used for command completion.' def __init__(self, *args, **kw): super(CompletionCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option( '--bash', '-b', action='store_const', const='bash', dest='shell', help='Emit completion code for bash') cmd_opts.add_option( '--zsh', '-z', action='store_const', const='zsh', dest='shell', help='Emit completion code for zsh') cmd_opts.add_option( '--fish', '-f', action='store_const', const='fish', dest='shell', help='Emit completion code for fish') self.parser.insert_option_group(0, cmd_opts) def run(self, options, args): """Prints the completion code of the given shell""" shells = COMPLETION_SCRIPTS.keys() shell_options = ['--' + shell for shell in sorted(shells)] if options.shell in shells: script = COMPLETION_SCRIPTS.get(options.shell, '') print(BASE_COMPLETION % {'script': script, 'shell': options.shell}) else: sys.stderr.write( 'ERROR: You must pass %s\n' % ' or '.join(shell_options) ) help.py000064400000001726152350770610006062 0ustar00from __future__ import absolute_import from pip.basecommand import Command, SUCCESS from pip.exceptions import CommandError class HelpCommand(Command): """Show help for commands""" name = 'help' usage = """ %prog """ summary = 'Show help for commands.' def run(self, options, args): from pip.commands import commands_dict, get_similar_commands try: # 'pip help' with no args is handled by pip.__init__.parseopt() cmd_name = args[0] # the command we need help for except IndexError: return SUCCESS if cmd_name not in commands_dict: guess = get_similar_commands(cmd_name) msg = ['unknown command "%s"' % cmd_name] if guess: msg.append('maybe you meant "%s"' % guess) raise CommandError(' - '.join(msg)) command = commands_dict[cmd_name]() command.parser.print_help() return SUCCESS wheel.py000064400000017061152350770610006235 0ustar00# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import RequirementCommand from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import RequirementSet from pip.utils import import_or_raise from pip.utils.build import BuildDirectory from pip.utils.deprecation import RemovedInPip10Warning from pip.wheel import WheelCache, WheelBuilder from pip import cmdoptions logger = logging.getLogger(__name__) class WheelCommand(RequirementCommand): """ Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. """ name = 'wheel' usage = """ %prog [options] ... %prog [options] -r ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...""" summary = 'Build wheels from your requirements.' def __init__(self, *args, **kw): super(WheelCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option( '-w', '--wheel-dir', dest='wheel_dir', metavar='dir', default=os.curdir, help=("Build wheels into , where the default is the " "current working directory."), ) cmd_opts.add_option(cmdoptions.use_wheel()) cmd_opts.add_option(cmdoptions.no_use_wheel()) cmd_opts.add_option(cmdoptions.no_binary()) cmd_opts.add_option(cmdoptions.only_binary()) cmd_opts.add_option( '--build-option', dest='build_options', metavar='options', action='append', help="Extra arguments to be supplied to 'setup.py bdist_wheel'.") cmd_opts.add_option(cmdoptions.constraints()) cmd_opts.add_option(cmdoptions.editable()) cmd_opts.add_option(cmdoptions.requirements()) cmd_opts.add_option(cmdoptions.src()) cmd_opts.add_option(cmdoptions.ignore_requires_python()) cmd_opts.add_option(cmdoptions.no_deps()) cmd_opts.add_option(cmdoptions.build_dir()) cmd_opts.add_option( '--global-option', dest='global_options', action='append', metavar='options', help="Extra global options to be supplied to the setup.py " "call before the 'bdist_wheel' command.") cmd_opts.add_option( '--pre', action='store_true', default=False, help=("Include pre-release and development versions. By default, " "pip only finds stable versions."), ) cmd_opts.add_option(cmdoptions.no_clean()) cmd_opts.add_option(cmdoptions.require_hashes()) index_opts = cmdoptions.make_option_group( cmdoptions.index_group, self.parser, ) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, cmd_opts) def check_required_packages(self): import_or_raise( 'wheel.bdist_wheel', CommandError, "'pip wheel' requires the 'wheel' package. To fix this, run: " "pip install wheel" ) pkg_resources = import_or_raise( 'pkg_resources', CommandError, "'pip wheel' requires setuptools >= 0.8 for dist-info support." " To fix this, run: pip install --upgrade setuptools" ) if not hasattr(pkg_resources, 'DistInfoDistribution'): raise CommandError( "'pip wheel' requires setuptools >= 0.8 for dist-info " "support. To fix this, run: pip install --upgrade " "setuptools" ) def run(self, options, args): self.check_required_packages() cmdoptions.resolve_wheel_no_use_binary(options) cmdoptions.check_install_build_global(options) if options.allow_external: warnings.warn( "--allow-external has been deprecated and will be removed in " "the future. Due to changes in the repository protocol, it no " "longer has any effect.", RemovedInPip10Warning, ) if options.allow_all_external: warnings.warn( "--allow-all-external has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) if options.allow_unverified: warnings.warn( "--allow-unverified has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) index_urls = [options.index_url] + options.extra_index_urls if options.no_index: logger.debug('Ignoring indexes: %s', ','.join(index_urls)) index_urls = [] if options.build_dir: options.build_dir = os.path.abspath(options.build_dir) options.src_dir = os.path.abspath(options.src_dir) with self._build_session(options) as session: finder = self._build_package_finder(options, session) build_delete = (not (options.no_clean or options.build_dir)) wheel_cache = WheelCache(options.cache_dir, options.format_control) with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: requirement_set = RequirementSet( build_dir=build_dir, src_dir=options.src_dir, download_dir=None, ignore_dependencies=options.ignore_dependencies, ignore_installed=True, ignore_requires_python=options.ignore_requires_python, isolated=options.isolated_mode, session=session, wheel_cache=wheel_cache, wheel_download_dir=options.wheel_dir, require_hashes=options.require_hashes ) self.populate_requirement_set( requirement_set, args, options, finder, session, self.name, wheel_cache ) if not requirement_set.has_requirements: return try: # build wheels wb = WheelBuilder( requirement_set, finder, build_options=options.build_options or [], global_options=options.global_options or [], ) if not wb.build(): raise CommandError( "Failed to build one or more wheels" ) except PreviousBuildDirError: options.no_clean = True raise finally: if not options.no_clean: requirement_set.cleanup_files() install.py000064400000043561152350770610006603 0ustar00from __future__ import absolute_import import logging import operator import os import tempfile import shutil import warnings import sys from os import path try: import wheel except ImportError: wheel = None from pip.req import RequirementSet from pip.basecommand import RequirementCommand from pip.locations import virtualenv_no_global, distutils_scheme from pip.exceptions import ( InstallationError, CommandError, PreviousBuildDirError, ) from pip import cmdoptions from pip.utils import ensure_dir, get_installed_version from pip.utils.build import BuildDirectory from pip.utils.deprecation import RemovedInPip10Warning from pip.utils.filesystem import check_path_owner from pip.wheel import WheelCache, WheelBuilder logger = logging.getLogger(__name__) class InstallCommand(RequirementCommand): """ Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. """ name = 'install' usage = """ %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...""" summary = 'Install packages.' def __init__(self, *args, **kw): super(InstallCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option(cmdoptions.constraints()) cmd_opts.add_option(cmdoptions.editable()) cmd_opts.add_option(cmdoptions.requirements()) cmd_opts.add_option(cmdoptions.build_dir()) cmd_opts.add_option( '-t', '--target', dest='target_dir', metavar='dir', default=None, help='Install packages into . ' 'By default this will not replace existing files/folders in ' '. Use --upgrade to replace existing packages in ' 'with new versions.' ) cmd_opts.add_option( '-d', '--download', '--download-dir', '--download-directory', dest='download_dir', metavar='dir', default=None, help=("Download packages into instead of installing them, " "regardless of what's already installed."), ) cmd_opts.add_option(cmdoptions.src()) cmd_opts.add_option( '-U', '--upgrade', dest='upgrade', action='store_true', help='Upgrade all specified packages to the newest available ' 'version. The handling of dependencies depends on the ' 'upgrade-strategy used.' ) cmd_opts.add_option( '--upgrade-strategy', dest='upgrade_strategy', default='eager', choices=['only-if-needed', 'eager'], help='Determines how dependency upgrading should be handled. ' '"eager" - dependencies are upgraded regardless of ' 'whether the currently installed version satisfies the ' 'requirements of the upgraded package(s). ' '"only-if-needed" - are upgraded only when they do not ' 'satisfy the requirements of the upgraded package(s).' ) cmd_opts.add_option( '--force-reinstall', dest='force_reinstall', action='store_true', help='When upgrading, reinstall all packages even if they are ' 'already up-to-date.') cmd_opts.add_option( '-I', '--ignore-installed', dest='ignore_installed', action='store_true', help='Ignore the installed packages (reinstalling instead).') cmd_opts.add_option(cmdoptions.ignore_requires_python()) cmd_opts.add_option(cmdoptions.no_deps()) cmd_opts.add_option(cmdoptions.install_options()) cmd_opts.add_option(cmdoptions.global_options()) cmd_opts.add_option( '--user', dest='use_user_site', action='store_true', help="Install to the Python user install directory for your " "platform. Typically ~/.local/, or %APPDATA%\Python on " "Windows. (See the Python documentation for site.USER_BASE " "for full details.)") cmd_opts.add_option( '--egg', dest='as_egg', action='store_true', help="Install packages as eggs, not 'flat', like pip normally " "does. This option is not about installing *from* eggs. " "(WARNING: Because this option overrides pip's normal install" " logic, requirements files may not behave as expected.)") cmd_opts.add_option( '--root', dest='root_path', metavar='dir', default=None, help="Install everything relative to this alternate root " "directory.") cmd_opts.add_option( '--strip-file-prefix', dest='strip_file_prefix', metavar='prefix', default=None, help="Strip given prefix from script paths in wheel RECORD." ) cmd_opts.add_option( '--prefix', dest='prefix_path', metavar='dir', default=None, help="Installation prefix where lib, bin and other top-level " "folders are placed") cmd_opts.add_option( "--compile", action="store_true", dest="compile", default=True, help="Compile py files to pyc", ) cmd_opts.add_option( "--no-compile", action="store_false", dest="compile", help="Do not compile py files to pyc", ) cmd_opts.add_option(cmdoptions.use_wheel()) cmd_opts.add_option(cmdoptions.no_use_wheel()) cmd_opts.add_option(cmdoptions.no_binary()) cmd_opts.add_option(cmdoptions.only_binary()) cmd_opts.add_option(cmdoptions.pre()) cmd_opts.add_option(cmdoptions.no_clean()) cmd_opts.add_option(cmdoptions.require_hashes()) index_opts = cmdoptions.make_option_group( cmdoptions.index_group, self.parser, ) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, cmd_opts) def run(self, options, args): cmdoptions.resolve_wheel_no_use_binary(options) cmdoptions.check_install_build_global(options) def is_venv(): return hasattr(sys, 'real_prefix') or \ (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix) # Check whether we have root privileges and aren't in venv/virtualenv if os.getuid() == 0 and not is_venv(): logger.warning( "WARNING: Running pip install with root privileges is " "generally not a good idea. Try `%s install --user` instead." % path.basename(sys.argv[0]) ) if options.as_egg: warnings.warn( "--egg has been deprecated and will be removed in the future. " "This flag is mutually exclusive with large parts of pip, and " "actually using it invalidates pip's ability to manage the " "installation process.", RemovedInPip10Warning, ) if options.allow_external: warnings.warn( "--allow-external has been deprecated and will be removed in " "the future. Due to changes in the repository protocol, it no " "longer has any effect.", RemovedInPip10Warning, ) if options.allow_all_external: warnings.warn( "--allow-all-external has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) if options.allow_unverified: warnings.warn( "--allow-unverified has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) if options.download_dir: warnings.warn( "pip install --download has been deprecated and will be " "removed in the future. Pip now has a download command that " "should be used instead.", RemovedInPip10Warning, ) options.ignore_installed = True if options.build_dir: options.build_dir = os.path.abspath(options.build_dir) options.src_dir = os.path.abspath(options.src_dir) install_options = options.install_options or [] if options.use_user_site: if options.prefix_path: raise CommandError( "Can not combine '--user' and '--prefix' as they imply " "different installation locations" ) if virtualenv_no_global(): raise InstallationError( "Can not perform a '--user' install. User site-packages " "are not visible in this virtualenv." ) install_options.append('--user') install_options.append('--prefix=') temp_target_dir = None if options.target_dir: options.ignore_installed = True temp_target_dir = tempfile.mkdtemp() options.target_dir = os.path.abspath(options.target_dir) if (os.path.exists(options.target_dir) and not os.path.isdir(options.target_dir)): raise CommandError( "Target path exists but is not a directory, will not " "continue." ) install_options.append('--home=' + temp_target_dir) global_options = options.global_options or [] with self._build_session(options) as session: finder = self._build_package_finder(options, session) build_delete = (not (options.no_clean or options.build_dir)) wheel_cache = WheelCache(options.cache_dir, options.format_control) if options.cache_dir and not check_path_owner(options.cache_dir): logger.warning( "The directory '%s' or its parent directory is not owned " "by the current user and caching wheels has been " "disabled. check the permissions and owner of that " "directory. If executing pip with sudo, you may want " "sudo's -H flag.", options.cache_dir, ) options.cache_dir = None with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: requirement_set = RequirementSet( build_dir=build_dir, src_dir=options.src_dir, download_dir=options.download_dir, upgrade=options.upgrade, upgrade_strategy=options.upgrade_strategy, as_egg=options.as_egg, ignore_installed=options.ignore_installed, ignore_dependencies=options.ignore_dependencies, ignore_requires_python=options.ignore_requires_python, force_reinstall=options.force_reinstall, use_user_site=options.use_user_site, target_dir=temp_target_dir, session=session, pycompile=options.compile, isolated=options.isolated_mode, wheel_cache=wheel_cache, require_hashes=options.require_hashes, ) self.populate_requirement_set( requirement_set, args, options, finder, session, self.name, wheel_cache ) if not requirement_set.has_requirements: return try: if (options.download_dir or not wheel or not options.cache_dir): # on -d don't do complex things like building # wheels, and don't try to build wheels when wheel is # not installed. requirement_set.prepare_files(finder) else: # build wheels before install. wb = WheelBuilder( requirement_set, finder, build_options=[], global_options=[], ) # Ignore the result: a failed wheel will be # installed from the sdist/vcs whatever. wb.build(autobuilding=True) if not options.download_dir: requirement_set.install( install_options, global_options, root=options.root_path, prefix=options.prefix_path, strip_file_prefix=options.strip_file_prefix, ) possible_lib_locations = get_lib_location_guesses( user=options.use_user_site, home=temp_target_dir, root=options.root_path, prefix=options.prefix_path, isolated=options.isolated_mode, ) reqs = sorted( requirement_set.successfully_installed, key=operator.attrgetter('name')) items = [] for req in reqs: item = req.name try: installed_version = get_installed_version( req.name, possible_lib_locations ) if installed_version: item += '-' + installed_version except Exception: pass items.append(item) installed = ' '.join(items) if installed: logger.info('Successfully installed %s', installed) else: downloaded = ' '.join([ req.name for req in requirement_set.successfully_downloaded ]) if downloaded: logger.info( 'Successfully downloaded %s', downloaded ) except PreviousBuildDirError: options.no_clean = True raise finally: # Clean up if not options.no_clean: requirement_set.cleanup_files() if options.target_dir: ensure_dir(options.target_dir) # Checking both purelib and platlib directories for installed # packages to be moved to target directory lib_dir_list = [] purelib_dir = distutils_scheme('', home=temp_target_dir)['purelib'] platlib_dir = distutils_scheme('', home=temp_target_dir)['platlib'] if os.path.exists(purelib_dir): lib_dir_list.append(purelib_dir) if os.path.exists(platlib_dir) and platlib_dir != purelib_dir: lib_dir_list.append(platlib_dir) for lib_dir in lib_dir_list: for item in os.listdir(lib_dir): target_item_dir = os.path.join(options.target_dir, item) if os.path.exists(target_item_dir): if not options.upgrade: logger.warning( 'Target directory %s already exists. Specify ' '--upgrade to force replacement.', target_item_dir ) continue if os.path.islink(target_item_dir): logger.warning( 'Target directory %s already exists and is ' 'a link. Pip will not automatically replace ' 'links, please remove if replacement is ' 'desired.', target_item_dir ) continue if os.path.isdir(target_item_dir): shutil.rmtree(target_item_dir) else: os.remove(target_item_dir) shutil.move( os.path.join(lib_dir, item), target_item_dir ) shutil.rmtree(temp_target_dir) return requirement_set def get_lib_location_guesses(*args, **kwargs): scheme = distutils_scheme('', *args, **kwargs) return [scheme['purelib'], scheme['platlib']] show.py000064400000013403152350770610006105 0ustar00from __future__ import absolute_import from email.parser import FeedParser import logging import os from pip.basecommand import Command from pip.status_codes import SUCCESS, ERROR from pip._vendor import pkg_resources from pip._vendor.packaging.utils import canonicalize_name logger = logging.getLogger(__name__) class ShowCommand(Command): """Show information about one or more installed packages.""" name = 'show' usage = """ %prog [options] ...""" summary = 'Show information about installed packages.' def __init__(self, *args, **kw): super(ShowCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-f', '--files', dest='files', action='store_true', default=False, help='Show the full list of installed files for each package.') self.parser.insert_option_group(0, self.cmd_opts) def run(self, options, args): if not args: logger.warning('ERROR: Please provide a package name or names.') return ERROR query = args results = search_packages_info(query) if not print_results( results, list_files=options.files, verbose=options.verbose): return ERROR return SUCCESS def search_packages_info(query): """ Gather details from installed distributions. Print distribution name, version, location, and installed files. Installed files requires a pip generated 'installed-files.txt' in the distributions '.egg-info' directory. """ installed = {} for p in pkg_resources.working_set: installed[canonicalize_name(p.project_name)] = p query_names = [canonicalize_name(name) for name in query] for dist in [installed[pkg] for pkg in query_names if pkg in installed]: package = { 'name': dist.project_name, 'version': dist.version, 'location': dist.location, 'requires': [dep.project_name for dep in dist.requires()], } file_list = None metadata = None if isinstance(dist, pkg_resources.DistInfoDistribution): # RECORDs should be part of .dist-info metadatas if dist.has_metadata('RECORD'): lines = dist.get_metadata_lines('RECORD') paths = [l.split(',')[0] for l in lines] paths = [os.path.join(dist.location, p) for p in paths] file_list = [os.path.relpath(p, dist.location) for p in paths] if dist.has_metadata('METADATA'): metadata = dist.get_metadata('METADATA') else: # Otherwise use pip's log for .egg-info's if dist.has_metadata('installed-files.txt'): paths = dist.get_metadata_lines('installed-files.txt') paths = [os.path.join(dist.egg_info, p) for p in paths] file_list = [os.path.relpath(p, dist.location) for p in paths] if dist.has_metadata('PKG-INFO'): metadata = dist.get_metadata('PKG-INFO') if dist.has_metadata('entry_points.txt'): entry_points = dist.get_metadata_lines('entry_points.txt') package['entry_points'] = entry_points if dist.has_metadata('INSTALLER'): for line in dist.get_metadata_lines('INSTALLER'): if line.strip(): package['installer'] = line.strip() break # @todo: Should pkg_resources.Distribution have a # `get_pkg_info` method? feed_parser = FeedParser() feed_parser.feed(metadata) pkg_info_dict = feed_parser.close() for key in ('metadata-version', 'summary', 'home-page', 'author', 'author-email', 'license'): package[key] = pkg_info_dict.get(key) # It looks like FeedParser cannot deal with repeated headers classifiers = [] for line in metadata.splitlines(): if line.startswith('Classifier: '): classifiers.append(line[len('Classifier: '):]) package['classifiers'] = classifiers if file_list: package['files'] = sorted(file_list) yield package def print_results(distributions, list_files=False, verbose=False): """ Print the informations from installed distributions found. """ results_printed = False for i, dist in enumerate(distributions): results_printed = True if i > 0: logger.info("---") logger.info("Name: %s", dist.get('name', '')) logger.info("Version: %s", dist.get('version', '')) logger.info("Summary: %s", dist.get('summary', '')) logger.info("Home-page: %s", dist.get('home-page', '')) logger.info("Author: %s", dist.get('author', '')) logger.info("Author-email: %s", dist.get('author-email', '')) logger.info("License: %s", dist.get('license', '')) logger.info("Location: %s", dist.get('location', '')) logger.info("Requires: %s", ', '.join(dist.get('requires', []))) if verbose: logger.info("Metadata-Version: %s", dist.get('metadata-version', '')) logger.info("Installer: %s", dist.get('installer', '')) logger.info("Classifiers:") for classifier in dist.get('classifiers', []): logger.info(" %s", classifier) logger.info("Entry-points:") for entry in dist.get('entry_points', []): logger.info(" %s", entry.strip()) if list_files: logger.info("Files:") for line in dist.get('files', []): logger.info(" %s", line.strip()) if "files" not in dist: logger.info("Cannot locate installed-files.txt") return results_printed download.py000064400000017202152350770610006735 0ustar00from __future__ import absolute_import import logging import os from pip.exceptions import CommandError from pip.index import FormatControl from pip.req import RequirementSet from pip.basecommand import RequirementCommand from pip import cmdoptions from pip.utils import ensure_dir, normalize_path from pip.utils.build import BuildDirectory from pip.utils.filesystem import check_path_owner logger = logging.getLogger(__name__) class DownloadCommand(RequirementCommand): """ Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. """ name = 'download' usage = """ %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...""" summary = 'Download packages.' def __init__(self, *args, **kw): super(DownloadCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option(cmdoptions.constraints()) cmd_opts.add_option(cmdoptions.editable()) cmd_opts.add_option(cmdoptions.requirements()) cmd_opts.add_option(cmdoptions.build_dir()) cmd_opts.add_option(cmdoptions.no_deps()) cmd_opts.add_option(cmdoptions.global_options()) cmd_opts.add_option(cmdoptions.no_binary()) cmd_opts.add_option(cmdoptions.only_binary()) cmd_opts.add_option(cmdoptions.src()) cmd_opts.add_option(cmdoptions.pre()) cmd_opts.add_option(cmdoptions.no_clean()) cmd_opts.add_option(cmdoptions.require_hashes()) cmd_opts.add_option( '-d', '--dest', '--destination-dir', '--destination-directory', dest='download_dir', metavar='dir', default=os.curdir, help=("Download packages into ."), ) cmd_opts.add_option( '--platform', dest='platform', metavar='platform', default=None, help=("Only download wheels compatible with . " "Defaults to the platform of the running system."), ) cmd_opts.add_option( '--python-version', dest='python_version', metavar='python_version', default=None, help=("Only download wheels compatible with Python " "interpreter version . If not specified, then the " "current system interpreter minor version is used. A major " "version (e.g. '2') can be specified to match all " "minor revs of that major version. A minor version " "(e.g. '34') can also be specified."), ) cmd_opts.add_option( '--implementation', dest='implementation', metavar='implementation', default=None, help=("Only download wheels compatible with Python " "implementation , e.g. 'pp', 'jy', 'cp', " " or 'ip'. If not specified, then the current " "interpreter implementation is used. Use 'py' to force " "implementation-agnostic wheels."), ) cmd_opts.add_option( '--abi', dest='abi', metavar='abi', default=None, help=("Only download wheels compatible with Python " "abi , e.g. 'pypy_41'. If not specified, then the " "current interpreter abi tag is used. Generally " "you will need to specify --implementation, " "--platform, and --python-version when using " "this option."), ) index_opts = cmdoptions.make_option_group( cmdoptions.non_deprecated_index_group, self.parser, ) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, cmd_opts) def run(self, options, args): options.ignore_installed = True if options.python_version: python_versions = [options.python_version] else: python_versions = None dist_restriction_set = any([ options.python_version, options.platform, options.abi, options.implementation, ]) binary_only = FormatControl(set(), set([':all:'])) if dist_restriction_set and options.format_control != binary_only: raise CommandError( "--only-binary=:all: must be set and --no-binary must not " "be set (or must be set to :none:) when restricting platform " "and interpreter constraints using --python-version, " "--platform, --abi, or --implementation." ) options.src_dir = os.path.abspath(options.src_dir) options.download_dir = normalize_path(options.download_dir) ensure_dir(options.download_dir) with self._build_session(options) as session: finder = self._build_package_finder( options=options, session=session, platform=options.platform, python_versions=python_versions, abi=options.abi, implementation=options.implementation, ) build_delete = (not (options.no_clean or options.build_dir)) if options.cache_dir and not check_path_owner(options.cache_dir): logger.warning( "The directory '%s' or its parent directory is not owned " "by the current user and caching wheels has been " "disabled. check the permissions and owner of that " "directory. If executing pip with sudo, you may want " "sudo's -H flag.", options.cache_dir, ) options.cache_dir = None with BuildDirectory(options.build_dir, delete=build_delete) as build_dir: requirement_set = RequirementSet( build_dir=build_dir, src_dir=options.src_dir, download_dir=options.download_dir, ignore_installed=True, ignore_dependencies=options.ignore_dependencies, session=session, isolated=options.isolated_mode, require_hashes=options.require_hashes ) self.populate_requirement_set( requirement_set, args, options, finder, session, self.name, None ) if not requirement_set.has_requirements: return requirement_set.prepare_files(finder) downloaded = ' '.join([ req.name for req in requirement_set.successfully_downloaded ]) if downloaded: logger.info( 'Successfully downloaded %s', downloaded ) # Clean up if not options.no_clean: requirement_set.cleanup_files() return requirement_set configuration.py000064400000021360152350770610007775 0ustar00import logging import os import subprocess from optparse import Values from typing import Any, List, Optional from pip._internal.cli.base_command import Command from pip._internal.cli.status_codes import ERROR, SUCCESS from pip._internal.configuration import ( Configuration, Kind, get_configuration_files, kinds, ) from pip._internal.exceptions import PipError from pip._internal.utils.logging import indent_log from pip._internal.utils.misc import get_prog, write_output logger = logging.getLogger(__name__) class ConfigurationCommand(Command): """ Manage local and global configuration. Subcommands: - list: List the active configuration (or from the file specified) - edit: Edit the configuration file in an editor - get: Get the value associated with name - set: Set the name=value - unset: Unset the value associated with name - debug: List the configuration files and values defined under them If none of --user, --global and --site are passed, a virtual environment configuration file is used if one is active and the file exists. Otherwise, all modifications happen to the user file by default. """ ignore_require_venv = True usage = """ %prog [] list %prog [] [--editor ] edit %prog [] get name %prog [] set name value %prog [] unset name %prog [] debug """ def add_options(self) -> None: self.cmd_opts.add_option( "--editor", dest="editor", action="store", default=None, help=( "Editor to use to edit the file. Uses VISUAL or EDITOR " "environment variables if not provided." ), ) self.cmd_opts.add_option( "--global", dest="global_file", action="store_true", default=False, help="Use the system-wide configuration file only", ) self.cmd_opts.add_option( "--user", dest="user_file", action="store_true", default=False, help="Use the user configuration file only", ) self.cmd_opts.add_option( "--site", dest="site_file", action="store_true", default=False, help="Use the current environment configuration file only", ) self.parser.insert_option_group(0, self.cmd_opts) def run(self, options: Values, args: List[str]) -> int: handlers = { "list": self.list_values, "edit": self.open_in_editor, "get": self.get_name, "set": self.set_name_value, "unset": self.unset_name, "debug": self.list_config_values, } # Determine action if not args or args[0] not in handlers: logger.error( "Need an action (%s) to perform.", ", ".join(sorted(handlers)), ) return ERROR action = args[0] # Determine which configuration files are to be loaded # Depends on whether the command is modifying. try: load_only = self._determine_file( options, need_value=(action in ["get", "set", "unset", "edit"]) ) except PipError as e: logger.error(e.args[0]) return ERROR # Load a new configuration self.configuration = Configuration( isolated=options.isolated_mode, load_only=load_only ) self.configuration.load() # Error handling happens here, not in the action-handlers. try: handlers[action](options, args[1:]) except PipError as e: logger.error(e.args[0]) return ERROR return SUCCESS def _determine_file(self, options: Values, need_value: bool) -> Optional[Kind]: file_options = [ key for key, value in ( (kinds.USER, options.user_file), (kinds.GLOBAL, options.global_file), (kinds.SITE, options.site_file), ) if value ] if not file_options: if not need_value: return None # Default to user, unless there's a site file. elif any( os.path.exists(site_config_file) for site_config_file in get_configuration_files()[kinds.SITE] ): return kinds.SITE else: return kinds.USER elif len(file_options) == 1: return file_options[0] raise PipError( "Need exactly one file to operate upon " "(--user, --site, --global) to perform." ) def list_values(self, options: Values, args: List[str]) -> None: self._get_n_args(args, "list", n=0) for key, value in sorted(self.configuration.items()): write_output("%s=%r", key, value) def get_name(self, options: Values, args: List[str]) -> None: key = self._get_n_args(args, "get [name]", n=1) value = self.configuration.get_value(key) write_output("%s", value) def set_name_value(self, options: Values, args: List[str]) -> None: key, value = self._get_n_args(args, "set [name] [value]", n=2) self.configuration.set_value(key, value) self._save_configuration() def unset_name(self, options: Values, args: List[str]) -> None: key = self._get_n_args(args, "unset [name]", n=1) self.configuration.unset_value(key) self._save_configuration() def list_config_values(self, options: Values, args: List[str]) -> None: """List config key-value pairs across different config files""" self._get_n_args(args, "debug", n=0) self.print_env_var_values() # Iterate over config files and print if they exist, and the # key-value pairs present in them if they do for variant, files in sorted(self.configuration.iter_config_files()): write_output("%s:", variant) for fname in files: with indent_log(): file_exists = os.path.exists(fname) write_output("%s, exists: %r", fname, file_exists) if file_exists: self.print_config_file_values(variant) def print_config_file_values(self, variant: Kind) -> None: """Get key-value pairs from the file of a variant""" for name, value in self.configuration.get_values_in_config(variant).items(): with indent_log(): write_output("%s: %s", name, value) def print_env_var_values(self) -> None: """Get key-values pairs present as environment variables""" write_output("%s:", "env_var") with indent_log(): for key, value in sorted(self.configuration.get_environ_vars()): env_var = f"PIP_{key.upper()}" write_output("%s=%r", env_var, value) def open_in_editor(self, options: Values, args: List[str]) -> None: editor = self._determine_editor(options) fname = self.configuration.get_file_to_edit() if fname is None: raise PipError("Could not determine appropriate file.") try: subprocess.check_call([editor, fname]) except subprocess.CalledProcessError as e: raise PipError( "Editor Subprocess exited with exit code {}".format(e.returncode) ) def _get_n_args(self, args: List[str], example: str, n: int) -> Any: """Helper to make sure the command got the right number of arguments""" if len(args) != n: msg = ( "Got unexpected number of arguments, expected {}. " '(example: "{} config {}")' ).format(n, get_prog(), example) raise PipError(msg) if n == 1: return args[0] else: return args def _save_configuration(self) -> None: # We successfully ran a modifying command. Need to save the # configuration. try: self.configuration.save() except Exception: logger.exception( "Unable to save configuration. Please report this as a bug." ) raise PipError("Internal Error.") def _determine_editor(self, options: Values) -> str: if options.editor is not None: return options.editor elif "VISUAL" in os.environ: return os.environ["VISUAL"] elif "EDITOR" in os.environ: return os.environ["EDITOR"] else: raise PipError("Could not determine editor to use.") uninstall.py000064400000005504152350770610007141 0ustar00from __future__ import absolute_import import pip from pip.wheel import WheelCache from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutils packages installed with ``python setup.py install``, which leave behind no metadata to determine what files were installed. - Script wrappers installed by ``python setup.py develop``. """ name = 'uninstall' usage = """ %prog [options] ... %prog [options] -r ...""" summary = 'Uninstall packages.' def __init__(self, *args, **kw): super(UninstallCommand, self).__init__(*args, **kw) self.cmd_opts.add_option( '-r', '--requirement', dest='requirements', action='append', default=[], metavar='file', help='Uninstall all the packages listed in the given requirements ' 'file. This option can be used multiple times.', ) self.cmd_opts.add_option( '-y', '--yes', dest='yes', action='store_true', help="Don't ask for confirmation of uninstall deletions.") self.parser.insert_option_group(0, self.cmd_opts) def run(self, options, args): with self._build_session(options) as session: format_control = pip.index.FormatControl(set(), set()) wheel_cache = WheelCache(options.cache_dir, format_control) requirement_set = RequirementSet( build_dir=None, src_dir=None, download_dir=None, isolated=options.isolated_mode, session=session, wheel_cache=wheel_cache, ) for name in args: requirement_set.add_requirement( InstallRequirement.from_line( name, isolated=options.isolated_mode, wheel_cache=wheel_cache ) ) for filename in options.requirements: for req in parse_requirements( filename, options=options, session=session, wheel_cache=wheel_cache): requirement_set.add_requirement(req) if not requirement_set.has_requirements: raise InstallationError( 'You must give at least one requirement to %(name)s (see ' '"pip help %(name)s")' % dict(name=self.name) ) requirement_set.uninstall(auto_confirm=options.yes) list.py000064400000026151152350770610006104 0ustar00from __future__ import absolute_import import json import logging import warnings try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longest from pip._vendor import six from pip.basecommand import Command from pip.exceptions import CommandError from pip.index import PackageFinder from pip.utils import ( get_installed_distributions, dist_is_editable) from pip.utils.deprecation import RemovedInPip10Warning from pip.cmdoptions import make_option_group, index_group logger = logging.getLogger(__name__) class ListCommand(Command): """ List installed packages, including editables. Packages are listed in a case-insensitive sorted order. """ name = 'list' usage = """ %prog [options]""" summary = 'List installed packages.' def __init__(self, *args, **kw): super(ListCommand, self).__init__(*args, **kw) cmd_opts = self.cmd_opts cmd_opts.add_option( '-o', '--outdated', action='store_true', default=False, help='List outdated packages') cmd_opts.add_option( '-u', '--uptodate', action='store_true', default=False, help='List uptodate packages') cmd_opts.add_option( '-e', '--editable', action='store_true', default=False, help='List editable projects.') cmd_opts.add_option( '-l', '--local', action='store_true', default=False, help=('If in a virtualenv that has global access, do not list ' 'globally-installed packages.'), ) self.cmd_opts.add_option( '--user', dest='user', action='store_true', default=False, help='Only output packages installed in user-site.') cmd_opts.add_option( '--pre', action='store_true', default=False, help=("Include pre-release and development versions. By default, " "pip only finds stable versions."), ) cmd_opts.add_option( '--format', action='store', dest='list_format', choices=('legacy', 'columns', 'freeze', 'json'), help="Select the output format among: legacy (default), columns, " "freeze or json.", ) cmd_opts.add_option( '--not-required', action='store_true', dest='not_required', help="List packages that are not dependencies of " "installed packages.", ) index_opts = make_option_group(index_group, self.parser) self.parser.insert_option_group(0, index_opts) self.parser.insert_option_group(0, cmd_opts) def _build_package_finder(self, options, index_urls, session): """ Create a package finder appropriate to this list command. """ return PackageFinder( find_links=options.find_links, index_urls=index_urls, allow_all_prereleases=options.pre, trusted_hosts=options.trusted_hosts, process_dependency_links=options.process_dependency_links, session=session, ) def run(self, options, args): if options.allow_external: warnings.warn( "--allow-external has been deprecated and will be removed in " "the future. Due to changes in the repository protocol, it no " "longer has any effect.", RemovedInPip10Warning, ) if options.allow_all_external: warnings.warn( "--allow-all-external has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) if options.allow_unverified: warnings.warn( "--allow-unverified has been deprecated and will be removed " "in the future. Due to changes in the repository protocol, it " "no longer has any effect.", RemovedInPip10Warning, ) if options.list_format is None: warnings.warn( "The default format will switch to columns in the future. " "You can use --format=(legacy|columns) (or define a " "format=(legacy|columns) in your pip.conf under the [list] " "section) to disable this warning.", RemovedInPip10Warning, ) if options.outdated and options.uptodate: raise CommandError( "Options --outdated and --uptodate cannot be combined.") packages = get_installed_distributions( local_only=options.local, user_only=options.user, editables_only=options.editable, ) if options.outdated: packages = self.get_outdated(packages, options) elif options.uptodate: packages = self.get_uptodate(packages, options) if options.not_required: packages = self.get_not_required(packages, options) self.output_package_listing(packages, options) def get_outdated(self, packages, options): return [ dist for dist in self.iter_packages_latest_infos(packages, options) if dist.latest_version > dist.parsed_version ] def get_uptodate(self, packages, options): return [ dist for dist in self.iter_packages_latest_infos(packages, options) if dist.latest_version == dist.parsed_version ] def get_not_required(self, packages, options): dep_keys = set() for dist in packages: dep_keys.update(requirement.key for requirement in dist.requires()) return set(pkg for pkg in packages if pkg.key not in dep_keys) def iter_packages_latest_infos(self, packages, options): index_urls = [options.index_url] + options.extra_index_urls if options.no_index: logger.debug('Ignoring indexes: %s', ','.join(index_urls)) index_urls = [] dependency_links = [] for dist in packages: if dist.has_metadata('dependency_links.txt'): dependency_links.extend( dist.get_metadata_lines('dependency_links.txt'), ) with self._build_session(options) as session: finder = self._build_package_finder(options, index_urls, session) finder.add_dependency_links(dependency_links) for dist in packages: typ = 'unknown' all_candidates = finder.find_all_candidates(dist.key) if not options.pre: # Remove prereleases all_candidates = [candidate for candidate in all_candidates if not candidate.version.is_prerelease] if not all_candidates: continue best_candidate = max(all_candidates, key=finder._candidate_sort_key) remote_version = best_candidate.version if best_candidate.location.is_wheel: typ = 'wheel' else: typ = 'sdist' # This is dirty but makes the rest of the code much cleaner dist.latest_version = remote_version dist.latest_filetype = typ yield dist def output_legacy(self, dist): if dist_is_editable(dist): return '%s (%s, %s)' % ( dist.project_name, dist.version, dist.location, ) else: return '%s (%s)' % (dist.project_name, dist.version) def output_legacy_latest(self, dist): return '%s - Latest: %s [%s]' % ( self.output_legacy(dist), dist.latest_version, dist.latest_filetype, ) def output_package_listing(self, packages, options): packages = sorted( packages, key=lambda dist: dist.project_name.lower(), ) if options.list_format == 'columns' and packages: data, header = format_for_columns(packages, options) self.output_package_listing_columns(data, header) elif options.list_format == 'freeze': for dist in packages: logger.info("%s==%s", dist.project_name, dist.version) elif options.list_format == 'json': logger.info(format_for_json(packages, options)) else: # legacy for dist in packages: if options.outdated: logger.info(self.output_legacy_latest(dist)) else: logger.info(self.output_legacy(dist)) def output_package_listing_columns(self, data, header): # insert the header first: we need to know the size of column names if len(data) > 0: data.insert(0, header) pkg_strings, sizes = tabulate(data) # Create and add a separator. if len(data) > 0: pkg_strings.insert(1, " ".join(map(lambda x: '-' * x, sizes))) for val in pkg_strings: logger.info(val) def tabulate(vals): # From pfmoore on GitHub: # https://github.com/pypa/pip/issues/3651#issuecomment-216932564 assert len(vals) > 0 sizes = [0] * max(len(x) for x in vals) for row in vals: sizes = [max(s, len(str(c))) for s, c in zip_longest(sizes, row)] result = [] for row in vals: display = " ".join([str(c).ljust(s) if c is not None else '' for s, c in zip_longest(sizes, row)]) result.append(display) return result, sizes def format_for_columns(pkgs, options): """ Convert the package data into something usable by output_package_listing_columns. """ running_outdated = options.outdated # Adjust the header for the `pip list --outdated` case. if running_outdated: header = ["Package", "Version", "Latest", "Type"] else: header = ["Package", "Version"] data = [] if any(dist_is_editable(x) for x in pkgs): header.append("Location") for proj in pkgs: # if we're working on the 'outdated' list, separate out the # latest_version and type row = [proj.project_name, proj.version] if running_outdated: row.append(proj.latest_version) row.append(proj.latest_filetype) if dist_is_editable(proj): row.append(proj.location) data.append(row) return data, header def format_for_json(packages, options): data = [] for dist in packages: info = { 'name': dist.project_name, 'version': six.text_type(dist.version), } if options.outdated: info['latest_version'] = six.text_type(dist.latest_version) info['latest_filetype'] = dist.latest_filetype data.append(info) return json.dumps(data) __init__.py000064400000004304152350770610006664 0ustar00""" Package containing all pip commands """ from __future__ import absolute_import from pip.commands.completion import CompletionCommand from pip.commands.download import DownloadCommand from pip.commands.freeze import FreezeCommand from pip.commands.hash import HashCommand from pip.commands.help import HelpCommand from pip.commands.list import ListCommand from pip.commands.check import CheckCommand from pip.commands.search import SearchCommand from pip.commands.show import ShowCommand from pip.commands.install import InstallCommand from pip.commands.uninstall import UninstallCommand from pip.commands.wheel import WheelCommand commands_dict = { CompletionCommand.name: CompletionCommand, FreezeCommand.name: FreezeCommand, HashCommand.name: HashCommand, HelpCommand.name: HelpCommand, SearchCommand.name: SearchCommand, ShowCommand.name: ShowCommand, InstallCommand.name: InstallCommand, UninstallCommand.name: UninstallCommand, DownloadCommand.name: DownloadCommand, ListCommand.name: ListCommand, CheckCommand.name: CheckCommand, WheelCommand.name: WheelCommand, } commands_order = [ InstallCommand, DownloadCommand, UninstallCommand, FreezeCommand, ListCommand, ShowCommand, CheckCommand, SearchCommand, WheelCommand, HashCommand, CompletionCommand, HelpCommand, ] def get_summaries(ordered=True): """Yields sorted (command name, command summary) tuples.""" if ordered: cmditems = _sort_commands(commands_dict, commands_order) else: cmditems = commands_dict.items() for name, command_class in cmditems: yield (name, command_class.summary) def get_similar_commands(name): """Command name auto-correct.""" from difflib import get_close_matches name = name.lower() close_commands = get_close_matches(name, commands_dict.keys()) if close_commands: return close_commands[0] else: return False def _sort_commands(cmddict, order): def keyfn(key): try: return order.index(key[1]) except ValueError: # unordered items should come last return 0xff return sorted(cmddict.items(), key=keyfn) __pycache__/help.cpython-36.opt-1.pyc000064400000002034152357360100013272 0ustar003 Pf@s<ddlmZddlmZmZddlmZGdddeZdS))absolute_import)CommandSUCCESS) CommandErrorc@s$eZdZdZdZdZdZddZdS) HelpCommandzShow help for commandshelpz %prog zShow help for commands.c Csddlm}m}y |d}Wntk r0tSX||krl||}d|g}|r^|jd|tdj|||}|jj tS)Nr) commands_dictget_similar_commandszunknown command "%s"zmaybe you meant "%s"z - ) Z pip.commandsrr IndexErrorrappendrjoinparserZ print_help) selfZoptionsargsrr Zcmd_nameZguessmsgZcommandr/usr/lib/python3.6/help.pyruns    zHelpCommand.runN)__name__ __module__ __qualname____doc__nameZusageZsummaryrrrrrrs rN)Z __future__rZpip.basecommandrrZpip.exceptionsrrrrrrs  __pycache__/list.cpython-36.opt-1.pyc000064400000022630152357360100013321 0ustar003 Pfi, @sddlmZddlZddlZddlZyddlmZWn ek rTddlmZYnXddl m Z ddl m Z ddl mZddlmZdd lmZmZdd lmZdd lmZmZejeZGd d d e ZddZddZddZdS))absolute_importN) zip_longest) izip_longest)six)Command) CommandError) PackageFinder)get_installed_distributionsdist_is_editable)RemovedInPip10Warning)make_option_group index_groupcs|eZdZdZdZdZdZfddZddZd d Z d d Z d dZ ddZ ddZ ddZddZddZddZZS) ListCommandzt List installed packages, including editables. Packages are listed in a case-insensitive sorted order. listz %prog [options]zList installed packages.cstt|j|||j}|jdddddd|jddddd d|jd d ddd d|jd ddddd|jjdddddd|jddddd|jdddd$dd|jddd d!d"tt|j}|jjd#||jjd#|dS)%Nz-oz --outdated store_trueFzList outdated packages)actiondefaulthelpz-uz --uptodatezList uptodate packagesz-ez --editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--useruserz,Only output packages installed in user-site.)destrrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--formatZstore list_formatlegacycolumnsfreezejsonzJSelect the output format among: legacy (default), columns, freeze or json.)rrchoicesrz--not-required not_requiredz>List packages that are not dependencies of installed packages.)rrrr)rrrr) superr__init__cmd_optsZ add_optionr r parserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/list.pyr#s^ zListCommand.__init__cCst|j||j|j|j|dS)zK Create a package finder appropriate to this list command. ) find_links index_urlsZallow_all_prereleases trusted_hostsprocess_dependency_linkssession)rr'prer)r*)r!optionsr(r+r%r%r&_build_package_findercsz!ListCommand._build_package_findercCs|jrtjdt|jr$tjdt|jr6tjdt|jdkrLtjdt|jr`|jr`t dt |j |j |j d}|jr|j||}n|jr|j||}|jr|j||}|j||dS)Nz--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zThe default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.z5Options --outdated and --uptodate cannot be combined.)Z local_onlyZ user_onlyZeditables_only)Zallow_externalwarningswarnr Zallow_all_externalZallow_unverifiedroutdatedZuptodaterr ZlocalrZeditable get_outdated get_uptodaterget_not_requiredoutput_package_listing)r!r-r"packagesr%r%r&runps<     zListCommand.runcCsdd|j||DS)NcSsg|]}|j|jkr|qSr%)latest_versionparsed_version).0distr%r%r& sz,ListCommand.get_outdated..)iter_packages_latest_infos)r!r6r-r%r%r&r2szListCommand.get_outdatedcCsdd|j||DS)NcSsg|]}|j|jkr|qSr%)r8r9)r:r;r%r%r&r<sz,ListCommand.get_uptodate..)r=)r!r6r-r%r%r&r3szListCommand.get_uptodatecsBtx$|D]}jdd|jDq Wtfdd|DS)Ncss|] }|jVqdS)N)key)r:Z requirementr%r%r& sz/ListCommand.get_not_required..c3s|]}|jkr|VqdS)N)r>)r:Zpkg)dep_keysr%r&r?s)setupdateZrequires)r!r6r-r;r%)r@r&r4s zListCommand.get_not_requiredc cs|jg|j}|jr*tjddj|g}g}x&|D]}|jdr4|j|jdq4W|j |}|j |||}|j |xn|D]f}d}|j |j } |jsdd| D} | sqt| |jd} | j} | jjrd}nd }| |_||_|VqWWdQRXdS) NzIgnoring indexes: %s,zdependency_links.txtunknowncSsg|]}|jjs|qSr%)versionZ is_prerelease)r: candidater%r%r&r<sz:ListCommand.iter_packages_latest_infos..)r>ZwheelZsdist)Z index_urlZextra_index_urlsZno_indexloggerdebugjoinZ has_metadataextendZget_metadata_linesZ_build_sessionr.Zadd_dependency_linksZfind_all_candidatesr>r,maxZ_candidate_sort_keyrElocationZis_wheelr8latest_filetype) r!r6r-r(Zdependency_linksr;r+findertypZall_candidatesZbest_candidateZremote_versionr%r%r&r=s8       z&ListCommand.iter_packages_latest_infoscCs0t|rd|j|j|jfSd|j|jfSdS)Nz %s (%s, %s)z%s (%s))r project_namerErL)r!r;r%r%r& output_legacys  zListCommand.output_legacycCsd|j||j|jfS)Nz%s - Latest: %s [%s])rQr8rM)r!r;r%r%r&output_legacy_latestsz ListCommand.output_legacy_latestcCst|ddd}|jdkr:|r:t||\}}|j||n~|jdkrfxr|D]}tjd|j|jqJWnR|jdkrtjt||n6x4|D],}|j rtj|j |qtj|j |qWdS)NcSs |jjS)N)rPlower)r;r%r%r&sz4ListCommand.output_package_listing..)r>rrz%s==%sr) sortedrformat_for_columnsoutput_package_listing_columnsrGinforPrEformat_for_jsonr1rRrQ)r!r6r-dataheaderr;r%r%r&r5s     z"ListCommand.output_package_listingcCsht|dkr|jd|t|\}}t|dkrL|jddjtdd|x|D]}tj|qRWdS)Nr cSsd|S)N-r%)xr%r%r&rT sz.)leninserttabulaterImaprGrX)r!rZr[Z pkg_stringssizesvalr%r%r&rWs     z*ListCommand.output_package_listing_columns)__name__ __module__ __qualname____doc__nameZusageZsummaryrr.r7r2r3r4r=rQrRr5rW __classcell__r%r%)r$r&rs @ 6' rcCsxdgtdd|D}x |D]}ddt||D}qWg}x0|D](}djddt||D}|j|qDW||fS)Nrcss|]}t|VqdS)N)r`)r:r_r%r%r&r?sztabulate..cSs"g|]\}}t|tt|qSr%)rKr`str)r:scr%r%r&r<sztabulate..r]cSs*g|]"\}}|dk r"t|j|ndqS)N)rlljust)r:rmrnr%r%r&r<s)rKrrIappend)valsrdrowresultZdisplayr%r%r&rbs   rbcCs|j}|rddddg}nddg}g}tdd|Dr@|jdxR|D]J}|j|jg}|rr|j|j|j|jt|r|j|j|j|qFW||fS)z_ Convert the package data into something usable by output_package_listing_columns. ZPackageZVersionZLatestZTypecss|]}t|VqdS)N)r )r:r_r%r%r&r?2sz%format_for_columns..ZLocation) r1anyrqrPrEr8rMr rL)Zpkgsr-Zrunning_outdatedr[rZZprojrsr%r%r&rV%s       rVcCsZg}xJ|D]B}|jtj|jd}|jrBtj|j|d<|j|d<|j|q Wtj |S)N)rjrEr8rM) rPrZ text_typerEr1r8rMrqrdumps)r6r-rZr;rXr%r%r&rYFs  rY) Z __future__rrZloggingr/ itertoolsr ImportErrorrZ pip._vendorrZpip.basecommandrZpip.exceptionsrZ pip.indexrZ pip.utilsr r Zpip.utils.deprecationr Zpip.cmdoptionsr r Z getLoggerrfrGrrbrVrYr%r%r%r&s(       |!__pycache__/list.cpython-36.pyc000064400000022677152357360100012375 0ustar003 Pfi, @sddlmZddlZddlZddlZyddlmZWn ek rTddlmZYnXddl m Z ddl m Z ddl mZddlmZdd lmZmZdd lmZdd lmZmZejeZGd d d e ZddZddZddZdS))absolute_importN) zip_longest) izip_longest)six)Command) CommandError) PackageFinder)get_installed_distributionsdist_is_editable)RemovedInPip10Warning)make_option_group index_groupcs|eZdZdZdZdZdZfddZddZd d Z d d Z d dZ ddZ ddZ ddZddZddZddZZS) ListCommandzt List installed packages, including editables. Packages are listed in a case-insensitive sorted order. listz %prog [options]zList installed packages.cstt|j|||j}|jdddddd|jddddd d|jd d ddd d|jd ddddd|jjdddddd|jddddd|jdddd$dd|jddd d!d"tt|j}|jjd#||jjd#|dS)%Nz-oz --outdated store_trueFzList outdated packages)actiondefaulthelpz-uz --uptodatezList uptodate packagesz-ez --editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--useruserz,Only output packages installed in user-site.)destrrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--formatZstore list_formatlegacycolumnsfreezejsonzJSelect the output format among: legacy (default), columns, freeze or json.)rrchoicesrz--not-required not_requiredz>List packages that are not dependencies of installed packages.)rrrr)rrrr) superr__init__cmd_optsZ add_optionr r parserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/list.pyr#s^ zListCommand.__init__cCst|j||j|j|j|dS)zK Create a package finder appropriate to this list command. ) find_links index_urlsZallow_all_prereleases trusted_hostsprocess_dependency_linkssession)rr'prer)r*)r!optionsr(r+r%r%r&_build_package_findercsz!ListCommand._build_package_findercCs|jrtjdt|jr$tjdt|jr6tjdt|jdkrLtjdt|jr`|jr`t dt |j |j |j d}|jr|j||}n|jr|j||}|jr|j||}|j||dS)Nz--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zThe default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.z5Options --outdated and --uptodate cannot be combined.)Z local_onlyZ user_onlyZeditables_only)Zallow_externalwarningswarnr Zallow_all_externalZallow_unverifiedroutdatedZuptodaterr ZlocalrZeditable get_outdated get_uptodaterget_not_requiredoutput_package_listing)r!r-r"packagesr%r%r&runps<     zListCommand.runcCsdd|j||DS)NcSsg|]}|j|jkr|qSr%)latest_versionparsed_version).0distr%r%r& sz,ListCommand.get_outdated..)iter_packages_latest_infos)r!r6r-r%r%r&r2szListCommand.get_outdatedcCsdd|j||DS)NcSsg|]}|j|jkr|qSr%)r8r9)r:r;r%r%r&r<sz,ListCommand.get_uptodate..)r=)r!r6r-r%r%r&r3szListCommand.get_uptodatecsBtx$|D]}jdd|jDq Wtfdd|DS)Ncss|] }|jVqdS)N)key)r:Z requirementr%r%r& sz/ListCommand.get_not_required..c3s|]}|jkr|VqdS)N)r>)r:Zpkg)dep_keysr%r&r?s)setupdateZrequires)r!r6r-r;r%)r@r&r4s zListCommand.get_not_requiredc cs|jg|j}|jr*tjddj|g}g}x&|D]}|jdr4|j|jdq4W|j |}|j |||}|j |xn|D]f}d}|j |j } |jsdd| D} | sqt| |jd} | j} | jjrd}nd }| |_||_|VqWWdQRXdS) NzIgnoring indexes: %s,zdependency_links.txtunknowncSsg|]}|jjs|qSr%)versionZ is_prerelease)r: candidater%r%r&r<sz:ListCommand.iter_packages_latest_infos..)r>ZwheelZsdist)Z index_urlZextra_index_urlsZno_indexloggerdebugjoinZ has_metadataextendZget_metadata_linesZ_build_sessionr.Zadd_dependency_linksZfind_all_candidatesr>r,maxZ_candidate_sort_keyrElocationZis_wheelr8latest_filetype) r!r6r-r(Zdependency_linksr;r+findertypZall_candidatesZbest_candidateZremote_versionr%r%r&r=s8       z&ListCommand.iter_packages_latest_infoscCs0t|rd|j|j|jfSd|j|jfSdS)Nz %s (%s, %s)z%s (%s))r project_namerErL)r!r;r%r%r& output_legacys  zListCommand.output_legacycCsd|j||j|jfS)Nz%s - Latest: %s [%s])rQr8rM)r!r;r%r%r&output_legacy_latestsz ListCommand.output_legacy_latestcCst|ddd}|jdkr:|r:t||\}}|j||n~|jdkrfxr|D]}tjd|j|jqJWnR|jdkrtjt||n6x4|D],}|j rtj|j |qtj|j |qWdS)NcSs |jjS)N)rPlower)r;r%r%r&sz4ListCommand.output_package_listing..)r>rrz%s==%sr) sortedrformat_for_columnsoutput_package_listing_columnsrGinforPrEformat_for_jsonr1rRrQ)r!r6r-dataheaderr;r%r%r&r5s     z"ListCommand.output_package_listingcCsht|dkr|jd|t|\}}t|dkrL|jddjtdd|x|D]}tj|qRWdS)Nr cSsd|S)N-r%)xr%r%r&rT sz.)leninserttabulaterImaprGrX)r!rZr[Z pkg_stringssizesvalr%r%r&rWs     z*ListCommand.output_package_listing_columns)__name__ __module__ __qualname____doc__nameZusageZsummaryrr.r7r2r3r4r=rQrRr5rW __classcell__r%r%)r$r&rs @ 6' rcCst|dkstdgtdd|D}x |D]}ddt||D}q.Wg}x0|D](}djddt||D}|j|qTW||fS)Nrcss|]}t|VqdS)N)r`)r:r_r%r%r&r?sztabulate..cSs"g|]\}}t|tt|qSr%)rKr`str)r:scr%r%r&r<sztabulate..r]cSs*g|]"\}}|dk r"t|j|ndqS)N)rlljust)r:rmrnr%r%r&r<s)r`AssertionErrorrKrrIappend)valsrdrowresultZdisplayr%r%r&rbs   rbcCs|j}|rddddg}nddg}g}tdd|Dr@|jdxR|D]J}|j|jg}|rr|j|j|j|jt|r|j|j|j|qFW||fS)z_ Convert the package data into something usable by output_package_listing_columns. ZPackageZVersionZLatestZTypecss|]}t|VqdS)N)r )r:r_r%r%r&r?2sz%format_for_columns..ZLocation) r1anyrrrPrEr8rMr rL)Zpkgsr-Zrunning_outdatedr[rZZprojrtr%r%r&rV%s       rVcCsZg}xJ|D]B}|jtj|jd}|jrBtj|j|d<|j|d<|j|q Wtj |S)N)rjrEr8rM) rPrZ text_typerEr1r8rMrrrdumps)r6r-rZr;rXr%r%r&rYFs  rY) Z __future__rrZloggingr/ itertoolsr ImportErrorrZ pip._vendorrZpip.basecommandrZpip.exceptionsrZ pip.indexrZ pip.utilsr r Zpip.utils.deprecationr Zpip.cmdoptionsr r Z getLoggerrfrGrrbrVrYr%r%r%r&s(       |!__pycache__/show.cpython-36.opt-1.pyc000064400000012301152357360100013320 0ustar003 Pf@sddlmZddlmZddlZddlZddlmZddlm Z m Z ddl m Z ddl mZejeZGdd d eZd d Zdd dZdS))absolute_import) FeedParserN)Command)SUCCESSERROR) pkg_resources)canonicalize_namecs4eZdZdZdZdZdZfddZddZZ S) ShowCommandz6Show information about one or more installed packages.Zshowz$ %prog [options] ...z*Show information about installed packages.cs>tt|j|||jjddddddd|jjd|jdS) Nz-fz--filesfiles store_trueFz7Show the full list of installed files for each package.)destactiondefaulthelpr)superr __init__Zcmd_optsZ add_optionparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/show.pyrszShowCommand.__init__cCs8|stjdtS|}t|}t||j|jds4tStS)Nz.ERROR: Please provide a package name or names.) list_filesverbose)loggerZwarningrsearch_packages_info print_resultsr rr)rZoptionsrqueryresultsrrrrun"s zShowCommand.run) __name__ __module__ __qualname____doc__nameZusagesummaryrr __classcell__rr)rrr s  r c#sixtjD]}|t|j<q Wdd|D}xfdd|DD]ΉjjjddjDd}d}d}ttjrވj drȈj d}dd|D}fd d|D}fd d|D}j d r܈j d }nPj d rj d }fd d|D}fdd|D}j dr.j d}j drLj d}||d<j drx,j dD]} | j rd| j |d<PqdWt } | j|| j} xdD]} | j| || <qWg} x4|jD](} | jdr| j| tddqW| |d<|rt||d<|VqFWdS)z Gather details from installed distributions. Print distribution name, version, location, and installed files. Installed files requires a pip generated 'installed-files.txt' in the distributions '.egg-info' directory. cSsg|] }t|qSr)r).0r%rrr :sz(search_packages_info..csg|]}|kr|qSrr)r(Zpkg) installedrrr)<scSsg|] }|jqSr) project_name)r(Zdeprrrr)As)r%versionlocationrequiresNZRECORDcSsg|]}|jddqS),r)split)r(lrrrr)Iscsg|]}tjjj|qSr)ospathjoinr-)r(p)distrrr)Jscsg|]}tjj|jqSr)r2r3relpathr-)r(r5)r6rrr)KsZMETADATAzinstalled-files.txtcsg|]}tjjj|qSr)r2r3r4Zegg_info)r(r5)r6rrr)Sscsg|]}tjj|jqSr)r2r3r7r-)r(r5)r6rrr)TszPKG-INFOzentry_points.txt entry_pointsZ INSTALLER installermetadata-versionr& home-pageauthor author-emaillicensez Classifier: classifiersr )r:r&r;r<r=r>)rZ working_setrr+r,r-r. isinstanceZDistInfoDistributionZ has_metadataZget_metadata_linesZ get_metadatastriprZfeedcloseget splitlines startswithappendlensorted)rr5Z query_namespackageZ file_listZmetadatalinespathsr8lineZ feed_parserZ pkg_info_dictkeyr?r)r6r*rr/s^                  rFc Csd}xt|D]\}}d}|dkr0tjdtjd|jddtjd|jd dtjd |jd dtjd |jd dtjd|jddtjd|jddtjd|jddtjd|jddtjddj|jdg|rxtjd|jddtjd|jddtjdx"|jdgD]}tjd|q0Wtjd x&|jd!gD]}tjd|jq^W|rtjd"x&|jd#gD]}tjd|jqWd#|krtjd$qW|S)%zD Print the informations from installed distributions found. FTrz---zName: %sr%z Version: %sr,z Summary: %sr&z Home-page: %sz home-pagez Author: %sr<zAuthor-email: %sz author-emailz License: %sr>z Location: %sr-z Requires: %sz, r.zMetadata-Version: %szmetadata-versionz Installer: %sr9z Classifiers:r?z %sz Entry-points:r8zFiles:r z!Cannot locate installed-files.txt) enumeraterinforCr4rA) Z distributionsrrZresults_printedir6Z classifierentryrLrrrrxs>    r)FF)Z __future__rZ email.parserrZloggingr2Zpip.basecommandrZpip.status_codesrrZ pip._vendorrZpip._vendor.packaging.utilsrZ getLoggerr!rr rrrrrrs      I__pycache__/completion.cpython-36.pyc000064400000005022152357360100013554 0ustar003 Pf @sDddlmZddlZddlmZdZddddZGd d d eZdS) )absolute_importN)CommandzJ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end z _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ PIP_AUTO_COMPLETE=1 $1 ) ) } complete -o default -F _pip_completion pip z function _pip_completion { local words cword read -Ac words read -cn cword reply=( $( COMP_WORDS="$words[*]" \ COMP_CWORD=$(( cword-1 )) \ PIP_AUTO_COMPLETE=1 $words[1] ) ) } compctl -K _pip_completion pip a function __fish_complete_pip set -lx COMP_WORDS (commandline -o) "" set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1) set -lx PIP_AUTO_COMPLETE 1 string split \ -- (eval $COMP_WORDS[1]) end complete -fa "(__fish_complete_pip)" -c pip )bashzshfishcs0eZdZdZdZdZfddZddZZS)CompletionCommandz3A helper command to be used for command completion.Z completionz-A helper command used for command completion.csltt|j|||j}|jddddddd|jdd dd dd d|jd d ddddd|jjd|dS)Nz--bashz-b store_constrshellzEmit completion code for bash)actionconstdesthelpz--zshz-zrzEmit completion code for zshz--fishz-frzEmit completion code for fishr)superr__init__cmd_optsZ add_optionparserZinsert_option_group)selfargskwr) __class__ /usr/lib/python3.6/completion.pyr-s*zCompletionCommand.__init__cCsbtj}ddt|D}|j|krHtj|jd}tt||jdntjj ddj |dS)z-Prints the completion code of the given shellcSsg|] }d|qS)z--r).0r rrr Jsz)CompletionCommand.run..)scriptr zERROR: You must pass %s z or N) COMPLETION_SCRIPTSkeyssortedr getprintBASE_COMPLETIONsysstderrwritejoin)rZoptionsrZshellsZ shell_optionsrrrrrunGs zCompletionCommand.run) __name__ __module__ __qualname____doc__nameZsummaryrr& __classcell__rr)rrr(s  r)Z __future__rr"Zpip.basecommandrr!rrrrrrs    __pycache__/uninstall.cpython-36.pyc000064400000004752152357360100013425 0ustar003 PfD @s`ddlmZddlZddlmZddlmZmZmZddl m Z ddl m Z Gddde Z dS) )absolute_importN) WheelCache)InstallRequirementRequirementSetparse_requirements)Command)InstallationErrorcs4eZdZdZdZdZdZfddZddZZ S) UninstallCommandaB Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutils packages installed with ``python setup.py install``, which leave behind no metadata to determine what files were installed. - Script wrappers installed by ``python setup.py develop``. uninstallzU %prog [options] ... %prog [options] -r ...zUninstall packages.c sVtt|j|||jjddddgddd|jjdd d d d d |jjd|jdS)Nz-rz --requirement requirementsappendfilezjUninstall all the packages listed in the given requirements file. This option can be used multiple times.)destactiondefaultmetavarhelpz-yz--yesyes store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)superr __init__Zcmd_optsZ add_optionparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/uninstall.pyrszUninstallCommand.__init__c Cs|j|}tjjtt}t|j|}tddd|j||d}x$|D]}|j t j ||j|dqFWx2|j D](}x"t ||||dD]} |j | qWqnW|jstdt|jd|j|jdWdQRXdS)N)Z build_dirZsrc_dirZ download_dirisolatedsession wheel_cache)rr )optionsrr zLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))name)Z auto_confirm)Z_build_sessionpipindexZ FormatControlsetr cache_dirrZ isolated_modeZadd_requirementrZ from_liner rZhas_requirementsrdictr"r r) rr!rrZformat_controlr Zrequirement_setr"filenameZreqrrrrun-s6     zUninstallCommand.run) __name__ __module__ __qualname____doc__r"ZusageZsummaryrr) __classcell__rr)rrr s   r )Z __future__rr#Z pip.wheelrZpip.reqrrrZpip.basecommandrZpip.exceptionsrr rrrrs    __pycache__/help.cpython-36.pyc000064400000002034152357360100012333 0ustar003 Pf@s<ddlmZddlmZmZddlmZGdddeZdS))absolute_import)CommandSUCCESS) CommandErrorc@s$eZdZdZdZdZdZddZdS) HelpCommandzShow help for commandshelpz %prog zShow help for commands.c Csddlm}m}y |d}Wntk r0tSX||krl||}d|g}|r^|jd|tdj|||}|jj tS)Nr) commands_dictget_similar_commandszunknown command "%s"zmaybe you meant "%s"z - ) Z pip.commandsrr IndexErrorrappendrjoinparserZ print_help) selfZoptionsargsrr Zcmd_nameZguessmsgZcommandr/usr/lib/python3.6/help.pyruns    zHelpCommand.runN)__name__ __module__ __qualname____doc__nameZusageZsummaryrrrrrrs rN)Z __future__rZpip.basecommandrrZpip.exceptionsrrrrrrs  __pycache__/freeze.cpython-36.opt-1.pyc000064400000005000152357360100013616 0ustar003 Pf @sdddlmZddlZddlZddlmZddlmZddlm Z ddl m Z d Z Gd d d eZ dS))absolute_importN) stdlib_pkgs)Command)freeze) WheelCachepip setuptools distributewheelcs8eZdZdZdZdZdZd ZfddZdd Z Z S) FreezeCommandzx Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. rz %prog [options]z1Output installed packages in requirements format.ext://sys.stderrc stt|j|||jjddddgddd|jjdd d dgd d d|jjd dddddd|jjdddddd|jjdddddjtd|jjd|jdS)Nz-rz --requirement requirementsappendfilez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)destactiondefaultmetavarhelpz-fz --find-links find_linksZURLzs     __pycache__/download.cpython-36.pyc000064400000012363152357360100013220 0ustar003 Pf@sddlmZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZdd lmZdd lmZejeZGd d d e ZdS) )absolute_importN) CommandError) FormatControl)RequirementSet)RequirementCommand) cmdoptions) ensure_dirnormalize_path)BuildDirectory)check_path_ownercs4eZdZdZdZdZdZfddZddZZ S) DownloadCommandaL Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. Zdownloada% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...zDownload packages.c s\tt|j|||j}|jtj|jtj|jtj|jtj |jtj |jtj |jtj |jtj |jtj|jtj|jtj|jtj|jddddddtjdd|jd d d dd d|jd d d ddd|jdddddd|jddddddtjtj|j}|jjd||jjd|dS)Nz-dz--destz--destination-dirz--destination-directory download_dirdirzDownload packages into .)destmetavardefaulthelpz --platformplatformz`Only download wheels compatible with . Defaults to the platform of the running system.z--python-versionpython_versiona&Only download wheels compatible with Python interpreter version . If not specified, then the current system interpreter minor version is used. A major version (e.g. '2') can be specified to match all minor revs of that major version. A minor version (e.g. '34') can also be specified.z--implementationimplementationzOnly download wheels compatible with Python implementation , e.g. 'pp', 'jy', 'cp', or 'ip'. If not specified, then the current interpreter implementation is used. Use 'py' to force implementation-agnostic wheels.z--abiabizOnly download wheels compatible with Python abi , e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Generally you will need to specify --implementation, --platform, and --python-version when using this option.r)superr __init__cmd_optsZ add_optionrZ constraintsZeditableZ requirements build_dirZno_depsZglobal_optionsZ no_binaryZ only_binarysrcZpreno_cleanrequire_hashesoscurdirZmake_option_groupZnon_deprecated_index_groupparserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/download.pyr*sbzDownloadCommand.__init__c Csd|_|jr|jg}nd}t|j|j|j|jg}tttdg}|rZ|j|krZt dt j j |j |_ t|j|_t|j|j|}|j|||j||j|jd}|jp|j }|jrt|j rtjd|jd|_t|j|d} t| |j |jd|j||j|jd} |j| |||||jd| j s2dS| j!|dj"d d | j#D} | rdtj$d | |jst| j%WdQRXWdQRX| S) NTz:all:z--only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:) when restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation.)optionssessionrpython_versionsrrzThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.)delete)rsrc_dirr ignore_installedignore_dependenciesr(isolatedr cSsg|] }|jqSr%)name).0Zreqr%r%r& sz'DownloadCommand.run..zSuccessfully downloaded %s)&r,ranyrrrrsetZformat_controlrrpathabspathr+r r rZ_build_sessionZ_build_package_finderrr cache_dirr loggerZwarningr rr-Z isolated_moderZpopulate_requirement_setr0Zhas_requirementsZ prepare_filesjoinZsuccessfully_downloadedinfoZ cleanup_files) r!r'r"r)Zdist_restriction_setZ binary_onlyr(finderZ build_deleterZrequirement_setZ downloadedr%r%r&run{sx         zDownloadCommand.run) __name__ __module__ __qualname____doc__r0ZusageZsummaryrr< __classcell__r%r%)r$r&r s   Qr )Z __future__rZloggingrZpip.exceptionsrZ pip.indexrZpip.reqrZpip.basecommandrZpiprZ pip.utilsrr Zpip.utils.buildr Zpip.utils.filesystemr Z getLoggerr=r8r r%r%r%r&s         __pycache__/check.cpython-36.opt-1.pyc000064400000002337152357360100013425 0ustar003 Pff@sJddlZddlmZddlmZddlmZejeZ GdddeZ dS)N)Command)check_requirements)get_installed_distributionsc@s$eZdZdZdZdZdZddZdS) CheckCommandz7Verify installed packages have compatible dependencies.Zcheckz %prog [options]c Cstdfd}t|\}}x~|D]v}d|j|jf}x*|j|gD]}tjd|j|j|jq@Wx4|j|gD]$\}} tjd|j|j|| j| jqlWqW|s|rdStjddS)NF)Z local_onlyskipz%s==%sz*%s %s requires %s, which is not installed.z-%s %s has requirement %s, but you have %s %s.zNo broken requirements found.)rrZ project_nameversiongetloggerinfo) selfZoptionsargsZdistsZmissing_reqs_dictZincompatible_reqs_dictZdistkeyZ requirementactualr/usr/lib/python3.6/check.pyruns     zCheckCommand.runN)__name__ __module__ __qualname____doc__nameZusageZsummaryrrrrrr s r) ZloggingZpip.basecommandrZpip.operations.checkrZ pip.utilsrZ getLoggerrr rrrrrs     __pycache__/download.cpython-36.opt-1.pyc000064400000012363152357360100014157 0ustar003 Pf@sddlmZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZdd lmZdd lmZejeZGd d d e ZdS) )absolute_importN) CommandError) FormatControl)RequirementSet)RequirementCommand) cmdoptions) ensure_dirnormalize_path)BuildDirectory)check_path_ownercs4eZdZdZdZdZdZfddZddZZ S) DownloadCommandaL Download packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports downloading from "requirements files", which provide an easy way to specify a whole environment to be downloaded. Zdownloada% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...zDownload packages.c s\tt|j|||j}|jtj|jtj|jtj|jtj |jtj |jtj |jtj |jtj |jtj|jtj|jtj|jtj|jddddddtjdd|jd d d dd d|jd d d ddd|jdddddd|jddddddtjtj|j}|jjd||jjd|dS)Nz-dz--destz--destination-dirz--destination-directory download_dirdirzDownload packages into .)destmetavardefaulthelpz --platformplatformz`Only download wheels compatible with . Defaults to the platform of the running system.z--python-versionpython_versiona&Only download wheels compatible with Python interpreter version . If not specified, then the current system interpreter minor version is used. A major version (e.g. '2') can be specified to match all minor revs of that major version. A minor version (e.g. '34') can also be specified.z--implementationimplementationzOnly download wheels compatible with Python implementation , e.g. 'pp', 'jy', 'cp', or 'ip'. If not specified, then the current interpreter implementation is used. Use 'py' to force implementation-agnostic wheels.z--abiabizOnly download wheels compatible with Python abi , e.g. 'pypy_41'. If not specified, then the current interpreter abi tag is used. Generally you will need to specify --implementation, --platform, and --python-version when using this option.r)superr __init__cmd_optsZ add_optionrZ constraintsZeditableZ requirements build_dirZno_depsZglobal_optionsZ no_binaryZ only_binarysrcZpreno_cleanrequire_hashesoscurdirZmake_option_groupZnon_deprecated_index_groupparserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/download.pyr*sbzDownloadCommand.__init__c Csd|_|jr|jg}nd}t|j|j|j|jg}tttdg}|rZ|j|krZt dt j j |j |_ t|j|_t|j|j|}|j|||j||j|jd}|jp|j }|jrt|j rtjd|jd|_t|j|d} t| |j |jd|j||j|jd} |j| |||||jd| j s2dS| j!|dj"d d | j#D} | rdtj$d | |jst| j%WdQRXWdQRX| S) NTz:all:z--only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:) when restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation.)optionssessionrpython_versionsrrzThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.)delete)rsrc_dirr ignore_installedignore_dependenciesr(isolatedr cSsg|] }|jqSr%)name).0Zreqr%r%r& sz'DownloadCommand.run..zSuccessfully downloaded %s)&r,ranyrrrrsetZformat_controlrrpathabspathr+r r rZ_build_sessionZ_build_package_finderrr cache_dirr loggerZwarningr rr-Z isolated_moderZpopulate_requirement_setr0Zhas_requirementsZ prepare_filesjoinZsuccessfully_downloadedinfoZ cleanup_files) r!r'r"r)Zdist_restriction_setZ binary_onlyr(finderZ build_deleterZrequirement_setZ downloadedr%r%r&run{sx         zDownloadCommand.run) __name__ __module__ __qualname____doc__r0ZusageZsummaryrr< __classcell__r%r%)r$r&r s   Qr )Z __future__rZloggingrZpip.exceptionsrZ pip.indexrZpip.reqrZpip.basecommandrZpiprZ pip.utilsrr Zpip.utils.buildr Zpip.utils.filesystemr Z getLoggerr=r8r r%r%r%r&s         __pycache__/check.cpython-36.pyc000064400000002337152357360100012466 0ustar003 Pff@sJddlZddlmZddlmZddlmZejeZ GdddeZ dS)N)Command)check_requirements)get_installed_distributionsc@s$eZdZdZdZdZdZddZdS) CheckCommandz7Verify installed packages have compatible dependencies.Zcheckz %prog [options]c Cstdfd}t|\}}x~|D]v}d|j|jf}x*|j|gD]}tjd|j|j|jq@Wx4|j|gD]$\}} tjd|j|j|| j| jqlWqW|s|rdStjddS)NF)Z local_onlyskipz%s==%sz*%s %s requires %s, which is not installed.z-%s %s has requirement %s, but you have %s %s.zNo broken requirements found.)rrZ project_nameversiongetloggerinfo) selfZoptionsargsZdistsZmissing_reqs_dictZincompatible_reqs_dictZdistkeyZ requirementactualr/usr/lib/python3.6/check.pyruns     zCheckCommand.runN)__name__ __module__ __qualname____doc__nameZusageZsummaryrrrrrr s r) ZloggingZpip.basecommandrZpip.operations.checkrZ pip.utilsrZ getLoggerrr rrrrrs     __pycache__/__init__.cpython-36.pyc000064400000003726152357360100013153 0ustar003 Pf@s&dZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZejeejee je e je ejeejeejeejeejeejeejeejei Zeeeeeeeeee ee g ZdddZddZddZ dS)z% Package containing all pip commands )absolute_import)CompletionCommand)DownloadCommand) FreezeCommand) HashCommand) HelpCommand) ListCommand) CheckCommand) SearchCommand) ShowCommand)InstallCommand)UninstallCommand) WheelCommandTccs:|rttt}ntj}x|D]\}}||jfVqWdS)z5Yields sorted (command name, command summary) tuples.N)_sort_commands commands_dictcommands_orderitemsZsummary)ZorderedZcmditemsnameZ command_classr/usr/lib/python3.6/__init__.py get_summaries4s  rcCs6ddlm}|j}||tj}|r.|dSdSdS)zCommand name auto-correct.r)get_close_matchesFN)Zdifflibrlowerrkeys)rrZclose_commandsrrrget_similar_commands@s  rcsfdd}t|j|dS)Nc s(yj|dStk r"dSXdS)N)index ValueError)key)orderrrkeyfnOsz_sort_commands..keyfn)r)sortedr)Zcmddictr r!r)r rrNs rN)T)!__doc__Z __future__rZpip.commands.completionrZpip.commands.downloadrZpip.commands.freezerZpip.commands.hashrZpip.commands.helprZpip.commands.listrZpip.commands.checkr Zpip.commands.searchr Zpip.commands.showr Zpip.commands.installr Zpip.commands.uninstallr Zpip.commands.wheelrrrrrrrrrrrsP               __pycache__/hash.cpython-36.pyc000064400000003555152357360100012337 0ustar003 Pf=@s~ddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z m Z ejeZGdddeZd d ZdS) )absolute_importN)Command)ERROR) read_chunks) FAVORITE_HASH STRONG_HASHEScs4eZdZdZdZdZdZfddZddZZ S) HashCommandz Compute a hash of a local package archive. These can be used with --hash in a requirements file to do repeatable installs. hashz%prog [options] ...z#Compute hashes of package archives.c sJtt|j|||jjdddtdtddjtd|jj d|jdS) Nz-az --algorithm algorithmZstorez$The hash algorithm to use: one of %sz, )destchoicesactiondefaulthelpr) superr__init__Zcmd_optsZ add_optionrrjoinparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/hash.pyrszHashCommand.__init__cCsD|s|jjtjtS|j}x"|D]}tjd||t||q"WdS)Nz%s: --hash=%s:%s) rZ print_usagesysstderrrr loggerinfo _hash_of_file)rZoptionsrr pathrrrrun(s zHashCommand.run) __name__ __module__ __qualname____doc__nameZusageZsummaryrr __classcell__rr)rrrs  rc CsDt|d,}tj|}xt|D]}|j|q WWdQRX|jS)z!Return the hash digest of a file.rbN)openhashlibnewrupdateZ hexdigest)rr archiver chunkrrrr3s   r)Z __future__rr)ZloggingrZpip.basecommandrZpip.status_codesrZ pip.utilsrZpip.utils.hashesrrZ getLoggerr!rrrrrrrs     #__pycache__/search.cpython-36.opt-1.pyc000064400000010056152357360100013612 0ustar003 Pf@sddlmZddlZddlZddlZddlmZmZddlm Z ddl m Z ddl m Z ddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZejeZGdddeZ ddZ!dddZ"ddZ#dS))absolute_importN)CommandSUCCESS) OrderedDict)PipXmlrpcTransport)PyPI)get_terminal_size) indent_log) CommandError)NO_MATCHES_FOUND)parse) pkg_resources) xmlrpc_clientcs<eZdZdZdZdZdZfddZddZd d Z Z S) SearchCommandz@Search for PyPI packages whose name or summary contains .searchz %prog [options] zSearch PyPI for packages.cs@tt|j|||jjddddtjdd|jjd|jdS)Nz-iz--indexindexZURLz3Base URL of Python Package Index (default %default))destmetavardefaulthelpr) superr__init__Zcmd_optsZ add_optionrZpypi_urlparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/search.pyrszSearchCommand.__init__cCsT|s td|}|j||}t|}d}tjjrt k rJYq>Xq>WdS)NcSs.g|]&}t|dt|jddgdqS)r)r2-)lenget).0r8rrr csz!print_results..cSsg|] }|jqSr)Z project_name)r>prrrr?gsr)r*r2r9r:   z %-*s - %sz%s (%s)zINSTALLED: %s (latest)z INSTALLED: %sz LATEST: %sr;)maxr Z working_setr=textwrapZwrapjoinloggerinfoZget_distributionr r5r1UnicodeEncodeError) r'Zname_column_widthrZinstalled_packagesr8r)r*r1Z target_widthlineZdistZlatestrrrr$^s>        r$cCs t|tdS)N)key)rH parse_version)r2rrrr5sr5)NN)$Z __future__rZloggingr!rIZpip.basecommandrrZ pip.compatrZ pip.downloadrZ pip.modelsrZ pip.utilsrZpip.utils.loggingr Zpip.exceptionsr Zpip.status_codesr Zpip._vendor.packaging.versionr rPZ pip._vendorr Zpip._vendor.six.movesrZ getLoggerr,rKrr r$r5rrrrs&            + &__pycache__/show.cpython-36.pyc000064400000012301152357360100012361 0ustar003 Pf@sddlmZddlmZddlZddlZddlmZddlm Z m Z ddl m Z ddl mZejeZGdd d eZd d Zdd dZdS))absolute_import) FeedParserN)Command)SUCCESSERROR) pkg_resources)canonicalize_namecs4eZdZdZdZdZdZfddZddZZ S) ShowCommandz6Show information about one or more installed packages.Zshowz$ %prog [options] ...z*Show information about installed packages.cs>tt|j|||jjddddddd|jjd|jdS) Nz-fz--filesfiles store_trueFz7Show the full list of installed files for each package.)destactiondefaulthelpr)superr __init__Zcmd_optsZ add_optionparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/show.pyrszShowCommand.__init__cCs8|stjdtS|}t|}t||j|jds4tStS)Nz.ERROR: Please provide a package name or names.) list_filesverbose)loggerZwarningrsearch_packages_info print_resultsr rr)rZoptionsrqueryresultsrrrrun"s zShowCommand.run) __name__ __module__ __qualname____doc__nameZusagesummaryrr __classcell__rr)rrr s  r c#sixtjD]}|t|j<q Wdd|D}xfdd|DD]ΉjjjddjDd}d}d}ttjrވj drȈj d}dd|D}fd d|D}fd d|D}j d r܈j d }nPj d rj d }fd d|D}fdd|D}j dr.j d}j drLj d}||d<j drx,j dD]} | j rd| j |d<PqdWt } | j|| j} xdD]} | j| || <qWg} x4|jD](} | jdr| j| tddqW| |d<|rt||d<|VqFWdS)z Gather details from installed distributions. Print distribution name, version, location, and installed files. Installed files requires a pip generated 'installed-files.txt' in the distributions '.egg-info' directory. cSsg|] }t|qSr)r).0r%rrr :sz(search_packages_info..csg|]}|kr|qSrr)r(Zpkg) installedrrr)<scSsg|] }|jqSr) project_name)r(Zdeprrrr)As)r%versionlocationrequiresNZRECORDcSsg|]}|jddqS),r)split)r(lrrrr)Iscsg|]}tjjj|qSr)ospathjoinr-)r(p)distrrr)Jscsg|]}tjj|jqSr)r2r3relpathr-)r(r5)r6rrr)KsZMETADATAzinstalled-files.txtcsg|]}tjjj|qSr)r2r3r4Zegg_info)r(r5)r6rrr)Sscsg|]}tjj|jqSr)r2r3r7r-)r(r5)r6rrr)TszPKG-INFOzentry_points.txt entry_pointsZ INSTALLER installermetadata-versionr& home-pageauthor author-emaillicensez Classifier: classifiersr )r:r&r;r<r=r>)rZ working_setrr+r,r-r. isinstanceZDistInfoDistributionZ has_metadataZget_metadata_linesZ get_metadatastriprZfeedcloseget splitlines startswithappendlensorted)rr5Z query_namespackageZ file_listZmetadatalinespathsr8lineZ feed_parserZ pkg_info_dictkeyr?r)r6r*rr/s^                  rFc Csd}xt|D]\}}d}|dkr0tjdtjd|jddtjd|jd dtjd |jd dtjd |jd dtjd|jddtjd|jddtjd|jddtjd|jddtjddj|jdg|rxtjd|jddtjd|jddtjdx"|jdgD]}tjd|q0Wtjd x&|jd!gD]}tjd|jq^W|rtjd"x&|jd#gD]}tjd|jqWd#|krtjd$qW|S)%zD Print the informations from installed distributions found. FTrz---zName: %sr%z Version: %sr,z Summary: %sr&z Home-page: %sz home-pagez Author: %sr<zAuthor-email: %sz author-emailz License: %sr>z Location: %sr-z Requires: %sz, r.zMetadata-Version: %szmetadata-versionz Installer: %sr9z Classifiers:r?z %sz Entry-points:r8zFiles:r z!Cannot locate installed-files.txt) enumeraterinforCr4rA) Z distributionsrrZresults_printedir6Z classifierentryrLrrrrxs>    r)FF)Z __future__rZ email.parserrZloggingr2Zpip.basecommandrZpip.status_codesrrZ pip._vendorrZpip._vendor.packaging.utilsrZ getLoggerr!rr rrrrrrs      I__pycache__/__init__.cpython-36.opt-1.pyc000064400000003726152357360100014112 0ustar003 Pf@s&dZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZejeejee je e je ejeejeejeejeejeejeejeejei Zeeeeeeeeee ee g ZdddZddZddZ dS)z% Package containing all pip commands )absolute_import)CompletionCommand)DownloadCommand) FreezeCommand) HashCommand) HelpCommand) ListCommand) CheckCommand) SearchCommand) ShowCommand)InstallCommand)UninstallCommand) WheelCommandTccs:|rttt}ntj}x|D]\}}||jfVqWdS)z5Yields sorted (command name, command summary) tuples.N)_sort_commands commands_dictcommands_orderitemsZsummary)ZorderedZcmditemsnameZ command_classr/usr/lib/python3.6/__init__.py get_summaries4s  rcCs6ddlm}|j}||tj}|r.|dSdSdS)zCommand name auto-correct.r)get_close_matchesFN)Zdifflibrlowerrkeys)rrZclose_commandsrrrget_similar_commands@s  rcsfdd}t|j|dS)Nc s(yj|dStk r"dSXdS)N)index ValueError)key)orderrrkeyfnOsz_sort_commands..keyfn)r)sortedr)Zcmddictr r!r)r rrNs rN)T)!__doc__Z __future__rZpip.commands.completionrZpip.commands.downloadrZpip.commands.freezerZpip.commands.hashrZpip.commands.helprZpip.commands.listrZpip.commands.checkr Zpip.commands.searchr Zpip.commands.showr Zpip.commands.installr Zpip.commands.uninstallr Zpip.commands.wheelrrrrrrrrrrrsP               __pycache__/wheel.cpython-36.opt-1.pyc000064400000012430152357360100013447 0ustar003 Pf1@sddlmZddlZddlZddlZddlmZddlmZm Z ddl m Z ddl m Z ddlmZddlmZdd lmZmZdd lmZejeZGd d d eZdS) )absolute_importN)RequirementCommand) CommandErrorPreviousBuildDirError)RequirementSet)import_or_raise)BuildDirectory)RemovedInPip10Warning) WheelCache WheelBuilder) cmdoptionscs<eZdZdZdZdZdZfddZddZd d Z Z S) WheelCommanda Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. Zwheelz %prog [options] ... %prog [options] -r ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...z$Build wheels from your requirements.csPtt|j|||j}|jddddtjdd|jtj|jtj |jtj |jtj |jddd d d d |jtj |jtj |jtj|jtj|jtj|jtj|jtj|jd dd d dd|jddddd|jtj|jtjtjtj|j}|jjd||jjd|dS)Nz-wz --wheel-dir wheel_dirdirzLBuild wheels into , where the default is the current working directory.)destmetavardefaulthelpz--build-option build_optionsoptionsappendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)rractionrz--global-optionglobal_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.)rrrrz--pre store_trueFzYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)superr __init__cmd_optsZ add_optionoscurdirr Z use_wheelZ no_use_wheelZ no_binaryZ only_binaryZ constraintsZeditableZ requirementssrcignore_requires_pythonZno_deps build_dirno_cleanrequire_hashesZmake_option_groupZ index_groupparserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/wheel.pyr.sVzWheelCommand.__init__cCs.tdtdtdtd}t|ds*tddS)Nzwheel.bdist_wheelzM'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheel pkg_resourceszp'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolsZDistInfoDistribution)rrhasattr)r%r+r)r)r*check_required_packageshs z$WheelCommand.check_required_packagesc Cs|jtj|tj||jr.tjdt|jr@tjdt|j rRtjdt|j g|j }|j r|t jddj|g}|jrtjj|j|_tjj|j|_|j|}|j||}|jp|j }t|j|j}t|j|d}t||jd|jd|j|j|||j |j!d } |j"| |||||j#|| j$s6dSzZy6t%| ||j&pJg|j'pTgd } | j(slt)d Wnt*k rd|_YnXWd|js| j+XWdQRXWdQRXdS) Nz--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zIgnoring indexes: %s,)deleteT) r!src_dirZ download_dirignore_dependenciesZignore_installedr isolatedsession wheel_cacheZwheel_download_dirr#)rrz"Failed to build one or more wheels),r-r Zresolve_wheel_no_use_binaryZcheck_install_build_globalZallow_externalwarningswarnr Zallow_all_externalZallow_unverifiedZ index_urlZextra_index_urlsZno_indexloggerdebugjoinr!rpathabspathr0Z_build_sessionZ_build_package_finderr"r cache_dirZformat_controlrrr1r Z isolated_moderr#Zpopulate_requirement_setnameZhas_requirementsr rrZbuildrrZ cleanup_files) r%rr&Z index_urlsr3finderZ build_deleter4r!Zrequirement_setwbr)r)r*run|sv         zWheelCommand.run) __name__ __module__ __qualname____doc__r=ZusageZsummaryrr-r@ __classcell__r)r))r(r*r s  :r )Z __future__rZloggingrr5Zpip.basecommandrZpip.exceptionsrrZpip.reqrZ pip.utilsrZpip.utils.buildrZpip.utils.deprecationr Z pip.wheelr r Zpipr Z getLoggerrAr7r r)r)r)r*s        __pycache__/hash.cpython-36.opt-1.pyc000064400000003555152357360100013276 0ustar003 Pf=@s~ddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z m Z ejeZGdddeZd d ZdS) )absolute_importN)Command)ERROR) read_chunks) FAVORITE_HASH STRONG_HASHEScs4eZdZdZdZdZdZfddZddZZ S) HashCommandz Compute a hash of a local package archive. These can be used with --hash in a requirements file to do repeatable installs. hashz%prog [options] ...z#Compute hashes of package archives.c sJtt|j|||jjdddtdtddjtd|jj d|jdS) Nz-az --algorithm algorithmZstorez$The hash algorithm to use: one of %sz, )destchoicesactiondefaulthelpr) superr__init__Zcmd_optsZ add_optionrrjoinparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/hash.pyrszHashCommand.__init__cCsD|s|jjtjtS|j}x"|D]}tjd||t||q"WdS)Nz%s: --hash=%s:%s) rZ print_usagesysstderrrr loggerinfo _hash_of_file)rZoptionsrr pathrrrrun(s zHashCommand.run) __name__ __module__ __qualname____doc__nameZusageZsummaryrr __classcell__rr)rrrs  rc CsDt|d,}tj|}xt|D]}|j|q WWdQRX|jS)z!Return the hash digest of a file.rbN)openhashlibnewrupdateZ hexdigest)rr archiver chunkrrrr3s   r)Z __future__rr)ZloggingrZpip.basecommandrZpip.status_codesrZ pip.utilsrZpip.utils.hashesrrZ getLoggerr!rrrrrrrs     #__pycache__/wheel.cpython-36.pyc000064400000012430152357360100012510 0ustar003 Pf1@sddlmZddlZddlZddlZddlmZddlmZm Z ddl m Z ddl m Z ddlmZddlmZdd lmZmZdd lmZejeZGd d d eZdS) )absolute_importN)RequirementCommand) CommandErrorPreviousBuildDirError)RequirementSet)import_or_raise)BuildDirectory)RemovedInPip10Warning) WheelCache WheelBuilder) cmdoptionscs<eZdZdZdZdZdZfddZddZd d Z Z S) WheelCommanda Build Wheel archives for your requirements and dependencies. Wheel is a built-package format, and offers the advantage of not recompiling your software during every install. For more details, see the wheel docs: https://wheel.readthedocs.io/en/latest/ Requirements: setuptools>=0.8, and wheel. 'pip wheel' uses the bdist_wheel setuptools extension from the wheel package to build individual wheels. Zwheelz %prog [options] ... %prog [options] -r ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...z$Build wheels from your requirements.csPtt|j|||j}|jddddtjdd|jtj|jtj |jtj |jtj |jddd d d d |jtj |jtj |jtj|jtj|jtj|jtj|jtj|jd dd d dd|jddddd|jtj|jtjtjtj|j}|jjd||jjd|dS)Nz-wz --wheel-dir wheel_dirdirzLBuild wheels into , where the default is the current working directory.)destmetavardefaulthelpz--build-option build_optionsoptionsappendz9Extra arguments to be supplied to 'setup.py bdist_wheel'.)rractionrz--global-optionglobal_optionszZExtra global options to be supplied to the setup.py call before the 'bdist_wheel' command.)rrrrz--pre store_trueFzYInclude pre-release and development versions. By default, pip only finds stable versions.)rrrr)superr __init__cmd_optsZ add_optionoscurdirr Z use_wheelZ no_use_wheelZ no_binaryZ only_binaryZ constraintsZeditableZ requirementssrcignore_requires_pythonZno_deps build_dirno_cleanrequire_hashesZmake_option_groupZ index_groupparserZinsert_option_group)selfargskwrZ index_opts) __class__/usr/lib/python3.6/wheel.pyr.sVzWheelCommand.__init__cCs.tdtdtdtd}t|ds*tddS)Nzwheel.bdist_wheelzM'pip wheel' requires the 'wheel' package. To fix this, run: pip install wheel pkg_resourceszp'pip wheel' requires setuptools >= 0.8 for dist-info support. To fix this, run: pip install --upgrade setuptoolsZDistInfoDistribution)rrhasattr)r%r+r)r)r*check_required_packageshs z$WheelCommand.check_required_packagesc Cs|jtj|tj||jr.tjdt|jr@tjdt|j rRtjdt|j g|j }|j r|t jddj|g}|jrtjj|j|_tjj|j|_|j|}|j||}|jp|j }t|j|j}t|j|d}t||jd|jd|j|j|||j |j!d } |j"| |||||j#|| j$s6dSzZy6t%| ||j&pJg|j'pTgd } | j(slt)d Wnt*k rd|_YnXWd|js| j+XWdQRXWdQRXdS) Nz--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zIgnoring indexes: %s,)deleteT) r!src_dirZ download_dirignore_dependenciesZignore_installedr isolatedsession wheel_cacheZwheel_download_dirr#)rrz"Failed to build one or more wheels),r-r Zresolve_wheel_no_use_binaryZcheck_install_build_globalZallow_externalwarningswarnr Zallow_all_externalZallow_unverifiedZ index_urlZextra_index_urlsZno_indexloggerdebugjoinr!rpathabspathr0Z_build_sessionZ_build_package_finderr"r cache_dirZformat_controlrrr1r Z isolated_moderr#Zpopulate_requirement_setnameZhas_requirementsr rrZbuildrrZ cleanup_files) r%rr&Z index_urlsr3finderZ build_deleter4r!Zrequirement_setwbr)r)r*run|sv         zWheelCommand.run) __name__ __module__ __qualname____doc__r=ZusageZsummaryrr-r@ __classcell__r)r))r(r*r s  :r )Z __future__rZloggingrr5Zpip.basecommandrZpip.exceptionsrrZpip.reqrZ pip.utilsrZpip.utils.buildrZpip.utils.deprecationr Z pip.wheelr r Zpipr Z getLoggerrAr7r r)r)r)r*s        __pycache__/completion.cpython-36.opt-1.pyc000064400000005022152357360100014513 0ustar003 Pf @sDddlmZddlZddlmZdZddddZGd d d eZdS) )absolute_importN)CommandzJ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end z _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ PIP_AUTO_COMPLETE=1 $1 ) ) } complete -o default -F _pip_completion pip z function _pip_completion { local words cword read -Ac words read -cn cword reply=( $( COMP_WORDS="$words[*]" \ COMP_CWORD=$(( cword-1 )) \ PIP_AUTO_COMPLETE=1 $words[1] ) ) } compctl -K _pip_completion pip a function __fish_complete_pip set -lx COMP_WORDS (commandline -o) "" set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1) set -lx PIP_AUTO_COMPLETE 1 string split \ -- (eval $COMP_WORDS[1]) end complete -fa "(__fish_complete_pip)" -c pip )bashzshfishcs0eZdZdZdZdZfddZddZZS)CompletionCommandz3A helper command to be used for command completion.Z completionz-A helper command used for command completion.csltt|j|||j}|jddddddd|jdd dd dd d|jd d ddddd|jjd|dS)Nz--bashz-b store_constrshellzEmit completion code for bash)actionconstdesthelpz--zshz-zrzEmit completion code for zshz--fishz-frzEmit completion code for fishr)superr__init__cmd_optsZ add_optionparserZinsert_option_group)selfargskwr) __class__ /usr/lib/python3.6/completion.pyr-s*zCompletionCommand.__init__cCsbtj}ddt|D}|j|krHtj|jd}tt||jdntjj ddj |dS)z-Prints the completion code of the given shellcSsg|] }d|qS)z--r).0r rrr Jsz)CompletionCommand.run..)scriptr zERROR: You must pass %s z or N) COMPLETION_SCRIPTSkeyssortedr getprintBASE_COMPLETIONsysstderrwritejoin)rZoptionsrZshellsZ shell_optionsrrrrrunGs zCompletionCommand.run) __name__ __module__ __qualname____doc__nameZsummaryrr& __classcell__rr)rrr(s  r)Z __future__rr"Zpip.basecommandrr!rrrrrrs    __pycache__/search.cpython-36.pyc000064400000010056152357360100012653 0ustar003 Pf@sddlmZddlZddlZddlZddlmZmZddlm Z ddl m Z ddl m Z ddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZejeZGdddeZ ddZ!dddZ"ddZ#dS))absolute_importN)CommandSUCCESS) OrderedDict)PipXmlrpcTransport)PyPI)get_terminal_size) indent_log) CommandError)NO_MATCHES_FOUND)parse) pkg_resources) xmlrpc_clientcs<eZdZdZdZdZdZfddZddZd d Z Z S) SearchCommandz@Search for PyPI packages whose name or summary contains .searchz %prog [options] zSearch PyPI for packages.cs@tt|j|||jjddddtjdd|jjd|jdS)Nz-iz--indexindexZURLz3Base URL of Python Package Index (default %default))destmetavardefaulthelpr) superr__init__Zcmd_optsZ add_optionrZpypi_urlparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/search.pyrszSearchCommand.__init__cCsT|s td|}|j||}t|}d}tjjrt k rJYq>Xq>WdS)NcSs.g|]&}t|dt|jddgdqS)r)r2-)lenget).0r8rrr csz!print_results..cSsg|] }|jqSr)Z project_name)r>prrrr?gsr)r*r2r9r:   z %-*s - %sz%s (%s)zINSTALLED: %s (latest)z INSTALLED: %sz LATEST: %sr;)maxr Z working_setr=textwrapZwrapjoinloggerinfoZget_distributionr r5r1UnicodeEncodeError) r'Zname_column_widthrZinstalled_packagesr8r)r*r1Z target_widthlineZdistZlatestrrrr$^s>        r$cCs t|tdS)N)key)rH parse_version)r2rrrr5sr5)NN)$Z __future__rZloggingr!rIZpip.basecommandrrZ pip.compatrZ pip.downloadrZ pip.modelsrZ pip.utilsrZpip.utils.loggingr Zpip.exceptionsr Zpip.status_codesr Zpip._vendor.packaging.versionr rPZ pip._vendorr Zpip._vendor.six.movesrZ getLoggerr,rKrr r$r5rrrrs&            + &__pycache__/uninstall.cpython-36.opt-1.pyc000064400000004752152357360100014364 0ustar003 PfD @s`ddlmZddlZddlmZddlmZmZmZddl m Z ddl m Z Gddde Z dS) )absolute_importN) WheelCache)InstallRequirementRequirementSetparse_requirements)Command)InstallationErrorcs4eZdZdZdZdZdZfddZddZZ S) UninstallCommandaB Uninstall packages. pip is able to uninstall most installed packages. Known exceptions are: - Pure distutils packages installed with ``python setup.py install``, which leave behind no metadata to determine what files were installed. - Script wrappers installed by ``python setup.py develop``. uninstallzU %prog [options] ... %prog [options] -r ...zUninstall packages.c sVtt|j|||jjddddgddd|jjdd d d d d |jjd|jdS)Nz-rz --requirement requirementsappendfilezjUninstall all the packages listed in the given requirements file. This option can be used multiple times.)destactiondefaultmetavarhelpz-yz--yesyes store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)superr __init__Zcmd_optsZ add_optionparserZinsert_option_group)selfargskw) __class__/usr/lib/python3.6/uninstall.pyrszUninstallCommand.__init__c Cs|j|}tjjtt}t|j|}tddd|j||d}x$|D]}|j t j ||j|dqFWx2|j D](}x"t ||||dD]} |j | qWqnW|jstdt|jd|j|jdWdQRXdS)N)Z build_dirZsrc_dirZ download_dirisolatedsession wheel_cache)rr )optionsrr zLYou must give at least one requirement to %(name)s (see "pip help %(name)s"))name)Z auto_confirm)Z_build_sessionpipindexZ FormatControlsetr cache_dirrZ isolated_modeZadd_requirementrZ from_liner rZhas_requirementsrdictr"r r) rr!rrZformat_controlr Zrequirement_setr"filenameZreqrrrrun-s6     zUninstallCommand.run) __name__ __module__ __qualname____doc__r"ZusageZsummaryrr) __classcell__rr)rrr s   r )Z __future__rr#Z pip.wheelrZpip.reqrrrZpip.basecommandrZpip.exceptionsrr rrrrs    __pycache__/install.cpython-36.pyc000064400000024302152357360100013053 0ustar003 PfqG @s(ddlmZddlZddlZddlZddlZddlZddlZddlZddlm Z y ddl Z Wne k rtdZ YnXddl m Z ddlmZddlmZmZddlmZmZmZddlmZdd lmZmZdd lmZdd lmZdd l m!Z!dd l"m#Z#m$Z$ej%e&Z'GdddeZ(ddZ)dS))absolute_importN)path)RequirementSet)RequirementCommand)virtualenv_no_globaldistutils_scheme)InstallationError CommandErrorPreviousBuildDirError) cmdoptions) ensure_dirget_installed_version)BuildDirectory)RemovedInPip10Warning)check_path_owner) WheelCache WheelBuildercs4eZdZdZdZdZdZfddZddZZ S) InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. installa% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...zInstall packages.c s0tt|j|||j}|jtj|jtj|jtj|jtj |jddddddd|jddd d d ddd d|jtj |jd ddddd|jdddddgdd|jddddd|jdddddd|jtj |jtj |jtj |jtj|jd d!dd"d|jd#d$dd%d|jd&d'ddd(d|jd)d*d+dd,d|jd-d.ddd/d|jd0dd1d2d3d4|jd5d6d1d7d8|jtj|jtj|jtj|jtj|jtj|jtj|jtjtjtj|j}|jjd9||jjd9|dS):Nz-tz--target target_dirdirzInstall packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)destmetavardefaulthelpz-dz --downloadz--download-dirz--download-directory download_dirz`Download packages into instead of installing them, regardless of what's already installed.z-Uz --upgradeupgrade store_truezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.)ractionrz--upgrade-strategyupgrade_strategyZeagerzonly-if-neededa3Determines how dependency upgrading should be handled. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)rrchoicesrz--force-reinstallforce_reinstallzKWhen upgrading, reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedz5Ignore the installed packages (reinstalling instead).z--user use_user_sitezInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)z--eggas_eggzInstall packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)z--root root_pathz=Install everything relative to this alternate root directory.z--strip-file-prefixstrip_file_prefixprefixz5Strip given prefix from script paths in wheel RECORD.z--prefix prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz --compilecompileTzCompile py files to pyc)rrrrz --no-compileZ store_falsezDo not compile py files to pyc)rrrr)superr__init__cmd_optsZ add_optionr Z constraintsZeditableZ requirements build_dirsrcignore_requires_pythonZno_depsinstall_optionsglobal_optionsZ use_wheelZ no_use_wheelZ no_binaryZ only_binaryZpreno_cleanrequire_hashesZmake_option_groupZ index_groupparserZinsert_option_group)selfargskwr,Z index_opts) __class__/usr/lib/python3.6/install.pyr+8szInstallCommand.__init__c&Cstj|tj|dd}tjdkrJ| rJtjdtjt j d|j r\t j dt|jrnt j dt|jrt j dt|jrt j dt|jrt j d td |_|jrtjj|j|_tjj|j|_|jpg}|jr|jrtd trtd |jd |jdd}|jrtd |_tj }tjj|j|_tjj!|jrftjj"|j rftd|jd||j#p~g}|j$|T}|j%||}|j&p|j } t'|j(|j)} |j(rt*|j( rtjd|j(d|_(t+|j| d} t,| |j|j|j-|j.|j |j|j/|j0|j1|j|||j2|j3| |j4d} |j5| |||||j6| | j7s\dSz`y:|js~t8 s~|j( r| j9|nt:| |ggd} | j;d d|jsr| j<|||j=|j|j>dt?|j||j=|j|j3d}t@| jAtBjCdd}g}xX|D]P}|j6}y"tD|j6|}|r*|d|7}WntEk rBYnX|j|qWdjF|}|rtjGd|n(djFdd| jHD}|rtjGd|WntIk rd |_&YnXWd|j&s| jJXWdQRXWdQRX|jrtK|jg}tLd |d!d"}tLd |d!d#}tjj!|r4|j|tjj!|rV||krV|j|x|D]}xtjM|D]}tjjF|j|}tjj!|r|j-stjd$|qltjjN|rtjd%|qltjj"|rtOjP|n tjQ|tOjRtjjF|||qlWq\WtOjP|| S)&NcSs ttdpttdotjtjkS)NZ real_prefix base_prefix)hasattrsysr;r'r9r9r9r:is_venvs z#InstallCommand.run..is_venvrzpWARNING: Running pip install with root privileges is generally not a good idea. Try `%s install --user` instead.z--egg has been deprecated and will be removed in the future. This flag is mutually exclusive with large parts of pip, and actually using it invalidates pip's ability to manage the installation process.z--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zpip install --download has been deprecated and will be removed in the future. Pip now has a download command that should be used instead.TzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z--userz --prefix=z=Target path exists but is not a directory, will not continue.z--home=zThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.)delete)r-src_dirrrrr$r"ignore_dependenciesr/r!r#rsessionZ pycompileisolated wheel_cacher3)Z build_optionsr1)Z autobuilding)rootr'r&)userhomerEr'rCname)key- zSuccessfully installed %scSsg|] }|jqSr9)rH).0reqr9r9r: sz&InstallCommand.run..zSuccessfully downloaded %s)rGpurelibplatlibzKTarget directory %s already exists. Specify --upgrade to force replacement.zTarget directory %s already exists and is a link. Pip will not automatically replace links, please remove if replacement is desired.)Sr Zresolve_wheel_no_use_binaryZcheck_install_build_globalosgetuidloggerZwarningrbasenamer=argvr$warningswarnrZallow_externalZallow_all_externalZallow_unverifiedrr"r-abspathr@r0r#r(r rrappendrtempfileZmkdtempexistsisdirr1Z_build_sessionZ_build_package_finderr2r cache_dirZformat_controlrrrrrrAr/r!r)Z isolated_moder3Zpopulate_requirement_setrHZhas_requirementswheelZ prepare_filesrZbuildrr%r&get_lib_location_guessessortedZsuccessfully_installedoperator attrgetterr ExceptionjoininfoZsuccessfully_downloadedr Z cleanup_filesr rlistdirislinkshutilZrmtreeremoveZmove)r5Zoptionsr6r>r0Ztemp_target_dirr1rBfinderZ build_deleterDr-Zrequirement_setwbZpossible_lib_locationsZreqsitemsrMitemZinstalled_versionZ installedZ downloadedZ lib_dir_listZ purelib_dirZ platlib_dirZlib_dirZtarget_item_dirr9r9r:runsP                            zInstallCommand.run) __name__ __module__ __qualname____doc__rHZusageZsummaryr+ro __classcell__r9r9)r8r:r!s  rcOstd||}|d|dgS)NrOrPrQ)rO)r)r6kwargsschemer9r9r:r`sr`)*Z __future__rZloggingrbrRr[rirWr=rr_ ImportErrorZpip.reqrZpip.basecommandrZ pip.locationsrrZpip.exceptionsrr r Zpipr Z pip.utilsr r Zpip.utils.buildrZpip.utils.deprecationrZpip.utils.filesystemrZ pip.wheelrrZ getLoggerrprTrr`r9r9r9r:s8           ,__pycache__/install.cpython-36.opt-1.pyc000064400000024302152357360100014012 0ustar003 PfqG @s(ddlmZddlZddlZddlZddlZddlZddlZddlZddlm Z y ddl Z Wne k rtdZ YnXddl m Z ddlmZddlmZmZddlmZmZmZddlmZdd lmZmZdd lmZdd lmZdd l m!Z!dd l"m#Z#m$Z$ej%e&Z'GdddeZ(ddZ)dS))absolute_importN)path)RequirementSet)RequirementCommand)virtualenv_no_globaldistutils_scheme)InstallationError CommandErrorPreviousBuildDirError) cmdoptions) ensure_dirget_installed_version)BuildDirectory)RemovedInPip10Warning)check_path_owner) WheelCache WheelBuildercs4eZdZdZdZdZdZfddZddZZ S) InstallCommandaI Install packages from: - PyPI (and other indexes) using requirement specifiers. - VCS project urls. - Local project directories. - Local or remote source archives. pip also supports installing from "requirements files", which provide an easy way to specify a whole environment to be installed. installa% %prog [options] [package-index-options] ... %prog [options] -r [package-index-options] ... %prog [options] [-e] ... %prog [options] [-e] ... %prog [options] ...zInstall packages.c s0tt|j|||j}|jtj|jtj|jtj|jtj |jddddddd|jddd d d ddd d|jtj |jd ddddd|jdddddgdd|jddddd|jdddddd|jtj |jtj |jtj |jtj|jd d!dd"d|jd#d$dd%d|jd&d'ddd(d|jd)d*d+dd,d|jd-d.ddd/d|jd0dd1d2d3d4|jd5d6d1d7d8|jtj|jtj|jtj|jtj|jtj|jtj|jtjtjtj|j}|jjd9||jjd9|dS):Nz-tz--target target_dirdirzInstall packages into . By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)destmetavardefaulthelpz-dz --downloadz--download-dirz--download-directory download_dirz`Download packages into instead of installing them, regardless of what's already installed.z-Uz --upgradeupgrade store_truezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.)ractionrz--upgrade-strategyupgrade_strategyZeagerzonly-if-neededa3Determines how dependency upgrading should be handled. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)rrchoicesrz--force-reinstallforce_reinstallzKWhen upgrading, reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedz5Ignore the installed packages (reinstalling instead).z--user use_user_sitezInstall to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.)z--eggas_eggzInstall packages as eggs, not 'flat', like pip normally does. This option is not about installing *from* eggs. (WARNING: Because this option overrides pip's normal install logic, requirements files may not behave as expected.)z--root root_pathz=Install everything relative to this alternate root directory.z--strip-file-prefixstrip_file_prefixprefixz5Strip given prefix from script paths in wheel RECORD.z--prefix prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz --compilecompileTzCompile py files to pyc)rrrrz --no-compileZ store_falsezDo not compile py files to pyc)rrrr)superr__init__cmd_optsZ add_optionr Z constraintsZeditableZ requirements build_dirsrcignore_requires_pythonZno_depsinstall_optionsglobal_optionsZ use_wheelZ no_use_wheelZ no_binaryZ only_binaryZpreno_cleanrequire_hashesZmake_option_groupZ index_groupparserZinsert_option_group)selfargskwr,Z index_opts) __class__/usr/lib/python3.6/install.pyr+8szInstallCommand.__init__c&Cstj|tj|dd}tjdkrJ| rJtjdtjt j d|j r\t j dt|jrnt j dt|jrt j dt|jrt j dt|jrt j d td |_|jrtjj|j|_tjj|j|_|jpg}|jr|jrtd trtd |jd |jdd}|jrtd |_tj }tjj|j|_tjj!|jrftjj"|j rftd|jd||j#p~g}|j$|T}|j%||}|j&p|j } t'|j(|j)} |j(rt*|j( rtjd|j(d|_(t+|j| d} t,| |j|j|j-|j.|j |j|j/|j0|j1|j|||j2|j3| |j4d} |j5| |||||j6| | j7s\dSz`y:|js~t8 s~|j( r| j9|nt:| |ggd} | j;d d|jsr| j<|||j=|j|j>dt?|j||j=|j|j3d}t@| jAtBjCdd}g}xX|D]P}|j6}y"tD|j6|}|r*|d|7}WntEk rBYnX|j|qWdjF|}|rtjGd|n(djFdd| jHD}|rtjGd|WntIk rd |_&YnXWd|j&s| jJXWdQRXWdQRX|jrtK|jg}tLd |d!d"}tLd |d!d#}tjj!|r4|j|tjj!|rV||krV|j|x|D]}xtjM|D]}tjjF|j|}tjj!|r|j-stjd$|qltjjN|rtjd%|qltjj"|rtOjP|n tjQ|tOjRtjjF|||qlWq\WtOjP|| S)&NcSs ttdpttdotjtjkS)NZ real_prefix base_prefix)hasattrsysr;r'r9r9r9r:is_venvs z#InstallCommand.run..is_venvrzpWARNING: Running pip install with root privileges is generally not a good idea. Try `%s install --user` instead.z--egg has been deprecated and will be removed in the future. This flag is mutually exclusive with large parts of pip, and actually using it invalidates pip's ability to manage the installation process.z--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.zpip install --download has been deprecated and will be removed in the future. Pip now has a download command that should be used instead.TzVCan not combine '--user' and '--prefix' as they imply different installation locationszZCan not perform a '--user' install. User site-packages are not visible in this virtualenv.z--userz --prefix=z=Target path exists but is not a directory, will not continue.z--home=zThe directory '%s' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.)delete)r-src_dirrrrr$r"ignore_dependenciesr/r!r#rsessionZ pycompileisolated wheel_cacher3)Z build_optionsr1)Z autobuilding)rootr'r&)userhomerEr'rCname)key- zSuccessfully installed %scSsg|] }|jqSr9)rH).0reqr9r9r: sz&InstallCommand.run..zSuccessfully downloaded %s)rGpurelibplatlibzKTarget directory %s already exists. Specify --upgrade to force replacement.zTarget directory %s already exists and is a link. Pip will not automatically replace links, please remove if replacement is desired.)Sr Zresolve_wheel_no_use_binaryZcheck_install_build_globalosgetuidloggerZwarningrbasenamer=argvr$warningswarnrZallow_externalZallow_all_externalZallow_unverifiedrr"r-abspathr@r0r#r(r rrappendrtempfileZmkdtempexistsisdirr1Z_build_sessionZ_build_package_finderr2r cache_dirZformat_controlrrrrrrAr/r!r)Z isolated_moder3Zpopulate_requirement_setrHZhas_requirementswheelZ prepare_filesrZbuildrr%r&get_lib_location_guessessortedZsuccessfully_installedoperator attrgetterr ExceptionjoininfoZsuccessfully_downloadedr Z cleanup_filesr rlistdirislinkshutilZrmtreeremoveZmove)r5Zoptionsr6r>r0Ztemp_target_dirr1rBfinderZ build_deleterDr-Zrequirement_setwbZpossible_lib_locationsZreqsitemsrMitemZinstalled_versionZ installedZ downloadedZ lib_dir_listZ purelib_dirZ platlib_dirZlib_dirZtarget_item_dirr9r9r:runsP                            zInstallCommand.run) __name__ __module__ __qualname____doc__rHZusageZsummaryr+ro __classcell__r9r9)r8r:r!s  rcOstd||}|d|dgS)NrOrPrQ)rO)r)r6kwargsschemer9r9r:r`sr`)*Z __future__rZloggingrbrRr[rirWr=rr_ ImportErrorZpip.reqrZpip.basecommandrZ pip.locationsrrZpip.exceptionsrr r Zpipr Z pip.utilsr r Zpip.utils.buildrZpip.utils.deprecationrZpip.utils.filesystemrZ pip.wheelrrZ getLoggerrprTrr`r9r9r9r:s8           ,__pycache__/freeze.cpython-36.pyc000064400000005000152357360100012657 0ustar003 Pf @sdddlmZddlZddlZddlmZddlmZddlm Z ddl m Z d Z Gd d d eZ dS))absolute_importN) stdlib_pkgs)Command)freeze) WheelCachepip setuptools distributewheelcs8eZdZdZdZdZdZd ZfddZdd Z Z S) FreezeCommandzx Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. rz %prog [options]z1Output installed packages in requirements format.ext://sys.stderrc stt|j|||jjddddgddd|jjdd d dgd d d|jjd dddddd|jjdddddd|jjdddddjtd|jjd|jdS)Nz-rz --requirement requirementsappendfilez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)destactiondefaultmetavarhelpz-fz --find-links find_linksZURLzs