���� JFIF    fdasasfas213sdaf403WebShell
403Webshell
Server IP : 88.222.243.109  /  Your IP : 216.73.216.70
Web Server : LiteSpeed
System : Linux in-mum-web669.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User : u479334040 ( 479334040)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/python27/lib/python2.7/site-packages/redis/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyc
�
u�fc@s"ddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZm
Z
mZmZmZmZmZmZmZddlmZmZmZddlmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$dZ%d	Z&d
�Z'd�Z(d�Z)d
�Z*de+fd��YZ,d�Z-d�Z.d�Z/d�Z0ie1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d6e1d 6e1d!6e1d"6e1d#6e1d$6e1d%6e1d&6e1d'6e1d(6e1d)6e1d*6Z2d+�Z3d,�Z4d-�Z5d.�Z6d/�Z7d0�Z8e9e9d1�Z:d2�Z;d3�Z<d4�Z=d5�Z>d6�Z?d7�Z@d8�ZAd9�ZBd:�ZCd;�ZDd<�ZEd=�ZFd>�ZGd?�ZHd@�ZIdA�ZJdB�ZKdC�ZLdD�ZMdE�ZNdF�ZOdG�ZPdH�ZQdI�ZRdJ�ZSdK�ZTdL�ZUdM�ZVdN�ZWdOeXfdP��YZYeYZZdQeXfdR��YZ[dSeXfdT��YZ\dUej]fdV��YZ^dWeYfdX��YZ_dYeXfdZ��YZ`d[eXfd\��YZadS(]i����(tunicode_literals(tchainN(	t
basestringtimapt	iteritemstiterkeyst
itervaluestiziptlongt	nativestrtsafe_unicode(tConnectionPooltUnixDomainSocketConnectiont
SSLConnection(tLock(	tConnectionErrort	DataErrortExecAbortErrort
NoScriptErrortPubSubErrort
RedisErrort
ResponseErrortTimeoutErrort
WatchErrortuEMPTY_RESPONSEcCsry;t|�t|ttf�r.|g}nt|�}Wntk
rW|g}nX|rn|j|�n|S(N(titert
isinstanceRtbytestlistt	TypeErrortextend(tkeystargs((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlist_or_argss


cCs?|s
dSyt|�}Wntk
r.dSXtjj|�S(u5Converts a unix timestamp to a Python datetime objectN(tNonetintt
ValueErrortdatetimet
fromtimestamp(tresponse((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyttimestamp_to_datetime0s
cCstj|j�|�S(N(tdicttfromkeystsplit(t
key_stringtcallback((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytstring_keys_to_dict;scGs(i}x|D]}|j|�q
W|S(N(tupdate(tdictstmergedtd((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
dict_merge?s
tCaseInsensitiveDictcBsPeZdZd�Zd�Zd�Zd�Zdd�Zd�Z	d�Z
RS(	u?Case insensitive dict implementation. Assumes string keys only.cCs1x*t|�D]\}}|||j�<q
WdS(N(Rtupper(tselftdatatktv((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__init__IscCstt|�j|j��S(N(tsuperR4t__contains__R5(R6R8((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR<MscCs tt|�j|j��dS(N(R;R4t__delitem__R5(R6R8((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR=PscCstt|�j|j��S(N(R;R4t__getitem__R5(R6R8((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR>SscCstt|�j|j�|�S(N(R;R4tgetR5(R6R8tdefault((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR?VscCs#tt|�j|j�|�dS(N(R;R4t__setitem__R5(R6R8R9((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRAYscCs&t|�}tt|�j|�dS(N(R4R;R/(R6R7((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR/\sN(t__name__t
__module__t__doc__R:R<R=R>R"R?RAR/(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR4Fs					cCspt|�}d|}td�|j�D��}d}x1|D])}||kr?t||�||<q?q?W|S(uDParse the results of Redis's DEBUG OBJECT command into a Python dictutype:css|]}|jd�VqdS(u:N(R+(t.0tkv((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pys	<genexpr>gsurefcountuserializedlengthulruulru_seconds_idle(urefcountuserializedlengthulruulru_seconds_idle(R	R)R+R#(R't
int_fieldstfield((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_debug_objectas

cCs|dkrt|�S|S(u&Parse the results of an OBJECT commanduidletimeurefcount(uidletimeurefcount(tint_or_none(R'tinfotype((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_objectss
cs�i}t|�}�fd��x�|j�D]�}|r.|jd�r.|jd�dkr�|jdd�\}}|dkr�|jdd�\}}n�|�||<q�|jdg�j|�q.q.W|S(u;Parse the result of Redis's INFO command into a Python dictcs�d|ksd|krTy$d|kr1t|�St|�SWq�tk
rP|SXnLi}x?|jd�D].}|jdd�\}}�|�||<qjW|SdS(Nu,u=u.i(tfloatR#R$R+trsplit(tvaluetsub_dicttitemR8R9(t	get_value(s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRRs

u#u:i����iucmdstat_hostu__raw__(R	t
splitlinest
startswithtfindR+RNt
setdefaulttappend(R'tinfotlinetkeyRO((RRs=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
parse_infozs cKsgt|dtdt�}xHt|�D]:\}}|jd�r%t|dtdt�||<q%q%W|S(u!Parse the results of MEMORY STATStdecode_keystdecode_string_valuesudb.(t
pairs_to_dicttTrueRRT(R'tkwargststatsRZRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_memory_stats�s			ucan-failover-its-masteruconfig-epochudown-after-millisecondsufailover-timeoutuinfo-refreshulast-hello-messageulast-ok-ping-replyulast-ping-replyulast-ping-sentumaster-link-down-timeumaster-portunum-other-sentinelsu
num-slavesuo-down-timeupending-commandsuparallel-syncsuportuquorumurole-reported-timeus-down-timeuslave-priorityuslave-repl-offsetuvoted-leader-epochcCsht|t�}t|djd��}x9dddddddfD]\}}||k||<qDW|S(Nuflagsu,u	is_masterumasteruis_slaveuslaveuis_sdownus_downuis_odownuo_downuis_sentinelusentineluis_disconnectedudisconnecteduis_master_downumaster_down(u	is_masterumaster(uis_slaveuslave(uis_sdownus_down(uis_odownuo_down(uis_sentinelusentinel(uis_disconnectedudisconnected(uis_master_downumaster_down(tpairs_to_dict_typedtSENTINEL_STATE_TYPEStsetR+(RQtresulttflagstnametflag((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_sentinel_state�s	cCsttt|��S(N(RjRR	(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_sentinel_master�scCs>i}x1|D])}ttt|��}|||d<q
W|S(Nuname(RjRR	(R'RfRQtstate((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_sentinel_masters�s

cCs&g|D]}ttt|��^qS(N(RjRR	(R'RQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt#parse_sentinel_slaves_and_sentinels�scCs$|r |dt|d�fp#dS(Nii(R#R"(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_sentinel_get_master�scCst|t�rt|�S|S(N(RRR	(RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytnativestr_if_bytes�scCs�|dkriS|s|r�|ddd�}|rGtt|�}n|ddd�}|rrtt|�}ntt||��St|�}tt||��SdS(u-Create a dict given a list of key/value pairsNii(R"RR	RpR)RR(R'R\R]Rtvaluestit((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR^�scCswt|�}i}x^t||�D]M\}}||krey|||�}Wqetk
raqeXn|||<q"W|S(N(RRt	Exception(R't	type_infoRrRfRZRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRc�s
cKsU|s|jd�r|S|jdt�}t|�}tt|t||���S(ur
    If ``withscores`` is specified in the options, return the response as
    a list of (value, score) pairs
    u
withscoresuscore_cast_func(R?RMRRRR(R'toptionstscore_cast_funcRr((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzset_score_pairss
cKs[|s|jd�r|S|d}ttgt|�D]}||d|�^q8��S(u�
    If ``groups`` is specified, return the response as a list of
    n-element tuples with n being the value found in options['groups']
    ugroupsN(R?RRtrange(R'Rutnti((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsort_return_tupless
cCs|dkrdSt|�S(N(R"R#(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRJ%scCs|dkrdSt|�S(N(R"R	(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytnativestr_or_none+scCsh|dkrdSg}xK|D]C}|dk	rS|j|dt|d�f�q|jd�qW|S(Nii(NN(R"RWR^(R'R7tr((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_stream_list1s
$cCst|dt�S(NR\(R^R_(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt!pairs_to_dict_with_nativestr_keys=scCsttt|��S(N(RRR(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_list_of_dictsAscKs |jdt�r|St|�S(Nuparse_justid(R?tFalseR~(R'Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_xclaimEscCs�t|dt�}|d}|dk	rI|dt|d�f|d<n|d}|dk	r�|dt|d�f|d<n|S(NR\ufirst-entryiiu
last-entry(R^R_R"(R'R7tfirsttlast((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_xinfo_streamKs
!
!cCs;|dkrgSg|D] }|dt|d�g^qS(Nii(R"R~(R'R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_xreadVscKs�|jdt�rt|�Sg|dp,gD]&\}}i|d6t|�d6^q-}i|dd6|dd6|dd	6|d
6S(Nuparse_detailiunameupendingiiuminiumaxu	consumers(R?R�tparse_xpending_rangeR(R'RuRytpt	consumers((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_xpending\s
=cCs,d}g|D]}tt||��^q
S(Nu
message_iduconsumerutime_since_deliveredutimes_delivered(u
message_iduconsumerutime_since_deliveredutimes_delivered(R)R(R'R8R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�hscCs|dkrdSt|�S(N(R"RM(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
float_or_nonemscCst|�dkS(NuOK(R	(R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbool_oksscKs3|dkrdS|jd�r)t|�St|�S(Nuas_score(R"R?RMR#(R'Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
parse_zaddws

cKsMg}x@t|�j�D],}|jtd�|jd�D���qW|S(Ncss!|]}|jdd�VqdS(u=iN(R+(REtpair((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pys	<genexpr>�su (R	RSRWR)R+(R'Rutclientstc((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_client_lists*cKsGg|D]$}|dk	r%t|�nd^q}|rCt|�pFiS(N(R"R	R^(R'RuRz((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_config_get�s1cKs|\}}t|�|fS(N(R(R'RutcursorR}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
parse_scan�scKs.|\}}t|�|r't|�p*ifS(N(RR^(R'RuR�R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_hscan�scKsR|jdt�}|\}}t|�}t|�tt|t||���fS(Nuscore_cast_func(R?RMRRRRR(R'RuRvR�R}Rr((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_zscan�scKsv|jdt�rdnd}g|D]M}i|dd6t|d�d6t|d�d	6|j|d
�d6^q%S(Nudecode_responsesu t iuidiu
start_timeiudurationiucommand(R?R�R#tjoin(R'RutspaceRQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_slowlog_get�scKs&t|�}td�|j�D��S(Ncss$|]}|r|jd�VqdS(u:N(R+(RERY((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pys	<genexpr>�s(R	R)RS(R'Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_cluster_info�sc
Cs�|jd�}|jd�d \}}}}}}}}	g|dD]}
|
jd�^qE}i|d6|d6|d6|d6|d6|d	6|d
6|	dkr�tntd6}||fS(Nu iu-unode_iduflagsu	master_idulast_ping_sentulast_pong_rcvduepochuslotsu	connected(R+R_R�(
RYt
line_itemstnode_idtaddrRgt	master_idtpingtpongtepocht	connectedtsltslotst	node_dict((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt_parse_node_line�s+&cKsDt|�}|}t|t�r0|j�}ntd�|D��S(Ncss|]}t|�VqdS(N(R�(RERY((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pys	<genexpr>�s(R	RRRSR)(R'Rut	raw_lines((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_cluster_nodes�s
cKs�|ds|dr|St|�tkr6|g}n|}|dra|dra|dra|Sitd6d�d6td6}d�g}|gdddgD]}||r�||^q�7}g|D]'}ttd�t||���^q�S(	Nustoreu
store_distuwithdistu	withcoorduwithhashcSst|d�t|d�fS(Nii(RM(tll((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt<lambda>�RcSs|S(N((tx((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��RcSs|d|d�S(Nii((tfv((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��R(ttypeRRMR#tmaptzip(R'Rut
response_listtcasttftoR}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_georadius_generic�s

4cKs-tt|ddd�|ddd���S(Niii(RR�(R'Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_pubsub_numsub�scKs/t|ttf�rt|�St|�dkS(NuOK(RRR#R	(R'Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_client_kill�s
cKs�|dkrdSt|dt�}ttt|d��|d<ttt|d��|d<t|d�|d<gg}}xD|djd�D]/}d|kr�|j|�q�|j|�q�W||d<||d<d|dk|d	<|S(
NR\uflagsu	passwordsucommandsu u@u
categoriesuonuenabled(R"R^R_RR�R	R+RW(R'RuR7tcommandst
categoriestcommand((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytparse_acl_getuser�s


tRediscBseZdZeede�ede�ede�edd��ede�ede	�ede
�ed	d
��edd��ed
e�edd��ede�ede
�ede�edd��iRd�d6ed6ed6ed6d�d6e
d6e
d6e
d6d�d 6ed!6d"�d#6ed$6ed%6ed&6e
d'6d(�d)6e
d*6e
d+6d,�d-6d.�d/6e
d06e
d16e
d26ed36d4�d56e
d66ed76e
d86e
d96e
d:6e
d;6e
d<6ed=6ed>6e
d?6e
d@6edA6dB�dC6dD�dE6edF6edG6dH�dI6edJ6edK6edL6e
dM6edN6edO6edP6dQ�dR6edS6dT�dU6edV6dW�dX6e
dY6e
dZ6ed[6ed\6e d]6e!d^6e
d_6e
d`6e"da6e
db6e"dc6dd�de6e#df6edg6e
dh6edi6dj�dk6e$dl6e
dm6edn6edo6e
dp6e%dq6e%dr6e&ds6e'dt6e(du6e)dv6�Z*e+dwdw��Z-dxdydzdwdwdwdwdwdwdwd{d|dwdwe.e.e.dwdwd}dwe.dwe.dzdwdwd~�Z/d�Z0d��Z1e2dwd��Z3d��Z4dwd�dwdwe2d��Z5d��Z6d��Z7d��Z8d��Z9d��Z:d��Z;d��Z<d��Z=d��Z>dwd��Z?d��Z@d��ZAd��ZBd��ZCd��ZDd��ZEe.e.dwdwdwdwdwe.e.e.d��
ZFd��ZGd��ZHd��ZId��ZJd��ZKdwdwdwdwd��ZLdwd��ZMd��ZNd��ZOd��ZPe.d��ZQd��ZRd��ZSd��ZTd�d��ZUd��ZVd��ZWd��ZXd��ZYd��ZZd��Z[e.d��Z\e.d��Z]d��Z^dwd��Z_d��Z`e.e.dwd��Zad��Zbd��Zcdwd��Zdd��Zed��Zfd��Zgd��Zhd��Zid��Zjd��Zkd��Zld��Zmd��Znd��Zod��Zpe.e.d��Zqdwdwd��Zrdwd��Zsd��Ztd��Zud��Zvd��Zwd��Zxdwdwd��Zydwd��Zzd��Z{dwdwd��Z|d�d��Z}d�d��Z~d��Zd��Z�d��Z�d��Z�e�Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�e.d��Z�dwdwe.e.e.d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dzd��Z�dzd��Z�dzd��Z�d��Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d	�Z�d
�Z�d�Z�d�Z�dwdwdwdwe.e.dwe.d
�Z�dzdwdwdwd�Z�dwdwdwd�Z�dzdwdwd�Z�dwdwd�Z�dzdwdwd�Z�dwdwd�Z�dzdwdwed�Z�dwdwed�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�dwd�Z�dwd �Z�d!�Z�d"�Z�d#�Z�d$�Z�d�dwe2d%�Z�dwdwdwe.e.d&�Z�d'�Z�d(e.d)�Z�d*�Z�d+�Z�d,�Z�d-�Z�d.�Z�d/�Z�d0�Z�d1�Z�dwd2�Z�d3d4dwd5�Z�dwdwd6�Z�dwdwe.d7�Z�d4d3dwd8�Z�e2d9�Z�e.e.e.e.d:�Z�d;�Z�d<�Z�d=�Z�dwd>�Z�d?�Z�dwd@�Z�dwdA�Z�dzdB�Z�dzdC�Z�e.e.edD�Z�dwdwdE�Z�dwdwdF�Z�dwdwe.edG�Z�dH�Z�dI�Z�dJ�Z�dK�Z�dL�Z�e.edM�Z�dwdwe.edN�Z�dO�Z�dP�Z�dwdQ�Z�dwdR�Z�dS�Z�dT�Z�dU�ZdV�ZdW�ZdX�ZdY�Zd�dZ�Zd�d[�Zd\�Zd]�Zdwdwdwd^�Z	d_�Z
d`�Zda�Zdb�Z
dc�Zdd�Zd�de�Zdf�Zdg�Zdh�Zdi�Zdj�Zdk�Zdl�Zdm�Zdn�Zdo�Zdp�Zdwdq�Zdr�Zds�Zdwe.e.e.dwdwdwdwdt�Zdwe.e.e.dwdwdwdwdu�Z dv�Z!RS(xu&
    Implementation of the Redis protocol.

    This abstract class provides a Python interface to all Redis commands
    and an implementation of the Redis protocol.

    Connection and Pipeline derive from this, implementing how
    the commands are sent and received to the Redis server
    ubAUTH EXPIRE EXPIREAT HEXISTS HMSET MOVE MSETNX PERSIST PSETEX RENAMENX SISMEMBER SMOVE SETEX SETNXuBITCOUNT BITPOS DECRBY DEL EXISTS GEOADD GETBIT HDEL HLEN HSTRLEN INCRBY LINSERT LLEN LPUSHX PFADD PFCOUNT RPUSHX SADD SCARD SDIFFSTORE SETBIT SETRANGE SINTERSTORE SREM STRLEN SUNIONSTORE UNLINK XACK XDEL XLEN XTRIM ZCARD ZLEXCOUNT ZREM ZREMRANGEBYLEX ZREMRANGEBYRANK ZREMRANGEBYSCOREuINCRBYFLOAT HINCRBYFLOATuLPUSH RPUSHcCs+t|ttf�r|p*t|�dkS(NuOK(RRR#R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�&RuSORTuZSCORE ZINCRBY GEODISTuuFLUSHALL FLUSHDB LSET LTRIM MSET PFMERGE READONLY READWRITE RENAME SAVE SELECT SHUTDOWN SLAVEOF SWAPDB WATCH UNWATCH uBLPOP BRPOPcCs|rt|�pdS(N(ttupleR"(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�/RuSDIFF SINTER SMEMBERS SUNIONcCs|rt|�pt�S(N(Re(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�2Ru?ZPOPMAX ZPOPMIN ZRANGE ZRANGEBYSCORE ZREVRANGE ZREVRANGEBYSCOREuBZPOPMIN BZPOPMAXcCs+|r'|d|dt|d�fp*dS(Niii(RMR"(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�9RuZRANK ZREVRANKuXREVRANGE XRANGEuXREAD XREADGROUPuBGREWRITEAOF BGSAVEcCstS(N(R_(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�=RcCsttt|��S(N(RR�R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�?RuACL CATuACL DELUSERuACL GENPASSuACL GETUSERcCsttt|��S(N(RR�R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�CRuACL LISTuACL LOADuACL SAVEuACL SETUSERcCsttt|��S(N(RR�R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�GRu	ACL USERSu
ACL WHOAMIcCs|ot|�S(N(R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�IRuCLIENT GETNAMEu	CLIENT IDuCLIENT KILLuCLIENT LISTuCLIENT SETNAMEcCs|rt|�dkptS(Ni(R#R�(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�NRuCLIENT UNBLOCKuCLIENT PAUSEuCLUSTER ADDSLOTScCs
t|�S(N(R#(R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�QRuCLUSTER COUNT-FAILURE-REPORTScCs
t|�S(N(R#(R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�RRuCLUSTER COUNTKEYSINSLOTuCLUSTER DELSLOTSuCLUSTER FAILOVERuCLUSTER FORGETuCLUSTER INFOcCs
t|�S(N(R#(R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�WRuCLUSTER KEYSLOTuCLUSTER MEETu
CLUSTER NODESuCLUSTER REPLICATEu
CLUSTER RESETuCLUSTER SAVECONFIGuCLUSTER SET-CONFIG-EPOCHuCLUSTER SETSLOTuCLUSTER SLAVESu
CONFIG GETuCONFIG RESETSTATu
CONFIG SETuDEBUG OBJECTcCsttt|��S(N(RR�R|(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�dRuGEOHASHcCsttd�|��S(NcSs.|dk	r*t|d�t|d�fSdS(Nii(R"RM(R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�es(RR�(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�esuGEOPOSu	GEORADIUSuGEORADIUSBYMEMBERcCs|rt|�piS(N(R^(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�jRuHGETALLuHSCANuINFOuLASTSAVEuMEMORY PURGEuMEMORY STATSuMEMORY USAGEuOBJECTcCst|�dkS(NuPONG(R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�rRuPINGu
PUBSUB NUMSUBcCs|r|pdS(N(R"(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�tRu	RANDOMKEYuSCANcCsttt|��S(N(RRtbool(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�vRu
SCRIPT EXISTSuSCRIPT FLUSHuSCRIPT KILLuSCRIPT LOADu SENTINEL GET-MASTER-ADDR-BY-NAMEuSENTINEL MASTERuSENTINEL MASTERSuSENTINEL MONITORuSENTINEL REMOVEuSENTINEL SENTINELSuSENTINEL SETuSENTINEL SLAVEScCs|ot|�dkS(NuOK(R	(R}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��RuSETuSLOWLOG GETuSLOWLOG LENu
SLOWLOG RESETuSSCANcCst|d�t|d�fS(Nii(R#(R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��RuTIMEuXCLAIMu
XGROUP CREATEuXGROUP DELCONSUMERuXGROUP DESTROYuXGROUP SETIDuXINFO CONSUMERSuXINFO GROUPSuXINFO STREAMuXPENDINGuZADDuZSCANcKs%tj|d||�}|d|�S(u<
        Return a Redis client object configured from the given URL

        For example::

            redis://[[username]:[password]]@localhost:6379/0
            rediss://[[username]:[password]]@localhost:6379/0
            unix://[[username]:[password]]@/path/to/socket.sock?db=0

        Three URL schemes are supported:

        - ```redis://``
          <http://www.iana.org/assignments/uri-schemes/prov/redis>`_ creates a
          normal TCP socket connection
        - ```rediss://``
          <http://www.iana.org/assignments/uri-schemes/prov/rediss>`_ creates a
          SSL wrapped TCP socket connection
        - ``unix://`` creates a Unix Domain Socket connection

        There are several ways to specify a database number. The parse function
        will return the first specified option:
            1. A ``db`` querystring option, e.g. redis://localhost?db=0
            2. If using the redis:// scheme, the path argument of the url, e.g.
               redis://localhost/0
            3. The ``db`` argument to this function.

        If none of these options are specified, db=0 is used.

        Any additional querystring arguments and keyword arguments will be
        passed along to the ConnectionPool class's initializer. In the case
        of conflicting arguments, querystring arguments always win.
        tdbtconnection_pool(Rtfrom_url(tclsturlR�R`R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s"u	localhosti�iuutf-8ustricturequiredcCs�|	sR|
dk	r.tjtd��|
}n|dk	rVtjtd��|}ni|d6|d6|d6|d6|d6|d6|d	6|d
6|d6|d6|d
6}|
dk	r�|ji|
d6td6�np|ji|d6|d6|d6|d6|d6�|rC|jitd6|d6|d6|d6|d6|d6�nt|�}	n|	|_d|_	|r�|jj
d�|_	nt|jj
�|_dS(Nu/"charset" is deprecated. Use "encoding" insteadu5"errors" is deprecated. Use "encoding_errors" insteadudbuusernameupasswordusocket_timeoutuencodinguencoding_errorsudecode_responsesuretry_on_timeoutumax_connectionsuhealth_check_intervaluclient_nameupathuconnection_classuhostuportusocket_connect_timeoutusocket_keepaliveusocket_keepalive_optionsussl_keyfileussl_certfileu
ssl_cert_reqsussl_ca_certsussl_check_hostnameu_(R"twarningstwarntDeprecationWarningR/RR
RR�t
connectiontget_connectionR4t	__class__tRESPONSE_CALLBACKStresponse_callbacks(R6thosttportR�tpasswordtsocket_timeouttsocket_connect_timeouttsocket_keepalivetsocket_keepalive_optionsR�tunix_socket_pathtencodingtencoding_errorstcharsetterrorstdecode_responsestretry_on_timeouttssltssl_keyfiletssl_certfilet
ssl_cert_reqstssl_ca_certstssl_check_hostnametmax_connectionstsingle_connection_clientthealth_check_intervaltclient_nametusernameR`((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:�s\
	
		
	
					cCs dt|�jt|j�fS(Nu%s<%s>(R�RBtreprR�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__repr__scCs||j|<dS(uSet a custom Response CallbackN(R�(R6R�R-((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytset_response_callbackscCst|j|j||�S(u_
        Return a new pipeline object that can queue multiple commands for
        later execution. ``transaction`` indicates whether all commands
        should be executed atomically. Apart from making a group of operations
        atomic, pipelines are useful for reducing the back-and-forth overhead
        between the client and server.
        (tPipelineR�R�(R6ttransactiont
shard_hint((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpipelines
c
	Os�|jdd�}|jdt�}|jdd�}|jt|���}x�tr�y@|rm|j|�n||�}|j�}	|r�|S|	SWqNtk
r�|dk	rN|dkrNtj	|�qNqNqNXqNWWdQXdS(u�
        Convenience method for executing the callable `func` as a transaction
        while watching all keys specified in `watches`. The 'func' callable
        should expect a single argument which is a Pipeline object.
        u
shard_hintuvalue_from_callableuwatch_delayiN(
tpopR"R�R�R_twatchtexecuteRttimetsleep(
R6tfunctwatchesR`R�tvalue_from_callabletwatch_delaytpipet
func_valuet
exec_value((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s	
g�������?cCs:|dkrt}n|||d|d|d|d|�S(u$	
        Return a new Lock object using key ``name`` that mimics
        the behavior of threading.Lock.

        If specified, ``timeout`` indicates a maximum life for the lock.
        By default, it will remain locked until release() is called.

        ``sleep`` indicates the amount of time to sleep per loop iteration
        when the lock is in blocking mode and another client is currently
        holding the lock.

        ``blocking_timeout`` indicates the maximum amount of time in seconds to
        spend trying to acquire the lock. A value of ``None`` indicates
        continue trying forever. ``blocking_timeout`` can be specified as a
        float or integer, both representing the number of seconds to wait.

        ``lock_class`` forces the specified lock implementation.

        ``thread_local`` indicates whether the lock token is placed in
        thread-local storage. By default, the token is placed in thread local
        storage so that a thread only sees its token, not a token set by
        another thread. Consider the following timeline:

            time: 0, thread-1 acquires `my-lock`, with a timeout of 5 seconds.
                     thread-1 sets the token to "abc"
            time: 1, thread-2 blocks trying to acquire `my-lock` using the
                     Lock instance.
            time: 5, thread-1 has not yet completed. redis expires the lock
                     key.
            time: 5, thread-2 acquired `my-lock` now that it's available.
                     thread-2 sets the token to "xyz"
            time: 6, thread-1 finishes its work and calls release(). if the
                     token is *not* stored in thread local storage, then
                     thread-1 would see the token value as "xyz" and would be
                     able to successfully release the thread-2's lock.

        In some use cases it's necessary to disable thread local storage. For
        example, if you have code where one thread acquires a lock and passes
        that lock instance to a worker thread to release later. If thread
        local storage isn't disabled in this case, the worker thread won't see
        the token set by the thread that acquired the lock. Our assumption
        is that these cases aren't common and as such default to using
        thread local storage.        ttimeoutR�tblocking_timeouttthread_localN(R"R(R6RhR�R�R�t
lock_classR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlock,s
-	cKst|j|�S(u�
        Return a Publish/Subscribe object. With this object, you can
        subscribe to channels and listen for messages that get published to
        them.
        (tPubSubR�(R6R`((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpubsub_scCs
t|j�S(N(tMonitorR�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmonitorgscCs|jd|jdt�S(NR�R�(R�R�R_(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclientjscCs|S(N((R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	__enter__nscCs|j�dS(N(tclose(R6texc_typet	exc_valuet	traceback((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__exit__qscCs|j�dS(N(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__del__tscCs/|j}|r+d|_|jj|�ndS(N(R�R"R�trelease(R6tconn((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRws		cOs�|j}|d}|jp+|j||�}z�y$|j|�|j|||�SWn^ttfk
r�}|j�|jo�t	|t�s��n|j|�|j|||�SXWd|js�|j
|�nXdS(u.Execute a command and return a parsed responseiN(R�R�R�tsend_commandtparse_responseRRt
disconnectR�RR	(R6R Rutpooltcommand_nameR
te((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytexecute_command~s	



	cKsby|j�}Wn(tk
r:t|kr4|tS�nX||jkr^|j|||�S|S(u'Parses a response from the Redis server(t
read_responseRtEMPTY_RESPONSER�(R6R�RRuR'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s
cCs%|r|gng}|jd|�S(u�
        Returns a list of categories or commands within a category.

        If ``category`` is not supplied, returns a list of all categories.
        If ``category`` is supplied, returns a list of all commands within
        that category.
        uACL CAT(R(R6tcategorytpieces((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_cat�scCs|jd|�S(u-Delete the ACL for the specified ``username``uACL DELUSER(R(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_deluser�scCs
|jd�S(u Generate a random password valueuACL GENPASS(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_genpass�scCs|jd|�S(uz
        Get the ACL details for the specified ``username``.

        If ``username`` does not exist, return None
        uACL GETUSER(R(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_getuser�scCs
|jd�S(u'Return a list of all ACLs on the serveruACL LIST(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_list�scCs
|jd�S(u�
        Load ACL rules from the configured ``aclfile``.

        Note that the server must be configured with the ``aclfile``
        directive to be able to load ACL rules from an aclfile.
        uACL LOAD(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_load�scCs
|jd�S(u�
        Save ACL rules to the configured ``aclfile``.

        Note that the server must be configured with the ``aclfile``
        directive to be able to save ACL rules to an aclfile.
        uACL SAVE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_save�scCs�|jj�}|g}
|	r.|
jd�n|
rD|
jd�n|rZ|
jd�n|rp|
jd�n
|
jd�|s�|r�|r�td��n|r@t|g�}x�t|�D]y\}}|j|�}|jd�r|
jd|d	�q�|jd
�r)|
jd|d	�q�td|��q�Wn|r�t|g�}x�t|�D]y\}}|j|�}|jd�r�|
jd
|d	�qb|jd
�r�|
jd|d	�qbtd|��qbWn|r�|
jd�n|r�x�|D]�}|j|�}|jd�r9|
j|�q|jd�r`|
jd|d	�q|jd�r|
j|�q|jd
�r�|
jd|d	�qtd|j|dt	���qWn|rDxo|D]d}|j|�}|jd�r0|jd
�r0td|j|dt	���n|
j|�q�Wn|r~x1|D]&}|j|�}|
jd|�qQWn|j
d|
�S(uE
        Create or update an ACL user.

        Create or update the ACL for ``username``. If the user already exists,
        the existing ACL is completely overwritten and replaced with the
        specified values.

        ``enabled`` is a boolean indicating whether the user should be allowed
        to authenticate or not. Defaults to ``False``.

        ``nopass`` is a boolean indicating whether the can authenticate without
        a password. This cannot be True if ``passwords`` are also specified.

        ``passwords`` if specified is a list of plain text passwords
        to add to or remove from the user. Each password must be prefixed with
        a '+' to add or a '-' to remove. For convenience, the value of
        ``add_passwords`` can be a simple prefixed string when adding or
        removing a single password.

        ``hashed_passwords`` if specified is a list of SHA-256 hashed passwords
        to add to or remove from the user. Each hashed password must be
        prefixed with a '+' to add or a '-' to remove. For convenience,
        the value of ``hashed_passwords`` can be a simple prefixed string when
        adding or removing a single password.

        ``categories`` if specified is a list of strings representing category
        permissions. Each string must be prefixed with either a '+' to add the
        category permission or a '-' to remove the category permission.

        ``commands`` if specified is a list of strings representing command
        permissions. Each string must be prefixed with either a '+' to add the
        command permission or a '-' to remove the command permission.

        ``keys`` if specified is a list of key patterns to grant the user
        access to. Keys patterns allow '*' to support wildcard matching. For
        example, '*' grants access to all keys while 'cache:*' grants access
        to all keys that are prefixed with 'cache:'. ``keys`` should not be
        prefixed with a '~'.

        ``reset`` is a boolean indicating whether the user should be fully
        reset prior to applying the new ACL. Setting this to True will
        remove all existing passwords, flags and privileges from the user and
        then apply the specified rules. If this is False, the user's existing
        passwords, flags and privileges will be kept and any new specified
        rules will be applied on top.

        ``reset_keys`` is a boolean indicating whether the user's key
        permissions should be reset prior to applying any new key permissions
        specified in ``keys``. If this is False, the user's existing
        key permissions will be kept and any new specified key permissions
        will be applied on top.

        ``reset_passwords`` is a boolean indicating whether to remove all
        existing passwords and the 'nopass' flag from the user prior to
        applying any new passwords specified in 'passwords' or
        'hashed_passwords'. If this is False, the user's existing passwords
        and 'nopass' status will be kept and any new specified passwords
        or hashed_passwords will be applied on top.
        tresett	resetkeyst	resetpasstontoffu@Cannot set 'nopass' and supply 'passwords' or 'hashed_passwords't+s>%sit-s<%suBPassword %d must be prefixeed with a "+" to add or a "-" to removes#%ss!%suIHashed %d password must be prefixeed with a "+" to add or a "-" to removetnopasss+@s+@%ss-@s-@%su.Category "%s" must be prefixed with "+" or "-"tforceu-Command "%s" must be prefixed with "+" or "-"s~%suACL SETUSER(R�tget_encoderRWRR!t	enumeratetencodeRTtdecodeR_R(R6R�tenabledR$t	passwordsthashed_passwordsR�R�RRt
reset_keystreset_passwordstencoderRRzR�thashed_passwordRtcmdRZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytacl_setuser�sx?	

 
 
cCs
|jd�S(u5Returns a list of all registered users on the server.u	ACL USERS(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	acl_userscscCs
|jd�S(u+Get the username for the current connectionu
ACL WHOAMI(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
acl_whoamigscCs
|jd�S(uBTell the Redis server to rewrite the AOF file from data in memory.uBGREWRITEAOF(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbgrewriteaofkscCs
|jd�S(u�
        Tell the Redis server to save its data to disk.  Unlike save(),
        this method is asynchronous and returns immediately.
        uBGSAVE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbgsaveoscCs|jd|�S(u/Disconnects the client at ``address`` (ip:port)uCLIENT KILL(R(R6taddress((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_killvscCsg}|dk	r\d}t|�j�|krFtd|f��n|jd|f�n|dk	r�t|t�s�td��n|r�|jd�q�|jd�n|dk	r�|jd|f�n|dk	r�|jd|f�n|std
��n|jd|�S(u

        Disconnects client(s) using a variety of filter options
        :param id: Kills a client by its unique ID field
        :param type: Kills a client by type where type is one of 'normal',
        'master', 'slave' or 'pubsub'
        :param addr: Kills a client by its 'address:port'
        :param skipme: If True, then the client calling the command
        will not get killed even if it is identified by one of the filter
        options. If skipme is not provided, the server defaults to skipme=True
        unormalumasteruslaveupubsubu"CLIENT KILL type must be one of %rtTYPEu!CLIENT KILL skipme must be a booltSKIPMEtYEStNOtIDtADDRuVCLIENT KILL <filter> <value> ... ... <filter> <value> must specify at least one filteruCLIENT KILLN(unormalumasteruslaveupubsub(R:R;(R:R<(R"tstrtlowerRRRR�R(R6t_idt_typeR�tskipmeR tclient_types((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_kill_filterzs(cCs`|dk	rSd	}t|�j�|kr@td|f��n|jdd|�S|jd�S(
u�
        Returns a list of currently connected clients.
        If type of client specified, only that type will be returned.
        :param _type: optional. one of the client types (normal, master,
         replica, pubsub)
        unormalumasterureplicaupubsubu#CLIENT LIST _type must be one of %ruCLIENT LISTR9N(unormalumasterureplicaupubsub(R"R?R@RR(R6RBRD((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_list�scCs
|jd�S(u#Returns the current connection nameuCLIENT GETNAME(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_getname�scCs
|jd�S(u!Returns the current connection idu	CLIENT ID(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	client_id�scCs|jd|�S(u Sets the current connection nameuCLIENT SETNAME(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_setname�scCs5dt|�g}|r(|jd�n|j|�S(u�
        Unblocks a connection by its client id.
        If ``error`` is True, unblocks the client with a special error message.
        If ``error`` is False (default), the client is unblocked using the
        regular timeout mechanism.
        uCLIENT UNBLOCKtERROR(R#RWR(R6RHterrorR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_unblock�scCs:t|ttf�s$td��n|jdt|��S(u�
        Suspend all the Redis clients for the specified amount of time
        :param timeout: milliseconds to pause clients
        u'CLIENT PAUSE timeout must be an integeruCLIENT PAUSE(RR#RRRR?(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytclient_pause�scCs
|jd�S(uDDisables read queries for a connection to a Redis Cluster slave nodeu	READWRITE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	readwrite�scCs
|jd�S(uEEnables read queries for a connection to a Redis Cluster replica nodeuREADONLY(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytreadonly�su*cCs|jd|�S(u=Return a dictionary of configuration based on the ``pattern``u
CONFIG GET(R(R6tpattern((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
config_get�scCs|jd||�S(u'Set config item ``name`` with ``value``u
CONFIG SET(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
config_set�scCs
|jd�S(uReset runtime statisticsuCONFIG RESETSTAT(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytconfig_resetstat�scCs
|jd�S(uERewrite config file with the minimal change to reflect running configuCONFIG REWRITE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytconfig_rewrite�scCs
|jd�S(u2Returns the number of keys in the current databaseuDBSIZE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytdbsize�scCs|jd|�S(u;Returns version specific meta information about a given keyuDEBUG OBJECT(R(R6RZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytdebug_object�scCs|jd|�S(u$Echo the string back from the serveruECHO(R(R6RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytecho�scCs,g}|r|jd�n|jd|�S(u�
        Delete all keys in all databases on the current host.

        ``asynchronous`` indicates whether the operation is
        executed asynchronously by the server.
        tASYNCuFLUSHALL(RWR(R6tasynchronousR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytflushall�scCs,g}|r|jd�n|jd|�S(u�
        Delete all keys in the current database.

        ``asynchronous`` indicates whether the operation is
        executed asynchronously by the server.
        RXuFLUSHDB(RWR(R6RYR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytflushdb�scCs|jd||�S(uSwap two databasesuSWAPDB(R(R6R�tsecond((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytswapdb	scCs-|dkr|jd�S|jd|�SdS(u,
        Returns a dictionary containing information about the Redis server

        The ``section`` option can be used to select a specific section
        of information

        The section option is not supported by older versions of Redis Server,
        and will generate ResponseError
        uINFON(R"R(R6tsection((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRX
s

cCs
|jd�S(uy
        Return a Python datetime object representing the last time the
        Redis database was saved to disk
        uLASTSAVE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlastsavesc	
Cs�t|g�}|s$td��ng}	|r@|	jd�n|rV|	jd�n|ry|	jd�|	j|�n|	jd�|	j|�|jd||d|||	�S(u�
        Migrate 1 or more keys from the current Redis server to a different
        server specified by the ``host``, ``port`` and ``destination_db``.

        The ``timeout``, specified in milliseconds, indicates the maximum
        time the connection between the two servers can be idle before the
        command is interrupted.

        If ``copy`` is True, the specified ``keys`` are NOT deleted from
        the source server.

        If ``replace`` is True, this operation will overwrite the keys
        on the destination server if they exist.

        If ``auth`` is specified, authenticate to the destination server with
        the password provided.
        u!MIGRATE requires at least one keytCOPYtREPLACEtAUTHtKEYSuMIGRATEu(R!RRWRR(
R6R�R�Rtdestination_dbR�tcopytreplacetauthR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmigrate#s


cCs|jd||d|�S(u8Return the encoding, idletime, or refcount about the keyuOBJECTRK(R(R6RKRZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytobjectFscCs
|jd�S(u#Return a dictionary of memory statsuMEMORY STATS(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmemory_statsJscCs>g}t|t�r+|jd|g�n|jd||�S(u'
        Return the total memory usage for key, its value and associated
        administrative overheads.

        For nested data structures, ``samples`` is the number of elements to
        sample. If left unspecified, the server's default is 5. Use 0 to sample
        all elements.
        tSAMPLESuMEMORY USAGE(RR#RR(R6RZtsamplesR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmemory_usageNs	cCs
|jd�S(u:Attempts to purge dirty pages for reclamation by allocatoruMEMORY PURGE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmemory_purge\scCs
|jd�S(uPing the Redis serveruPING(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�`scCs
|jd�S(um
        Tell the Redis server to save its data to disk,
        blocking until the save is complete
        uSAVE(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsavedscGstjtd��dS(u"Redis Sentinel's SENTINEL command.u%Use the individual sentinel_* methodsN(R�R�R�(R6R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinelkscCs|jd|�S(u:Returns a (host, port) pair for the given ``service_name``u SENTINEL GET-MASTER-ADDR-BY-NAME(R(R6tservice_name((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt sentinel_get_master_addr_by_nameps	cCs|jd|�S(u<Returns a dictionary containing the specified masters state.uSENTINEL MASTER(R(R6Rq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_masteruscCs
|jd�S(u>Returns a list of dictionaries containing each master's state.uSENTINEL MASTERS(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_mastersyscCs|jd||||�S(u,Add a new master to Sentinel to be monitoreduSENTINEL MONITOR(R(R6RhtipR�tquorum((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_monitor}scCs|jd|�S(u*Remove a master from Sentinel's monitoringuSENTINEL REMOVE(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_remove�scCs|jd|�S(u0Returns a list of sentinels for ``service_name``uSENTINEL SENTINELS(R(R6Rq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_sentinels�scCs|jd|||�S(u5Set Sentinel monitoring parameters for a given masteruSENTINEL SET(R(R6RhtoptionRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_set�scCs|jd|�S(u-Returns a list of slaves for ``service_name``uSENTINEL SLAVES(R(R6Rq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsentinel_slaves�scCs�|r|rtd��ndg}|r:|jd�n|rP|jd�ny|j|�Wntk
rudSXtd��dS(unShutdown the Redis server.  If Redis has persistence configured,
        data will be flushed before shutdown.  If the "save" option is set,
        a data flush will be attempted even if there is no persistence
        configured.  If the "nosave" option is set, no data flush will be
        attempted.  The "save" and "nosave" options cannot both be set.
        u+SHUTDOWN save and nosave cannot both be setuSHUTDOWNuSAVEuNOSAVENuSHUTDOWN seems to have failed.(RRWRRR(R6RotnosaveR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytshutdown�s	
cCs>|dkr+|dkr+|jddd�S|jd||�S(u�
        Set the server to be a replicated slave of the instance identified
        by the ``host`` and ``port``. If called without arguments, the
        instance is promoted to a master instead.
        uSLAVEOFR<tONEN(R"R(R6R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytslaveof�scCsPdg}|dk	r%|j|�n|jjjdt�}|jd||�S(uw
        Get the entries from the slowlog. If ``num`` is specified, get the
        most recent ``num`` items.
        uSLOWLOG GETudecode_responsesR�N(R"RWR�tconnection_kwargsR?R�R(R6tnumR R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytslowlog_get�s	cCs
|jd�S(u&Get the number of items in the slowloguSLOWLOG LEN(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytslowlog_len�scCs
|jd�S(uRemove all items in the slowlogu
SLOWLOG RESET(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
slowlog_reset�scCs
|jd�S(u�
        Returns the server time as a 2-item tuple of ints:
        (seconds since epoch, microseconds into this second).
        uTIME(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��scCs|jd||�S(u�
        Redis synchronous replication
        That returns the number of replicas that processed the query when
        we finally have at least ``num_replicas``, or when the ``timeout`` was
        reached.
        uWAIT(R(R6tnum_replicasR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytwait�scCs|jd||�S(u�
        Appends the string ``value`` to the value at ``key``. If ``key``
        doesn't already exist, create it with a value of ``value``.
        Returns the new length of the value at ``key``.
        uAPPEND(R(R6RZRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRW�scCs�|g}|dk	r>|dk	r>|j|�|j|�n?|dk	rV|dksn|dk	r}|dkr}td��n|jd|�S(u�
        Returns the count of set bits in the value of ``key``.  Optional
        ``start`` and ``end`` paramaters indicate which bytes to consider
        u$Both start and end must be specifieduBITCOUNTN(R"RWRR(R6RZtstarttendtparams((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbitcount�s	
cCst||d|�S(u�
        Return a BitFieldOperation instance to conveniently construct one or
        more bitfield operations on ``key``.
        tdefault_overflow(tBitFieldOperation(R6RZR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbitfield�scGs|jd|||�S(u|
        Perform a bitwise operation using ``operation`` between ``keys`` and
        store the result in ``dest``.
        uBITOP(R(R6t	operationtdestR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbitop�scCs�|dkrtd��n||g}|dk	o?|j|�|dk	rh|dk	rh|j|�n'|dkr�|dk	r�td��n|jd|�S(u
        Return the position of the first bit set to 1 or 0 in a string.
        ``start`` and ``end`` difines search range. The range is interpreted
        as a range of bytes and not a range of bits, so start=0 and end=2
        means to look at the first three bytes.
        iiubit must be 0 or 1u0start argument is not set, when end is specifieduBITPOS(iiN(RR"RWR(R6RZtbitR�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbitpos�sicCs|j||�S(u�
        Decrements the value of ``key`` by ``amount``.  If no key exists,
        the value will be initialized as 0 - ``amount``
        (tdecrby(R6Rhtamount((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytdecr
scCs|jd||�S(u�
        Decrements the value of ``key`` by ``amount``.  If no key exists,
        the value will be initialized as 0 - ``amount``
        uDECRBY(R(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scGs|jd|�S(u.Delete one or more keys specified by ``names``uDEL(R(R6tnames((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytdeletescCs|j|�dS(N(R�(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR=!scCs|jd|�S(u�
        Return a serialized version of the value stored at the specified key.
        If key does not exist a nil bulk reply is returned.
        uDUMP(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytdump$scGs|jd|�S(u*Returns the number of ``names`` that existuEXISTS(R(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytexists+scCs:t|tj�r't|j��}n|jd||�S(u�
        Set an expire flag on key ``name`` for ``time`` seconds. ``time``
        can be represented by an integer or a Python timedelta object.
        uEXPIRE(RR%t	timedeltaR#t
total_secondsR(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytexpire0scCsCt|tj�r0ttj|j���}n|jd||�S(u�
        Set an expire flag on key ``name``. ``when`` can be represented
        as an integer indicating unix time or a Python datetime object.
        uEXPIREAT(RR%R#tmod_timetmktimet	timetupleR(R6Rhtwhen((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytexpireat9scCs|jd|�S(uT
        Return the value at key ``name``, or None if the key doesn't exist
        uGET(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR?BscCs/|j|�}|dk	r|St|��dS(ug
        Return the value at key ``name``, raises a KeyError if the key
        doesn't exist.
        N(R?R"tKeyError(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR>HscCs|jd||�S(u@Returns a boolean indicating the value of ``offset`` in ``name``uGETBIT(R(R6Rhtoffset((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgetbitRscCs|jd|||�S(u�
        Returns the substring of the string value stored at ``key``,
        determined by the offsets ``start`` and ``end`` (both are inclusive)
        uGETRANGE(R(R6RZR�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgetrangeVscCs|jd||�S(u{
        Sets the value at key ``name`` to ``value``
        and returns the old value at key ``name`` atomically.
        uGETSET(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgetset]scCs|j||�S(u�
        Increments the value of ``key`` by ``amount``.  If no key exists,
        the value will be initialized as ``amount``
        (tincrby(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytincrdscCs|jd||�S(u�
        Increments the value of ``key`` by ``amount``.  If no key exists,
        the value will be initialized as ``amount``
        uINCRBY(R(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�ksg�?cCs|jd||�S(u�
        Increments the value at key ``name`` by floating ``amount``.
        If no key exists, the value will be initialized as ``amount``
        uINCRBYFLOAT(R(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytincrbyfloattscCs|jd|�S(u+Returns a list of keys matching ``pattern``uKEYS(R(R6RP((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR{scGs;t||�}i}|s(g|t<n|jd||�S(uJ
        Returns a list of values ordered identically to ``keys``
        uMGET(R!RR(R6RR Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmgets

cCs:g}x!t|�D]}|j|�qW|jd|�S(u�
        Sets key/values based on a mapping. Mapping is a dictionary of
        key/value pairs. Both keys and values should be strings or types that
        can be cast to a string via str().
        uMSET(RRR(R6tmappingtitemsR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmset�scCs:g}x!t|�D]}|j|�qW|jd|�S(u3
        Sets key/values based on a mapping if none of the keys are already set.
        Mapping is a dictionary of key/value pairs. Both keys and values
        should be strings or types that can be cast to a string via str().
        Returns a boolean indicating if the operation was successful.
        uMSETNX(RRR(R6R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmsetnx�scCs|jd||�S(u;Moves the key ``name`` to a different Redis database ``db``uMOVE(R(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmove�scCs|jd|�S(u!Removes an expiration on ``name``uPERSIST(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpersist�scCs>t|tj�r+t|j�d�}n|jd||�S(u�
        Set an expire flag on key ``name`` for ``time`` milliseconds.
        ``time`` can be represented by an integer or a Python timedelta
        object.
        i�uPEXPIRE(RR%R�R#R�R(R6RhR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpexpire�scCs^t|tj�rKt|jd�}ttj|j���d|}n|jd||�S(u�
        Set an expire flag on key ``name``. ``when`` can be represented
        as an integer representing unix time in milliseconds (unix time * 1000)
        or a Python datetime object.
        i�u	PEXPIREAT(RR%R#tmicrosecondR�R�R�R(R6RhR�tms((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	pexpireat�s&cCsAt|tj�r+t|j�d�}n|jd|||�S(u�
        Set the value of key ``name`` to ``value`` that expires in ``time_ms``
        milliseconds. ``time_ms`` can be represented by an integer or a Python
        timedelta object
        i�uPSETEX(RR%R�R#R�R(R6Rhttime_msRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpsetex�scCs|jd|�S(uEReturns the number of milliseconds until the key ``name`` will expireuPTTL(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpttl�scCs
|jd�S(u Returns the name of a random keyu	RANDOMKEY(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	randomkey�scCs|jd||�S(u/
        Rename key ``src`` to ``dst``
        uRENAME(R(R6tsrctdst((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrename�scCs|jd||�S(u>Rename key ``src`` to ``dst`` if ``dst`` doesn't already existuRENAMENX(R(R6R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrenamenx�scCs5|||g}|r%|jd�n|jd|�S(uk
        Create a key using the provided serialized value, previously obtained
        using DUMP.
        uREPLACEuRESTORE(RWR(R6RhtttlRORfR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrestore�sc	Cs||g}|dk	r\|jd�t|tj�rLt|j��}n|j|�n|dk	r�|jd�t|tj�r�t|j�d�}n|j|�n|r�|jd�n|r�|jd�n|r�|jd�n|jd|�S(	u,
        Set the value at key ``name`` to ``value``

        ``ex`` sets an expire flag on key ``name`` for ``ex`` seconds.

        ``px`` sets an expire flag on key ``name`` for ``px`` milliseconds.

        ``nx`` if set to True, set the value at key ``name`` to ``value`` only
            if it does not exist.

        ``xx`` if set to True, set the value at key ``name`` to ``value`` only
            if it already exists.

        ``keepttl`` if True, retain the time to live associated with the key.
            (Available since Redis 6.0)
        uEXuPXi�uNXuXXuKEEPTTLuSETN(R"RWRR%R�R#R�R(	R6RhROtextpxtnxtxxtkeepttlR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRe�s$

cCs|j||�dS(N(Re(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRAscCs(|rdpd}|jd|||�S(u�
        Flag the ``offset`` in ``name`` as ``value``. Returns a boolean
        indicating the previous value of ``offset``.
        iiuSETBIT(R(R6RhR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsetbitscCs=t|tj�r't|j��}n|jd|||�S(u�
        Set the value of key ``name`` to ``value`` that expires in ``time``
        seconds. ``time`` can be represented by an integer or a Python
        timedelta object.
        uSETEX(RR%R�R#R�R(R6RhR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsetexscCs|jd||�S(u?Set the value of key ``name`` to ``value`` if key doesn't existuSETNX(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsetnx scCs|jd|||�S(u�
        Overwrite bytes in the value of ``name`` starting at ``offset`` with
        ``value``. If ``offset`` plus the length of ``value`` exceeds the
        length of the original value, the new value will be larger than before.
        If ``offset`` exceeds the length of the original value, null bytes
        will be used to pad between the end of the previous value and the start
        of what's being injected.

        Returns the length of the new string.
        uSETRANGE(R(R6RhR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsetrange$scCs|jd|�S(u:Return the number of bytes stored in the value of ``name``uSTRLEN(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytstrlen1si����cCs|jd|||�S(u�
        Return a substring of the string at key ``name``. ``start`` and ``end``
        are 0-based integers specifying the portion of the string to return.
        uSUBSTR(R(R6RhR�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsubstr5scGs|jd|�S(us
        Alters the last access time of a key(s) ``*args``. A key is ignored
        if it does not exist.
        uTOUCH(R(R6R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyttouch<scCs|jd|�S(u@Returns the number of seconds until the key ``name`` will expireuTTL(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�CscCs|jd|�S(u Returns the type of key ``name``uTYPE(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�GscGstjtd��dS(uX
        Watches the values at keys ``names``, or None if the key doesn't exist
        u!Call WATCH from a Pipeline objectN(R�R�R�(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�KscCstjtd��dS(uW
        Unwatches the value at key ``name``, or None of the key doesn't exist
        u#Call UNWATCH from a Pipeline objectN(R�R�R�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytunwatchQscGs|jd|�S(u.Unlink one or more keys specified by ``names``uUNLINK(R(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytunlinkXscCsA|dkrd}nt|d�}|j|�|jd|�S(u=
        LPOP a value off of the first non-empty list
        named in the ``keys`` list.

        If none of the lists in ``keys`` has a value to LPOP, then block
        for ``timeout`` seconds, or until a value gets pushed on to one
        of the lists.

        If timeout is 0, then block indefinitely.
        iuBLPOPN(R"R!RWR(R6RR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytblpop]s
	
cCsA|dkrd}nt|d�}|j|�|jd|�S(u=
        RPOP a value off of the first non-empty list
        named in the ``keys`` list.

        If none of the lists in ``keys`` has a value to RPOP, then block
        for ``timeout`` seconds, or until a value gets pushed on to one
        of the lists.

        If timeout is 0, then block indefinitely.
        iuBRPOPN(R"R!RWR(R6RR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbrpopns
	
cCs+|dkrd}n|jd|||�S(u
        Pop a value off the tail of ``src``, push it on the head of ``dst``
        and then return it.

        This command blocks until a value is in ``src`` or until ``timeout``
        seconds elapse, whichever is first. A ``timeout`` value of 0 blocks
        forever.
        iu
BRPOPLPUSHN(R"R(R6R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
brpoplpushs		cCs|jd||�S(u�
        Return the item from list ``name`` at position ``index``

        Negative indexes are supported and will return an item at the
        end of the list
        uLINDEX(R(R6Rhtindex((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlindex�scCs|jd||||�S(u�
        Insert ``value`` in list ``name`` either immediately before or after
        [``where``] ``refvalue``

        Returns the new length of the list on success or -1 if ``refvalue``
        is not in the list.
        uLINSERT(R(R6RhtwheretrefvalueRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlinsert�scCs|jd|�S(u&Return the length of the list ``name``uLLEN(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytllen�scCs|jd|�S(u5Remove and return the first item of the list ``name``uLPOP(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlpop�scGs|jd||�S(u2Push ``values`` onto the head of the list ``name``uLPUSH(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlpush�scCs|jd||�S(uDPush ``value`` onto the head of the list ``name`` if ``name`` existsuLPUSHX(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlpushx�scCs|jd|||�S(u�
        Return a slice of the list ``name`` between
        position ``start`` and ``end``

        ``start`` and ``end`` can be negative numbers just like
        Python slicing notation
        uLRANGE(R(R6RhR�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlrange�scCs|jd|||�S(u�
        Remove the first ``count`` occurrences of elements equal to ``value``
        from the list stored at ``name``.

        The count argument influences the operation in the following ways:
            count > 0: Remove elements equal to value moving from head to tail.
            count < 0: Remove elements equal to value moving from tail to head.
            count = 0: Remove all elements equal to value.
        uLREM(R(R6RhtcountRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlrem�s
cCs|jd|||�S(u.Set ``position`` of list ``name`` to ``value``uLSET(R(R6RhR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlset�scCs|jd|||�S(u�
        Trim the list ``name``, removing all values not within the slice
        between ``start`` and ``end``

        ``start`` and ``end`` can be negative numbers just like
        Python slicing notation
        uLTRIM(R(R6RhR�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytltrim�scCs|jd|�S(u4Remove and return the last item of the list ``name``uRPOP(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrpop�scCs|jd||�S(u�
        RPOP a value off of the ``src`` list and atomically LPUSH it
        on to the ``dst`` list.  Returns the value.
        u	RPOPLPUSH(R(R6R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	rpoplpush�scGs|jd||�S(u2Push ``values`` onto the tail of the list ``name``uRPUSH(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrpush�scCs|jd||�S(uDPush ``value`` onto the tail of the list ``name`` if ``name`` existsuRPUSHX(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytrpushx�sc

Cs�|dk	r|dks0|dk	r?|dkr?td��n|g}
|dk	rq|
jd�|
j|�n|dk	r�|dk	r�|
jd�|
j|�|
j|�n|dk	rt|ttf�r�|
jd�|
j|�qx+|D] }|
jd�|
j|�q�Wn|r5|
jd�n|rK|
jd�n|dk	rt|
jd�|
j|�n|	r�|s�t|ttf�s�t|�dkr�td	��q�ni|	r�t|�ndd
6}|jd|
|�S(
u�
        Sort and return the list, set or sorted set at ``name``.

        ``start`` and ``num`` allow for paging through the sorted data

        ``by`` allows using an external key to weight and sort the items.
            Use an "*" to indicate where in the key the item value is located

        ``get`` allows for returning items from external keys rather than the
            sorted data itself.  Use an "*" to indicate where in the key
            the item value is located

        ``desc`` allows for reversing the sort

        ``alpha`` allows for sorting lexicographically rather than numerically

        ``store`` allows for storing the result of the sort into
            the key ``store``

        ``groups`` if set to True and if ``get`` contains at least two
            elements, sort will return a list of tuples, each containing the
            values fetched from the arguments to ``get``.

        u,``start`` and ``num`` must both be specifiedtBYtLIMITtGETtDESCtALPHAtSTOREiuVwhen using "groups" the "get" argument must be specified and contain at least two keysugroupsuSORTN(R"RRWRRRtlenR(
R6RhR�R�tbyR?tdesctalphatstoretgroupsRtgRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsort�s<	






.cCs|g}|dk	r+|jd|g�n|dk	rM|jd|g�n|dk	ro|jd|g�n|jd|�S(u
        Incrementally return lists of key names. Also return a cursor
        indicating the scan position.

        ``match`` allows for filtering the keys by pattern

        ``count`` provides a hint to Redis about the number of keys to
            return per batch.

        ``_type`` filters the returned values by a particular Redis type.
            Stock Redis instances allow for the following types:
            HASH, LIST, SET, STREAM, STRING, ZSET
            Additionally, Redis modules can expose other types as well.
        tMATCHtCOUNTR9uSCANN(R"RR(R6R�tmatchR�RBR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytscan*s	c	cs]d}xP|dkrX|jd|d|d|d|�\}}x|D]}|VqFWq	WdS(u*
        Make an iterator using the SCAN command so that the client doesn't
        need to remember the cursor position.

        ``match`` allows for filtering the keys by pattern

        ``count`` provides a hint to Redis about the number of keys to
            return per batch.

        ``_type`` filters the returned values by a particular Redis type.
            Stock Redis instances allow for the following types:
            HASH, LIST, SET, STREAM, STRING, ZSET
            Additionally, Redis modules can expose other types as well.
        u0iR�R�R�RBN(R�(R6R�R�RBR�R7RQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	scan_iterBs
cCs`||g}|dk	r.|jd|g�n|dk	rP|jd|g�n|jd|�S(u�
        Incrementally return lists of elements in a set. Also return a cursor
        indicating the scan position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns
        R�R�uSSCANN(R"RR(R6RhR�R�R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsscanXs	ccsZd}xM|dkrU|j|d|d|d|�\}}x|D]}|VqCWq	WdS(u
        Make an iterator using the SSCAN command so that the client doesn't
        need to remember the cursor position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns
        u0iR�R�R�N(R�(R6RhR�R�R�R7RQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
sscan_iterhs	
cCs`||g}|dk	r.|jd|g�n|dk	rP|jd|g�n|jd|�S(u�
        Incrementally return key/value slices in a hash. Also return a cursor
        indicating the scan position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns
        R�R�uHSCANN(R"RR(R6RhR�R�R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythscanxs	ccs`d}xS|dkr[|j|d|d|d|�\}}x|j�D]}|VqIWq	WdS(u
        Make an iterator using the HSCAN command so that the client doesn't
        need to remember the cursor position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns
        u0iR�R�R�N(R�R�(R6RhR�R�R�R7RQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
hscan_iter�s	cCsp||g}|dk	r.|jd|g�n|dk	rP|jd|g�ni|d6}|jd||�S(uM
        Incrementally return lists of elements in a sorted set. Also return a
        cursor indicating the scan position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns

        ``score_cast_func`` a callable used to cast the score return value
        R�R�uscore_cast_funcuZSCANN(R"RR(R6RhR�R�R�RvRRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzscan�s
c
cs`d}xS|dkr[|j|d|d|d|d|�\}}x|D]}|VqIWq	WdS(uL
        Make an iterator using the ZSCAN command so that the client doesn't
        need to remember the cursor position.

        ``match`` allows for filtering the keys by pattern

        ``count`` allows for hint the minimum number of returns

        ``score_cast_func`` a callable used to cast the score return value
        u0iR�R�R�RvN(R�(R6RhR�R�RvR�R7RQ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
zscan_iter�s
cGs|jd||�S(u Add ``value(s)`` to set ``name``uSADD(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsadd�scCs|jd|�S(u-Return the number of elements in set ``name``uSCARD(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytscard�scGst||�}|jd|�S(u3Return the difference of sets specified by ``keys``uSDIFF(R!R(R6RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsdiff�scGs"t||�}|jd||�S(u�
        Store the difference of sets specified by ``keys`` into a new
        set named ``dest``.  Returns the number of keys in the new set.
        u
SDIFFSTORE(R!R(R6R�RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
sdiffstore�scGst||�}|jd|�S(u5Return the intersection of sets specified by ``keys``uSINTER(R!R(R6RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsinter�scGs"t||�}|jd||�S(u�
        Store the intersection of sets specified by ``keys`` into a new
        set named ``dest``.  Returns the number of keys in the new set.
        uSINTERSTORE(R!R(R6R�RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsinterstore�scCs|jd||�S(uDReturn a boolean indicating if ``value`` is a member of set ``name``u	SISMEMBER(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	sismember�scCs|jd|�S(u&Return all members of the set ``name``uSMEMBERS(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsmembers�scCs|jd|||�S(u9Move ``value`` from set ``src`` to set ``dst`` atomicallyuSMOVE(R(R6R�R�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsmove�scCs.|dk	r|gpg}|jd||�S(u1Remove and return a random member of set ``name``uSPOPN(R"R(R6RhR�R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytspop�scCs.|dk	r|gpg}|jd||�S(u�
        If ``number`` is None, returns a random member of set ``name``.

        If ``number`` is supplied, returns a list of ``number`` random
        members of set ``name``. Note this is only available when running
        Redis 2.6+.
        uSRANDMEMBERN(R"R(R6RhtnumberR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsrandmember�scGs|jd||�S(u#Remove ``values`` from set ``name``uSREM(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsrem�scGst||�}|jd|�S(u.Return the union of sets specified by ``keys``uSUNION(R!R(R6RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsunion	scGs"t||�}|jd||�S(u�
        Store the union of sets specified by ``keys`` into a new
        set named ``dest``.  Returns the number of keys in the new set.
        uSUNIONSTORE(R!R(R6R�RR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytsunionstore	scGs|jd|||�S(u�
        Acknowledges the successful processing of one or more messages.
        name: name of the stream.
        groupname: name of the consumer group.
        *ids: message ids to acknowlege.
        uXACK(R(R6Rht	groupnametids((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxack	scCs�g}|dk	r|t|ttf�s4|dkrCtd��n|jd�|rf|jd�n|jt|��n|j|�t|t�s�t|�dkr�td��nx!t	|�D]}|j
|�q�W|jd||�S(	uW
        Add to a stream.
        name: name of the stream
        fields: dict of field/value pairs to insert into the stream
        id: Location to insert this record. By default it is appended.
        maxlen: truncate old stream members beyond this size
        approximate: actual stream length may be slightly more than maxlen

        iu&XADD maxlen must be a positive integertMAXLENt~iu$XADD fields must be a non-empty dictuXADDN(R"RR#RRRWR?R)R�RRR(R6RhtfieldstidtmaxlentapproximateRR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxadd	s
"

"c
Cs�t|ttf�s"|dkr1td��nt|ttf�sN|r]td��ni}|||t|�g}|jt|��|dk	r�t|ttf�s�td��n|jdt|�f�n|dk	r&t|ttf�s
td��n|jdt|�f�n|dk	rrt|ttf�sVtd��n|jd	t|�f�n|	r�t|	t	�s�td
��n|j
d�n|
r�t|
t	�s�td��n|j
d
�t|d<n|jd||�S(u�
        Changes the ownership of a pending message.
        name: name of the stream.
        groupname: name of the consumer group.
        consumername: name of a consumer that claims the message.
        min_idle_time: filter messages that were idle less than this amount of
        milliseconds
        message_ids: non-empty list or tuple of message IDs to claim
        idle: optional. Set the idle time (last time it was delivered) of the
         message in ms
        time: optional integer. This is the same as idle but instead of a
         relative amount of milliseconds, it sets the idle time to a specific
         Unix time (in milliseconds).
        retrycount: optional integer. set the retry counter to the specified
         value. This counter is incremented every time a message is delivered
         again.
        force: optional boolean, false by default. Creates the pending message
         entry in the PEL even if certain specified IDs are not already in the
         PEL assigned to a different client.
        justid: optional boolean, false by default. Return just an array of IDs
         of messages successfully claimed, without returning the actual message
        iu3XCLAIM min_idle_time must be a non negative integeruLXCLAIM message_ids must be a non empty list or tuple of message IDs to claimuXCLAIM idle must be an integertIDLEuXCLAIM time must be an integertTIMEu$XCLAIM retrycount must be an integert
RETRYCOUNTuXCLAIM force must be a booleantFORCEuXCLAIM justid must be a booleantJUSTIDuparse_justiduXCLAIMN(
RR#RRRR�R?RR"R�RWR_R(
R6RhRtconsumernamet
min_idle_timetmessage_idstidleR�t
retrycountR%tjustidR`R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxclaim3	s:"

cGs|jd||�S(u�
        Deletes one or more messages from a stream.
        name: name of the stream.
        *ids: message ids to delete.
        uXDEL(R(R6RhR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxdelo	su$cCs5d|||g}|r(|jd�n|j|�S(u�
        Create a new consumer group associated with a stream.
        name: name of the stream.
        groupname: name of the consumer group.
        id: ID of the last item in the stream to consider already delivered.
        u
XGROUP CREATEtMKSTREAM(RWR(R6RhRRtmkstreamR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
xgroup_createw	scCs|jd|||�S(u)
        Remove a specific consumer from a consumer group.
        Returns the number of pending messages that the consumer had before it
        was deleted.
        name: name of the stream.
        groupname: name of the consumer group.
        consumername: name of consumer to delete
        uXGROUP DELCONSUMER(R(R6RhRR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxgroup_delconsumer�	s	cCs|jd||�S(u|
        Destroy a consumer group.
        name: name of the stream.
        groupname: name of the consumer group.
        uXGROUP DESTROY(R(R6RhR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxgroup_destroy�	scCs|jd|||�S(u�
        Set the consumer group last delivered ID to something else.
        name: name of the stream.
        groupname: name of the consumer group.
        id: ID of the last item in the stream to consider already delivered.
        uXGROUP SETID(R(R6RhRR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxgroup_setid�	scCs|jd||�S(u�
        Returns general information about the consumers in the group.
        name: name of the stream.
        groupname: name of the consumer group.
        uXINFO CONSUMERS(R(R6RhR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxinfo_consumers�	scCs|jd|�S(ux
        Returns general information about the consumer groups of the stream.
        name: name of the stream.
        uXINFO GROUPS(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxinfo_groups�	scCs|jd|�S(ua
        Returns general information about the stream.
        name: name of the stream.
        uXINFO STREAM(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxinfo_stream�	scCs|jd|�S(uC
        Returns the number of elements in a given stream.
        uXLEN(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxlen�	scCs|jd||�S(u�
        Returns information about pending messages of a group.
        name: name of the stream.
        groupname: name of the consumer group.
        uXPENDING(R(R6RhR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxpending�	scCs||g}|dk	s0|dk	s0|dk	r�|dksT|dksT|dkrctd��nt|ttf�s�|dkr�td��n|j||t|�f�n|dk	r|dks�|dks�|dkr�td��n|j|�n|jddt	|�S(uH
        Returns information about pending messages, in a range.
        name: name of the stream.
        groupname: name of the consumer group.
        min: minimum stream ID.
        max: maximum stream ID.
        count: number of messages to return
        consumername: name of a consumer to filter by (optional).
        uOXPENDING must be provided with min, max and count parameters, or none of them. i����u&XPENDING count must be a integer >= -1uaif XPENDING is provided with consumername, it must be provided with min, max and count parametersuXPENDINGtparse_detailN(
R"RRR#RRR?RWRR_(R6RhRtmintmaxR�RR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxpending_range�	s$$"$u-u+cCs||g}|dk	rlt|ttf�s:|dkrItd��n|jd�|jt|��n|jd||�S(u�
        Read stream values within an interval.
        name: name of the stream.
        start: first stream ID. defaults to '-',
               meaning the earliest available.
        finish: last stream ID. defaults to '+',
                meaning the latest available.
        count: if set, only return this many items, beginning with the
               earliest available.
        iu'XRANGE count must be a positive integerR�uXRANGEN(R"RR#RRRWR?R(R6RhR.R/R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxrange�	s"
cCsFg}|d
k	rft|ttf�s4|dkrCtd��n|jd�|jt|��n|d
k	r�t|ttf�s�|dkr�td��n|jd�|jt|��nt|t�s�t|�dkr�td��n|jd�t	t
|��\}}|j|�|j|�|jd	|�S(un
        Block and monitor multiple streams for new data.
        streams: a dict of stream names to stream IDs, where
                   IDs indicate the last ID already seen.
        count: if set, only return this many items, beginning with the
               earliest available.
        block: number of milliseconds to wait, if nothing already present.
        iu*XREAD block must be a non-negative integertBLOCKiu&XREAD count must be a positive integerR�u&XREAD streams must be a non empty dicttSTREAMSuXREADN(
R"RR#RRRWR?R)R�RRRR(R6tstreamsR�tblockRRRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxread�	s$	"
"
"


cCsYd||g}|dk	rot|ttf�s=|dkrLtd��n|jd�|jt|��n|dk	r�t|ttf�s�|dkr�td��n|jd�|jt|��n|r�|jd�nt|t�st|�dkrtd	��n|jd
�|j	|j
��|j	|j��|jd|�S(
u�
        Read from a stream via a consumer group.
        groupname: name of the consumer group.
        consumername: name of the requesting consumer.
        streams: a dict of stream names to stream IDs, where
               IDs indicate the last ID already seen.
        count: if set, only return this many items, beginning with the
               earliest available.
        block: number of milliseconds to wait, if nothing already present.
        noack: do not add messages to the PEL
        tGROUPiu+XREADGROUP count must be a positive integerR�iu/XREADGROUP block must be a non-negative integerR2tNOACKu+XREADGROUP streams must be a non empty dictR3u
XREADGROUPN(
R"RR#RRRWR?R)R�RRRqR(R6RRR4R�R5tnoackR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
xreadgroup
s&
"
"
"
cCs||g}|dk	rlt|ttf�s:|dkrItd��n|jd�|jt|��n|jd||�S(u�
        Read stream values within an interval, in reverse order.
        name: name of the stream
        start: first stream ID. defaults to '+',
               meaning the latest available.
        finish: last stream ID. defaults to '-',
                meaning the earliest available.
        count: if set, only return this many items, beginning with the
               latest available.
        iu*XREVRANGE count must be a positive integerR�u	XREVRANGEN(R"RR#RRRWR?R(R6RhR/R.R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	xrevrange1
s"
cCs?dg}|r|jd�n|j|�|jd||�S(u�
        Trims old messages from a stream.
        name: name of the stream.
        maxlen: truncate old stream messages beyond this size
        approximate: actual stream length may be slightly more than maxlen
        RRuXTRIM(RWR(R6RhRRR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytxtrimE
s
	
c
Cs|std��n|r0|r0td��n|rWt|�dkrWtd��ng}i}|ry|jd�n|r�|jd�n|r�|jd�n|r�|jd�t|d	<nx6t|�D](}	|j|	d�|j|	d
�q�W|jd|||�S(u
        Set any number of element-name, score pairs to the key ``name``. Pairs
        are specified as a dict of element-names keys to score values.

        ``nx`` forces ZADD to only create new elements and not to update
        scores for elements that already exist.

        ``xx`` forces ZADD to only update scores of elements that already
        exist. New elements will not be added.

        ``ch`` modifies the return value to be the numbers of elements changed.
        Changed elements include new elements that were added and elements
        whose scores changed.

        ``incr`` modifies ZADD to behave like ZINCRBY. In this mode only a
        single element/score pair can be specified and the score is the amount
        the existing score will be incremented by. When using this mode the
        return value of ZADD will be the new score of the element.

        The return value of ZADD varies based on the mode specified. With no
        options, ZADD returns the number of new elements added to the sorted
        set.
        u-ZADD requires at least one element/score pairu)ZADD allows either 'nx' or 'xx', not bothiuFZADD option 'incr' only works when passing a single element/score pairtNXtXXtCHtINCRuas_scoreiuZADD(RR�RWR_RR(
R6RhR�R�R�tchR�RRuR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzaddS
s*

cCs|jd|�S(u8Return the number of elements in the sorted set ``name``uZCARD(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzcard�
scCs|jd|||�S(u�
        Returns the number of elements in the sorted set at key ``name`` with
        a score between ``min`` and ``max``.
        uZCOUNT(R(R6RhR.R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzcount�
scCs|jd|||�S(uEIncrement the score of ``value`` in sorted set ``name`` by ``amount``uZINCRBY(R(R6RhR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzincrby�
scCs|jd|||�S(u�
        Intersect multiple sorted sets specified by ``keys`` into
        a new sorted set, ``dest``. Scores in the destination will be
        aggregated based on the ``aggregate``, or SUM if none is provided.
        uZINTERSTORE(t_zaggregate(R6R�Rt	aggregate((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzinterstore�
scCs|jd|||�S(u�
        Return the number of items in the sorted set ``name`` between the
        lexicographical range ``min`` and ``max``.
        u	ZLEXCOUNT(R(R6RhR.R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	zlexcount�
scCs>|dk	r|gpg}itd6}|jd|||�S(uy
        Remove and return up to ``count`` members with the highest scores
        from the sorted set ``name``.
        u
withscoresuZPOPMAXN(R"R_R(R6RhR�R Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzpopmax�
s
cCs>|dk	r|gpg}itd6}|jd|||�S(ux
        Remove and return up to ``count`` members with the lowest scores
        from the sorted set ``name``.
        u
withscoresuZPOPMINN(R"R_R(R6RhR�R Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzpopmin�
s
cCsA|dkrd}nt|d�}|j|�|jd|�S(uR
        ZPOPMAX a value off of the first non-empty sorted set
        named in the ``keys`` list.

        If none of the sorted sets in ``keys`` has a value to ZPOPMAX,
        then block for ``timeout`` seconds, or until a member gets added
        to one of the sorted sets.

        If timeout is 0, then block indefinitely.
        iuBZPOPMAXN(R"R!RWR(R6RR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbzpopmax�
s
	
cCsA|dkrd}nt|d�}|j|�|jd|�S(uR
        ZPOPMIN a value off of the first non-empty sorted set
        named in the ``keys`` list.

        If none of the sorted sets in ``keys`` has a value to ZPOPMIN,
        then block for ``timeout`` seconds, or until a member gets added
        to one of the sorted sets.

        If timeout is 0, then block indefinitely.
        iuBZPOPMINN(R"R!RWR(R6RR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytbzpopmin�
s
	
c	Csk|r|j|||||�Sd|||g}|rG|jd�ni|d6|d6}|j||�S(u�
        Return a range of values from sorted set ``name`` between
        ``start`` and ``end`` sorted in ascending order.

        ``start`` and ``end`` can be negative, indicating the end of the range.

        ``desc`` a boolean indicating whether to sort the results descendingly

        ``withscores`` indicates to return the scores along with the values.
        The return type is a list of (value, score) pairs

        ``score_cast_func`` a callable used to cast the score return value
        uZRANGEt
WITHSCORESu
withscoresuscore_cast_func(t	zrevrangeRWR(	R6RhR�R�R�t
withscoresRvRRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrange�
s
cCs�|dk	r|dks0|dk	r?|dkr?td��nd|||g}|dk	r�|dk	r�|jd||g�n|j|�S(u�
        Return the lexicographical range of values from sorted set ``name``
        between ``min`` and ``max``.

        If ``start`` and ``num`` are specified, then return a slice of the
        range.
        u,``start`` and ``num`` must both be specifieduZRANGEBYLEXR�N(R"RRR(R6RhR.R/R�R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrangebylex�
scCs�|dk	r|dks0|dk	r?|dkr?td��nd|||g}|dk	r�|dk	r�|jd||g�n|j|�S(u�
        Return the reversed lexicographical range of values from sorted set
        ``name`` between ``max`` and ``min``.

        If ``start`` and ``num`` are specified, then return a slice of the
        range.
        u,``start`` and ``num`` must both be specifieduZREVRANGEBYLEXR�N(R"RRR(R6RhR/R.R�R�R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrevrangebylexsc
Cs�|dk	r|dks0|dk	r?|dkr?td��nd|||g}|dk	r�|dk	r�|jd||g�n|r�|jd�ni|d6|d6}	|j||	�S(u�
        Return a range of values from the sorted set ``name`` with scores
        between ``min`` and ``max``.

        If ``start`` and ``num`` are specified, then return a slice
        of the range.

        ``withscores`` indicates to return the scores along with the values.
        The return type is a list of (value, score) pairs

        `score_cast_func`` a callable used to cast the score return value
        u,``start`` and ``num`` must both be specifiedu
ZRANGEBYSCORER�RNu
withscoresuscore_cast_funcN(R"RRRWR(
R6RhR.R/R�R�RPRvRRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
zrangebyscores
cCs|jd||�S(ui
        Returns a 0-based value indicating the rank of ``value`` in sorted set
        ``name``
        uZRANK(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrank/scGs|jd||�S(u1Remove member ``values`` from sorted set ``name``uZREM(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrem6scCs|jd|||�S(u�
        Remove all elements in the sorted set ``name`` between the
        lexicographical range specified by ``min`` and ``max``.

        Returns the number of elements removed.
        uZREMRANGEBYLEX(R(R6RhR.R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzremrangebylex:scCs|jd|||�S(u
        Remove all elements in the sorted set ``name`` with ranks between
        ``min`` and ``max``. Values are 0-based, ordered from smallest score
        to largest. Values can be negative indicating the highest scores.
        Returns the number of elements removed
        uZREMRANGEBYRANK(R(R6RhR.R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzremrangebyrankCscCs|jd|||�S(u�
        Remove all elements in the sorted set ``name`` with scores
        between ``min`` and ``max``. Returns the number of elements removed.
        uZREMRANGEBYSCORE(R(R6RhR.R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzremrangebyscoreLscCsLd|||g}|r(|jd�ni|d6|d6}|j||�S(u�
        Return a range of values from sorted set ``name`` between
        ``start`` and ``end`` sorted in descending order.

        ``start`` and ``end`` can be negative, indicating the end of the range.

        ``withscores`` indicates to return the scores along with the values
        The return type is a list of (value, score) pairs

        ``score_cast_func`` a callable used to cast the score return value
        u	ZREVRANGERNu
withscoresuscore_cast_func(RWR(R6RhR�R�RPRvRRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyROSs

c
Cs�|dk	r|dks0|dk	r?|dkr?td��nd|||g}|dk	r�|dk	r�|jd||g�n|r�|jd�ni|d6|d6}	|j||	�S(u�
        Return a range of values from the sorted set ``name`` with scores
        between ``min`` and ``max`` in descending order.

        If ``start`` and ``num`` are specified, then return a slice
        of the range.

        ``withscores`` indicates to return the scores along with the values.
        The return type is a list of (value, score) pairs

        ``score_cast_func`` a callable used to cast the score return value
        u,``start`` and ``num`` must both be specifieduZREVRANGEBYSCORER�RNu
withscoresuscore_cast_funcN(R"RRRWR(
R6RhR/R.R�R�RPRvRRu((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrevrangebyscoreis
cCs|jd||�S(ut
        Returns a 0-based value indicating the descending rank of
        ``value`` in sorted set ``name``
        uZREVRANK(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzrevrank�scCs|jd||�S(u<Return the score of element ``value`` in sorted set ``name``uZSCORE(R(R6RhRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzscore�scCs|jd|||�S(u�
        Union multiple sorted sets specified by ``keys`` into
        a new sorted set, ``dest``. Scores in the destination will be
        aggregated based on the ``aggregate``, or SUM if none is provided.
        uZUNIONSTORE(RF(R6R�RRG((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytzunionstore�scCs�||t|�g}t|t�r@t|�t|�}}nd}|j|�|rv|jd�|j|�n|r�|jd�|j|�n|j|�S(NtWEIGHTSt	AGGREGATE(	R�RR)RRR"RRWR(R6R�R�RRGRtweights((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRF�s


cGs|jd||�S(u9Adds the specified elements to the specified HyperLogLog.uPFADD(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpfadd�scGs|jd|�S(uo
        Return the approximated cardinality of
        the set observed by the HyperLogLog at key(s).
        uPFCOUNT(R(R6tsources((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpfcount�scGs|jd||�S(u1Merge N different HyperLogLogs into a single one.uPFMERGE(R(R6R�Rb((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpfmerge�scGs|jd||�S(u"Delete ``keys`` from hash ``name``uHDEL(R(R6RhR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythdel�scCs|jd||�S(uCReturns a boolean indicating if ``key`` exists within hash ``name``uHEXISTS(R(R6RhRZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythexists�scCs|jd||�S(u4Return the value of ``key`` within the hash ``name``uHGET(R(R6RhRZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythget�scCs|jd|�S(u3Return a Python dict of the hash's name/value pairsuHGETALL(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythgetall�scCs|jd|||�S(u=Increment the value of ``key`` in hash ``name`` by ``amount``uHINCRBY(R(R6RhRZR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythincrby�scCs|jd|||�S(uX
        Increment the value of ``key`` in hash ``name`` by floating ``amount``
        uHINCRBYFLOAT(R(R6RhRZR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythincrbyfloat�scCs|jd|�S(u,Return the list of keys within hash ``name``uHKEYS(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythkeys�scCs|jd|�S(u.Return the number of elements in hash ``name``uHLEN(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythlen�scCs�|dkr"|r"td��ng}|dk	rJ|j||f�n|rwx$|j�D]}|j|�q]Wn|jd||�S(u�
        Set ``key`` to ``value`` within hash ``name``,
        ``mapping`` accepts a dict of key/value pairs that that will be
        added to hash ``name``.
        Returns the number of fields that were added.
        u'hset' with no key value pairsuHSETN(R"RRR�R(R6RhRZROR�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythset�scCs|jd|||�S(u�
        Set ``key`` to ``value`` within hash ``name`` if ``key`` does not
        exist.  Returns 1 if HSETNX created a field, otherwise 0.
        uHSETNX(R(R6RhRZRO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythsetnx�scCs~tjd|jj|jjftdd�|sAtd��ng}x!t|�D]}|j|�qTW|jd||�S(u
        Set key to value within hash ``name`` for each corresponding
        key and value from the ``mapping`` dict.
        u0%s.hmset() is deprecated. Use %s.hset() instead.t
stackleveliu"'hmset' with 'mapping' of length 0uHMSET(	R�R�R�RBR�RRRR(R6RhR�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythmset�scGs"t||�}|jd||�S(u8Returns a list of values ordered identically to ``keys``uHMGET(R!R(R6RhRR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythmgetscCs|jd|�S(u.Return the list of values within hash ``name``uHVALS(R(R6Rh((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythvals
scCs|jd||�S(uh
        Return the number of bytes stored in the value of ``key``
        within hash ``name``
        uHSTRLEN(R(R6RhRZ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pythstrlenscCs|jd||�S(u}
        Publish ``message`` on ``channel``.
        Returns the number of subscribers the message was delivered to.
        uPUBLISH(R(R6tchanneltmessage((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpublishscCs|jd|�S(uM
        Return a list of channels that have at least one subscriber
        uPUBSUB CHANNELS(R(R6RP((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpubsub_channelsscCs
|jd�S(uA
        Returns the number of subscriptions to patterns
        u
PUBSUB NUMPAT(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
pubsub_numpat"scGs|jd|�S(uv
        Return a list of (channel, number of subscribers) tuples
        for each channel given in ``*args``
        u
PUBSUB NUMSUB(R(R6R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
pubsub_numsub(scGs|jd|j�|�S(Nu
CLUSTER %s(RR5(R6tcluster_argR ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytcluster/scGs|jd|||�S(uP
        Execute the Lua ``script``, specifying the ``numkeys`` the script
        will touch and the key names and argument values in ``keys_and_args``.
        Returns the result of the script.

        In practice, use the object returned by ``register_script``. This
        function exists purely for Redis API completion.
        uEVAL(R(R6tscripttnumkeyst
keys_and_args((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyteval2s	cGs|jd|||�S(u�
        Use the ``sha`` to execute a Lua script already registered via EVAL
        or SCRIPT LOAD. Specify the ``numkeys`` the script will touch and the
        key names and argument values in ``keys_and_args``. Returns the result
        of the script.

        In practice, use the object returned by ``register_script``. This
        function exists purely for Redis API completion.
        uEVALSHA(R(R6tshaR}R~((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytevalsha=s
cGs|jd|�S(u�
        Check if a script exists in the script cache by specifying the SHAs of
        each script as ``args``. Returns a list of boolean values indicating if
        if each already script exists in the cache.
        u
SCRIPT EXISTS(R(R6R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
script_existsIscCs
|jd�S(u'Flush all scripts from the script cacheuSCRIPT FLUSH(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytscript_flushQscCs
|jd�S(u'Kill the currently executing Lua scriptuSCRIPT KILL(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytscript_killUscCs|jd|�S(u=Load a Lua ``script`` into the script cache. Returns the SHA.uSCRIPT LOAD(R(R6R|((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytscript_loadYscCs
t||�S(u
        Register a Lua ``script`` specifying the ``keys`` it will touch.
        Returns a Script object that is callable and hides the complexity of
        deal with scripts, keys, and shas. This is the preferred way to work
        with Lua scripts.
        (tScript(R6R|((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytregister_script]scGs8t|�ddkr%td��n|jd||�S(u
        Add the specified geospatial items to the specified key identified
        by the ``name`` argument. The Geospatial items are given as ordered
        members of the ``values`` argument, each item or place is formed by
        the triad longitude, latitude and name.
        iiu4GEOADD requires places with lon, lat and name valuesuGEOADD(R�RR(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgeoaddgscCsV|||g}|r0|dkr0td��n|rF|j|�n|jd|�S(u�
        Return the distance between ``place1`` and ``place2`` members of the
        ``name`` key.
        The units must be one of the following : m, km mi, ft. By default
        meters are used.
        umukmumiuftuGEODIST invalid unituGEODIST(umukmumiuft(RRWR(R6Rhtplace1tplace2tunitR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgeodistsscGs|jd||�S(u�
        Return the geo hash string for each item of ``values`` members of
        the specified key identified by the ``name`` argument.
        uGEOHASH(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgeohash�scGs|jd||�S(u�
        Return the positions of each item of ``values`` as members of
        the specified key identified by the ``name`` argument. Each position
        is represented by the pairs lon and lat.
        uGEOPOS(R(R6RhRq((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgeopos�sc

CsI|jd||||d|d|d|d|d|	d|
d|d	|�S(
u�
        Return the members of the specified key identified by the
        ``name`` argument which are within the borders of the area specified
        with the ``latitude`` and ``longitude`` location and the maximum
        distance from the center specified by the ``radius`` value.

        The units must be one of the following : m, km mi, ft. By default

        ``withdist`` indicates to return the distances of each place.

        ``withcoord`` indicates to return the latitude and longitude of
        each place.

        ``withhash`` indicates to return the geohash string of each place.

        ``count`` indicates to return the number of elements up to N.

        ``sort`` indicates to return the places in a sorted way, ASC for
        nearest to fairest and DESC for fairest to nearest.

        ``store`` indicates to save the places names in a sorted set named
        with a specific key, each element of the destination sorted set is
        populated with the score got from the original geo sorted set.

        ``store_dist`` indicates to save the places names in a sorted set
        named with a specific key, instead of ``store`` the sorted set
        destination score is set with the distance.
        u	GEORADIUSR�twithdistt	withcoordtwithhashR�R�R�t
store_dist(t_georadiusgeneric(
R6Rht	longitudetlatitudetradiusR�R�R�R�R�R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt	georadius�s	cCsF|jd|||d|d|d|d|d|d|	d|
d	|�S(
u3
        This command is exactly like ``georadius`` with the sole difference
        that instead of taking, as the center of the area to query, a longitude
        and latitude value, it takes the name of a member already existing
        inside the geospatial index represented by the sorted set.
        uGEORADIUSBYMEMBERR�R�R�R�R�R�R�R�(R�(R6RhtmemberR�R�R�R�R�R�R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytgeoradiusbymember�s		cOs�t|�}|dr5|ddkr5td��n+|drS|j|d�n
|jd�x7dddfD]&\}}||rp|j|�qpqpW|d
r�|jd|d
g�n|dr|ddkr�|jd�q|ddkr|jd�qtd��n|dr:|dr:td��n|dr^|jd|dg�n|dr�|jd|dg�n|j|||�S(NuunitumukmumiuftuGEORADIUS invalid unituwithdisttWITHDISTu	withcoordt	WITHCOORDuwithhashtWITHHASHucountR�usortuASCtASCuDESCR�uGEORADIUS invalid sortustoreu
store_distu3GEORADIUS store and store_dist cant be set togetherR�t	STOREDIST(umukmumiuft(uwithdistR�(u	withcoordR�(uwithhashR�(RRRWRR(R6R�R R`Rtarg_namet	byte_repr((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s6






N("RBRCRDR3R.R�R#RMR{R�R�RwRJR~R�R	R�R�R�R�R�R�RIR�R�R[R(RbRLR�R�RoRkRmRnR�R�R�R�R�R�R�R�tclassmethodR"R�R�R:R�R�R_R�R�R�R�RRRRRRRRRRRRRRRR2R3R4R5R6R8RERFRGRHRIRLRMRNRORQRRRSRTRURVRWRZR[R]RXR_RhRiRjRmRnR�RoRpRrRsRtRwRxRyR{R|R~R�R�R�R�R�R�RWR�R�R�R�R�R�R�R=R�R�R<R�R�R?R>R�R�R�R�R�R�RR�R�R�R�R�R�R�R�R�R�R�R�R�ReRAR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRRRRR	R
R
RR R!R$R%R&R'R(R)R*R+R,R0R1R6R:R;R<RBRCRDRERHRIRJRKRLRMRQRRRSRTRURVRWRXRYRORZR[R\R]RFRaRcRdReRfRgRhRiRjRkRlRmRnRpRqRrRsRvRwRxRyR{RR�R�R�R�R�R�R�R�R�R�R�R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s				
















$		:				2																		�					"															"														
				
													
					
					
		
				'			
		
							
			
					
			
				C																:											!/																																						
			$	R�cBsYeZdZejd�Zejd�Zd�Zd�Zd�Z	d�Z
d�ZRS(u�
    Monitor is useful for handling the MONITOR command to the redis server.
    next_command() method returns one command from monitor
    listen() method yields commands from monitor.
    u\[(\d+) (.*)\] (.*)u"(.*?)(?<!\\)"cCs"||_|jjd�|_dS(NuMONITOR(R�R�R�(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:�s	cCsB|jjd�|jj�}t|�s>td|��n|S(NuMONITORuMONITOR failed: %s(R�RRR�R(R6R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s
cGs$|jj�|jj|j�dS(N(R�R
R�R	(R6R ((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR
s
cCsU|jj�}t|t�r<|jjj|dt�}n|jdd�\}}|jj	|�}|j
�\}}}dj|jj
|��}|jdd�jdd�}|dkr�d}d	}	d}
nF|jd
�r�d
}|d}	d
}
n|jdd�\}}	d
}
it|�d6t|�d6|d6|	d6|
d6|d6S(u)Parse the response from a monitor commandR%u iu\"u"u\\u\uluauuunixiu:utcputimeudbuclient_addressuclient_portuclient_typeucommand(R�RRRR/R)R_R+t
monitor_reR�R�R�t
command_retfindallRfRTRNRMR#(R6R'tcommand_timetcommand_datatmtdb_idtclient_infoR�tclient_addresstclient_porttclient_type((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytnext_command

s2	
	

ccsxtr|j�VqWdS(u)Listen for commands coming to the server.N(R_R�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytlisten*
s	(RBRCRDtretcompileR�R�R:RRR�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s				 R�cBs
eZdZdZdZdZded�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zed
��Zd�Zd�Zedd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zedd�Zdd�Zed�Zded�ZRS( u*
    PubSub provides publish, subscribe and listen support to Redis channels.

    After subscribing to one or more channels, the listen() method will block
    until a message arrives on one of the subscribed channels. That message
    will be returned and it's safe to start listening again.
    umessageupmessageuunsubscribeupunsubscribeuredis-py-health-checkcCs�||_||_||_d|_|jj�|_|jjrWd|jg|_	nd|jj
|j�g|_	|j�dS(NupongR�(R�R�tignore_subscribe_messagesR"R�R&R/R�tHEALTH_CHECK_MESSAGEthealth_check_responseR(R(R6R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:<
s				cCs|S(N((R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRN
scCs|j�dS(N(R(R6RRR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRQ
scCs&y|j�Wntk
r!nXdS(N(RRs(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRT
s
cCsp|jrB|jj�|jj�|jj|j�d|_ni|_t�|_i|_	t�|_
dS(N(R�R
tclear_connect_callbacksR�R	R"tchannelsRetpending_unsubscribe_channelstpatternstpending_unsubscribe_patterns(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR]
s	

		cCs|j�dS(N(R(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRh
scCs�|jj�|jj�|jrui}x9t|j�D](\}}|||jj|dt�<q9W|j|�n|j	r�i}x9t|j	�D](\}}|||jj|dt�<q�W|j
|�ndS(uBRe-subscribe to any channels and patterns previously subscribed toR%N(R�tclearR�R�RR/R)R_t	subscribeR�t
psubscribe(R6R�R�R8R9R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
on_connectk
s

	 	 cCst|jp|j�S(u@Indicates if there are subscriptions to any channels or patterns(R�R�R�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
subscribed}
scGsw|jdkr@|jjd|j�|_|jj|j�n|j}i|jd6}|j||j	||�dS(u#Execute a publish/subscribe commandupubsubucheck_healthN(
R�R"R�R�R�tregister_connect_callbackR�R�t_executeR(R6R R�R`((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�
s		cOsmy|||�SWnUttfk
rh}|j�|joHt|t�sQ�n|j�|||�SXdS(N(RRR
R�Rtconnect(R6R�R�R R`R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��
s
	
icCs�|j}|dkr$td��n|j�|rL|jd|�rLdS|j||j�}|jr}||jkr}dS|S(u3Parse the response from a publish/subscribe commanduNpubsub connection not set: did you forget to call subscribe() or psubscribe()?R�N(	R�R"tRuntimeErrortcheck_healthtcan_readR�RR�R�(R6R5R�R
R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�
s	
	cCsb|j}|dkr$td��n|jr^tj�|jkr^|jd|jdt�ndS(NuNpubsub connection not set: did you forget to call subscribe() or psubscribe()?uPINGR�(	R�R"R�R�R�tnext_health_checkRR�R�(R6R
((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��
s	cs5|jj�|jj���fd�t|�D�S(u�
        normalize channel/pattern names to be either bytes or strings
        based on whether responses are automatically decoded. this saves us
        from coercing the value for each message coming in.
        cs+i|]!\}}|��|���qS(((RER8R9(R)R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pys
<dictcomp>�
s	(R/R(R)R(R6R7((R)R(s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt_normalize_keys�
scOs�|r t|d|d�}ntj|�}|j|�|jdt|��}|j|�}|jj|�|jj	|�|S(uE
        Subscribe to channel patterns. Patterns supplied as keyword arguments
        expect a pattern name as the key and a callable as the value. A
        pattern's callable will be invoked automatically when a message is
        received on that pattern rather than producing a message via
        ``listen()``.
        iiu
PSUBSCRIBE(
R!R)R*R/RRR�R�R�tdifference_update(R6R R`tnew_patternstret_val((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��
s
cGsa|r8t|d|d�}|jtj|��}n	|j}|jj|�|jd|�S(uj
        Unsubscribe from the supplied patterns. If empty, unsubscribe from
        all patterns.
        iiuPUNSUBSCRIBE(R!R�R)R*R�R�R/R(R6R R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytpunsubscribe�
s	cOs�|r t|d|d�}ntj|�}|j|�|jdt|��}|j|�}|jj|�|jj	|�|S(uR
        Subscribe to channels. Channels supplied as keyword arguments expect
        a channel name as the key and a callable as the value. A channel's
        callable will be invoked automatically when a message is received on
        that channel rather than producing a message via ``listen()`` or
        ``get_message()``.
        iiu	SUBSCRIBE(
R!R)R*R/RRR�R�R�R�(R6R R`tnew_channelsR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��
s
cGsa|r8t|d|d�}|jtj|��}n	|j}|jj|�|jd|�S(ui
        Unsubscribe from the supplied channels. If empty, unsubscribe from
        all channels
        iiuUNSUBSCRIBE(R!R�R)R*R�R�R/R(R6R R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytunsubscribes	ccsCx<|jr>|j|jdt��}|dk	r|VqqWdS(uBListen for messages on channels this client has been subscribed toR5N(R�thandle_messageRR_R"(R6R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs2|jdtd|�}|r.|j||�SdS(u�
        Get the next message if one is available, otherwise None.

        If timeout is specified, the system will wait for `timeout` seconds
        before returning. Timeout should be specified as a floating point
        number.
        R5R�N(RR�R�R"(R6R�R�R'((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytget_messagescCs(|dkrdn|}|jd|�S(u'
        Ping the Redis server
        uuPINGN(R"R(R6Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�&scCs�t|d�}|dkrMi|d6|dd6|dd6|dd	6}n_|d
kr�i|d6dd6dd6|dd	6}n*i|d6dd6|dd6|dd	6}||jkrK|dkr	|d}||jkrH|jj|�|jj|d�qHqK|d}||jkrK|jj|�|jj|d�qKn||j	kr�|dkr�|jj
|dd�}n|jj
|dd�}|r�||�dSn"|d
kr�|s�|jr�dSn|S(
u�
        Parses a pub/sub message. If the channel or pattern was subscribed to
        with a message handler, the handler is invoked instead of a parsed
        message being returned.
        iupmessageutypeiupatterniuchanneliudataupongupunsubscribeN(R	R"tUNSUBSCRIBE_MESSAGE_TYPESR�tremoveR�R�R�R�tPUBLISH_MESSAGE_TYPESR?R�(R6R'R�tmessage_typeRuRPRtthandler((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�-sN


cCs�x<t|j�D]+\}}|dkrtd|��qqWx<t|j�D]+\}}|dkrOtd|��qOqOWt||d|�}|j�|S(Nu'Channel: '%s' has no handler registeredu'Pattern: '%s' has no handler registeredtdaemon(RR�R"RR�tPubSubWorkerThreadR�(R6t
sleep_timeR�RtR�RPtthread((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt
run_in_threadhs
(umessageupmessage(uunsubscribeupunsubscribeN( RBRCRDR�R�R�R"R�R:RRRRRR�tpropertyR�RR�R_RR�R�R�R�R�R�R�R�R�R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�0
s6											
		
		
	
;R�cBs&eZed�Zd�Zd�ZRS(cCsAtt|�j�||_||_||_tj�|_dS(N(	R;R�R:R�R�R�t	threadingtEventt_running(R6R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:xs
			cCsl|jj�rdS|jj�|j}|j}x)|jj�r]|jdtd|�q5W|j�dS(NR�R�(R�tis_setReR�R�R�R_R(R6R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytruns
		cCs|jj�dS(N(R�R�(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytstop�s(RBRCR�R:R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�ws	R�cBs�eZdZdddhZd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed�Zd�Zd�ZRS(u_
    Pipelines provide a way to transmit multiple commands to the Redis server
    in one transmission.  This is convenient for batch processing, such as
    saving all the values in a list to Redis.

    All commands executed within a pipeline are wrapped with MULTI and EXEC
    calls. This guarantees all commands executed in the pipeline will be
    executed atomically.

    Any command raising an exception does *not* halt the execution of
    subsequent commands in the pipeline. Instead, the exception is caught
    and its instance is placed into the response list returned by execute().
    Code iterating over the response list should be able to deal with an
    instance of an exception as a potential value. In general, these will be
    ResponseError exceptions, such as those raised when issuing a command
    on a key of a different datatype.
    uDISCARDuEXECuUNWATCHcCsD||_d|_||_||_||_t|_|j�dS(N(	R�R"R�R�R�R�R�twatchingR(R6R�R�R�R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:�s						cCs|S(N((R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs|j�dS(N(R(R6RRR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs&y|j�Wntk
r!nXdS(N(RRs(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s
cCs
t|j�S(N(R�t
command_stack(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__len__�scCstS(u@Pipeline instances should  always evaluate to True on Python 2.7(R_(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__nonzero__�scCstS(u?Pipeline instances should  always evaluate to True on Python 3+(R_(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__bool__�scCs�g|_t�|_|jrl|jrly!|jjd�|jj�Wqltk
rh|jj�qlXnt	|_t	|_
|jr�|jj|j�d|_ndS(NuUNWATCH(R�RetscriptsR�R�RRRR
R�texplicit_transactionR�R	R"(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s	
			cCs=|jrtd��n|jr0td��nt|_dS(u�
        Start a transactional block of the pipeline after WATCH commands
        are issued. End the transactional block with `execute`.
        u"Cannot issue nested calls to MULTIu:Commands without an initial WATCH have already been issuedN(R�RR�R_(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytmulti�s
		cOsC|js|ddkr3|jr3|j||�S|j||�S(NiuWATCH(R�R�timmediate_execute_commandtpipeline_execute_command(R6R R`((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s
cOs |d}|j}|s=|jj||j�}||_ny$|j|�|j|||�SWn�ttfk
r}|j�|j	r�|j
�td��n|jo�t
|t�s�|j
��ny$|j|�|j|||�SWqttfk
r|j
��qXnXdS(u�
        Execute a command immediately, but don't auto-retry on a
        ConnectionError if we're already WATCHing a variable. Used when
        issuing WATCH or subsequent commands retrieving their values but before
        MULTI is called.
        iu=A ConnectionError occurred on while watching one or more keysN(R�R�R�R�RRRRR
R�RRR�R(R6R RuRR
R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s.
	

	



cOs|jj||f�|S(ur
        Stage a command to be executed when execute() is next called

        Returns the current Pipeline object back so commands can be
        chained together, such as:

        pipe = pipe.set('foo', 'bar').incr('baz').decr('bang')

        At some other point, you can then run: pipe.execute(),
        which will execute all commands queued in the pipe.
        (R�RW(R6R Ru((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs�tdifg|d	ifg�}|jg|D]\}}t|kr1|^q1�}|j|�g}y|j|d�Wn&tk
r�}	|jd|	f�nXx�t|�D]�\}
}t|dkr�|j|
|dtf�q�y|j|d�Wq�tk
rF}	|j|	|
d|d�|j|
|	f�q�Xq�Wy|j|d�}Wn+t	k
r�|r�|dd�n�nXt
|_|dkr�t
d��nx$|D]\}
}	|j|
|	�q�Wt|�t|�kr|jj�td��n|r'|j||�ng}
xzt||�D]i\}}t|t�s�|\}}|d}||jkr�|j|||�}q�n|
j|�q=W|
S(
NuMULTIuEXECu_iiuWatched variable changed.u6Wrong number of response items from pipeline execution(uMULTI(uEXEC(Rt
pack_commandsRtsend_packed_commandRRRWR'tannotate_exceptionRR�R�R"RtinsertR�R�R
traise_first_errorRRRsR�(R6R�R�traise_on_errortcmdsR Rutall_cmdsR�RRzR�R'R7R}R1R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt_execute_transaction*sT$

	

c
Cs�|jg|D]\}}|^q
�}|j|�g}x[|D]S\}}y$|j|j||d|��WqBtk
r�}	|j|	�qBXqBW|r�|j||�n|S(Ni(R�R�RWRRR�(
R6R�R�R�R t_R�R'RuR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt_execute_pipelineks(
cCsXxQt|�D]C\}}t|t�r
|j||d||d�|�q
q
WdS(Nii(R'RRR�(R6R�R'RzR}((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�|scCsSdjtt|��}d||t|jd�f}|f|jd|_dS(Nu u.Command # %d (%s) of pipeline caused error: %sii(R�RR
R (R6t	exceptionRR�R1tmsg((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��scKsOtj||||�}||jkr3t|_n|dkrKt|_n|S(NuWATCH(R�RtUNWATCH_COMMANDSR�R�R_(R6R�RRuRf((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs�t|j�}|j}g|D]}|j^q}|d|�}t|�s�x>t||�D]*\}}|s_|d|j�|_q_q_WndS(Nu
SCRIPT EXISTSuSCRIPT LOAD(RR�R�R�tallRR|(R6R�t	immediatetstshasR�texist((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pytload_scripts�s	cCs!|j}|r|jrgS|jr4|j�n|jsF|jrR|j}n	|j}|j}|s�|j	j
d|j�}||_nz�y||||�SWnftt
fk
r
}|j�|jr�td��n|jo�t|t
�s��n||||�SXWd|j�XdS(u0Execute all the commands in the current pipelineuMULTIu=A ConnectionError occurred on while watching one or more keysN(R�R�R�R�R�R�R�R�R�R�R�R�RRR
RR�RR(R6R�tstackR�R
R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s0		
		
	cGs(|jrtd��n|jd|�S(u$Watches the values at keys ``names``u"Cannot issue a WATCH after a MULTIuWATCH(R�RR(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s	cCs|jr|jd�ptS(u'Unwatches all previously specified keysuUNWATCH(R�RR_(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s(RBRCRDR�R:RRRR�R�R�RR�RR�R�R�R�R�R�RR�R_R�R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s.											*		A						
'	R�cBs)eZdZd�Zggdd�ZRS(u?An executable Lua script object returned by ``register_script``cCs^||_||_t|t�rB|jj�}|j|�}ntj|�j	�|_
dS(N(tregistered_clientR|RRR�R&R(thashlibtsha1t	hexdigestR�(R6R�R|R/((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:�s		cCs�|dkr|j}nt|�t|�}t|t�rP|jj|�ny |j|jt	|�|�SWn?t
k
r�|j|j�|_|j|jt	|�|�SXdS(u1Execute the script, passing any required ``args``N(
R"R�R�RR�R�taddR�R�R�RR�R|(R6RR R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt__call__�s 
N(RBRCRDR:R"R(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s	R�cBsbeZdZd	d�Zd�Zd�Zd	d�Zd�Zd�Z	e
d��Zd�ZRS(
u0
    Command builder for BITFIELD commands.
    cCs)||_||_||_|j�dS(N(RRZt_default_overflowR(R6RRZR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR:�s			cCs/g|_d|_|j|jp'|j�dS(uL
        Reset the state of the instance to when it was constructed
        uWRAPN(t
operationst_last_overflowtoverflowR(R6((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�s		cCsA|j�}||jkr=||_|jjd|f�n|S(u
        Update the overflow algorithm of successive INCRBY operations
        :param overflow: Overflow algorithm, one of WRAP, SAT, FAIL. See the
            Redis docs for descriptions of these algorithmsself.
        :returns: a :py:class:`BitFieldOperation` instance.
        uOVERFLOW(R5RRRW(R6R((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRs
	cCs<|dk	r|j|�n|jjd|||f�|S(u�
        Increment a bitfield by a given amount.
        :param fmt: format-string for the bitfield being updated, e.g. 'u8'
            for an unsigned 8-bit integer.
        :param offset: offset (in number of bits). If prefixed with a
            '#', this is an offset multiplier, e.g. given the arguments
            fmt='u8', offset='#2', the offset will be 16.
        :param int increment: value to increment the bitfield by.
        :param str overflow: overflow algorithm. Defaults to WRAP, but other
            acceptable values are SAT and FAIL. See the Redis docs for
            descriptions of these algorithms.
        :returns: a :py:class:`BitFieldOperation` instance.
        uINCRBYN(R"RRRW(R6tfmtR�t	incrementR((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�scCs|jjd||f�|S(u�
        Get the value of a given bitfield.
        :param fmt: format-string for the bitfield being read, e.g. 'u8' for
            an unsigned 8-bit integer.
        :param offset: offset (in number of bits). If prefixed with a
            '#', this is an offset multiplier, e.g. given the arguments
            fmt='u8', offset='#2', the offset will be 16.
        :returns: a :py:class:`BitFieldOperation` instance.
        uGET(RRW(R6RR�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR?%s
cCs |jjd|||f�|S(u�
        Set the value of a given bitfield.
        :param fmt: format-string for the bitfield being read, e.g. 'u8' for
            an unsigned 8-bit integer.
        :param offset: offset (in number of bits). If prefixed with a
            '#', this is an offset multiplier, e.g. given the arguments
            fmt='u8', offset='#2', the offset will be 16.
        :param int value: value to set at the given position.
        :returns: a :py:class:`BitFieldOperation` instance.
        uSET(RRW(R6RR�RO((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyRe2scCs4d|jg}x|jD]}|j|�qW|S(NuBITFIELD(RZRR(R6R1tops((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�@scCs#|j}|j�|jj|�S(u#
        Execute the operation(s) in a single BITFIELD command. The return value
        is a list of values corresponding to each operation. If the client
        used to create this instance was a pipeline, the list of values
        will be present within the pipeline's execute.
        (R�RRR(R6R�((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR�Gs	
N(
RBRCRDR"R:RRR�R?ReR�R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyR��s		
	
	(bt
__future__Rt	itertoolsRR%R�R�R�R�R�R�t
redis._compatRRRRRRRR	R
tredis.connectionRRR
t
redis.lockRtredis.exceptionsRRRRRRRRRt	SYM_EMPTYRR!R(R.R3R)R4RIRLR[RbR#RdRjRkRmRnRoRpR�R^RcRwR{RJR|R~RR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RiR�tStrictRedisR�R�tThreadR�R�R�R�(((s=/opt/alt/python27/lib/python2.7/site-packages/redis/client.pyt<module>s�@@							&	

																												
							�����������?�H�@"

Youez - 2016 - github.com/yon3zu
LinuXploit