
    2Bfb                         d dl Z d dlZd dlZd dlZ	 d dlZddlmZ ddlmZ ddlm	Z	 ddlm
Z
 dad Z G d	 d
ej                        Zy# e$ r dZY <w xY w)    N   )client)
exceptions)packet)payloadFc                  >    d } t        j                   |               y)z>SIGINT handler.

    Disconnect all active async clients.
    c                     K   t        j                         j                          t        j                  d d  D ]+  } | j                         s| j                          d {    - y 7 wN)asyncioget_event_loopstopr   connected_clientsis_asyncio_based
disconnect)cs    W/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/engineio/asyncio_client.py_handlerz&async_signal_handler.<locals>._handler   sZ      %%'))!, 	A!!#lln$$	  %s   A	A)A)A' A)Nr   ensure_future)r   s    r   async_signal_handlerr      s    
 (*%    c                        e Zd ZdZd Z	 	 ddZd Zd ZddZd Z	ddZ
d	 Zd
 Z fdZd Zd Zd Zd Z	 	 ddZd Zd Zd Zd Z xZS )AsyncClienta  An Engine.IO client for asyncio.

    This class implements a fully compliant Engine.IO web client with support
    for websocket and long-polling transports, compatible with the asyncio
    framework on Python 3.5 or newer.

    :param logger: To enable logging set to ``True`` or pass a logger object to
                   use. To disable logging set to ``False``. The default is
                   ``False``. Note that fatal errors are logged even when
                   ``logger`` is ``False``.
    :param json: An alternative json module to use for encoding and decoding
                 packets. Custom json modules must have ``dumps`` and ``loads``
                 functions that are compatible with the standard library
                 versions.
    :param request_timeout: A timeout in seconds for requests. The default is
                            5 seconds.
    :param http_session: an initialized ``aiohttp.ClientSession`` object to be
                         used when sending requests to the server. Use it if
                         you need to add special client options such as proxy
                         servers, SSL certificates, etc.
    :param ssl_verify: ``True`` to verify SSL certificates, or ``False`` to
                       skip SSL certificate verification, allowing
                       connections to servers with self signed certificates.
                       The default is ``True``.
    c                      y)NT selfs    r   r   zAsyncClient.is_asyncio_based=   s    r   c                   K   t         sbt        j                         t        j                         k(  r9	 t	        j
                         j                  t        j                  t               da | j                  dk7  rt        d      ddg}|3t        |t               r|g}|D cg c]  }||v r|
 }}|st        d      |xs || _        | j%                         | _         t)        | d	| j"                  d
   z         ||xs i |       d{   S # t        $ r | j                  j                  d       Y w xY wc c}w 7 3w)a  Connect to an Engine.IO server.

        :param url: The URL of the Engine.IO server. It can include custom
                    query string parameters if required by the server.
        :param headers: A dictionary with custom headers to send with the
                        connection request.
        :param transports: The list of allowed transports. Valid transports
                           are ``'polling'`` and ``'websocket'``. If not
                           given, the polling transport is connected first,
                           then an upgrade to websocket is attempted.
        :param engineio_path: The endpoint where the Engine.IO server is
                              installed. The default value is appropriate for
                              most cases.

        Note: this method is a coroutine.

        Example usage::

            eio = engineio.Client()
            await eio.connect('http://localhost:5000')
        TzSignal handler is unsupporteddisconnectedz%Client is not in a disconnected statepolling	websocketNzNo valid transports provided	_connect_r   )async_signal_handler_set	threadingcurrent_threadmain_threadr   r   add_signal_handlersignalSIGINTr   NotImplementedErrorloggerwarningstate
ValueError
isinstancestr
transportscreate_queuequeuegetattr)r   urlheadersr1   engineio_pathvalid_transports	transports          r   connectzAsyncClient.connect@   sB    0 (((*i.C.C.EEE&&(;;MM#79+/( ::'DEE%{3!*c*(\
5? <	&*:: $ <J < !?@@$8(8&&(
DWT;1C#CDB/ / 	/ ' E##$CDE</sA   0D?8D +7D?"D8/AD?	D=
D?$D52D?4D55	D?c                 R   K   | j                   r| j                    d{    yy7 w)zWait until the connection with the server ends.

        Client applications can use this function to block the main thread
        during the life of the connection.

        Note: this method is a coroutine.
        N)read_loop_taskr   s    r   waitzAsyncClient.waitq   s(      %%%% %s   '%'c                    K   | j                  t        j                  t        j                  |             d{    y7 w)a-  Send a message to a client.

        :param data: The data to send to the client. Data can be of type
                     ``str``, ``bytes``, ``list`` or ``dict``. If a ``list``
                     or ``dict``, the data will be serialized as JSON.

        Note: this method is a coroutine.
        dataN)_send_packetr   PacketMESSAGE)r   r@   s     r   sendzAsyncClient.send|   s+      fnn4 HIIIs   8AA Ac                 V  K   | j                   dk(  r| j                  t        j                  t        j                               d{    | j
                  j                  d       d{    d| _         | j                  dd       d{    | j                  dk(  r"| j                  j                          d{    |s| j                   d{    d| _         	 t        j                  j                  |        | j!                          y7 7 7 7 X7 D# t        $ r Y &w xY ww)	zDisconnect from the server.

        :param abort: If set to ``True``, do not wait for background tasks
                      associated with the connection to end.

        Note: this method is a coroutine.
        	connectedNdisconnectingr   F	run_asyncr!   r   )r-   rA   r   rB   CLOSEr3   put_trigger_eventcurrent_transportwscloser<   r   r   remover.   _reset)r   aborts     r   r   zAsyncClient.disconnect   s      ::$##FMM&,,$?@@@**..&&&(DJ%%le%DDD%%4ggmmo%%))))'DJ((//5 	 A&D%)  s~   AD)D"D)*D+!D)D0D)=D>D)DD) D ?D)D)D)D)D)	D&#D)%D&&D)c                 8    t        j                   ||i |      S )a$  Start a background task.

        This is a utility function that applications can use to start a
        background task.

        :param target: the target function to execute.
        :param args: arguments to pass to the function.
        :param kwargs: keyword arguments to pass to the function.

        This function returns an object compatible with the `Thread` class in
        the Python standard library. The `start()` method on this object is
        already called by this function.

        Note: this method is a coroutine.
        r   )r   targetargskwargss       r   start_background_taskz!AsyncClient.start_background_task   s      $$VT%<V%<==r   c                 H   K   t        j                  |       d{   S 7 w)z[Sleep for the requested amount of time.

        Note: this method is a coroutine.
        N)r   sleep)r   secondss     r   rY   zAsyncClient.sleep   s     
 ]]7++++s   " "c                 X    t        j                         }t         j                  |_        |S )zCreate a queue object.)r   Queue
QueueEmptyEmpty)r   qs     r   r2   zAsyncClient.create_queue   s    MMO$$r   c                 *    t        j                         S )zCreate an event object.)r   Eventr   s    r   create_eventzAsyncClient.create_event   s    }}r   c                     | j                   r-t        j                  | j                   j                                t        |           y r
   )httpr   r   rO   superrQ   )r   	__class__s    r   rQ   zAsyncClient._reset   s-    99!!$))//"34r   c                 t  K   t         | j                  j                  d       y| j                  ||d      | _        | j                  j                  d| j                  z          | j                  d| j                  | j                         z   || j                         d{   }|%| j                          t        j                  d      |j                  dk  s|j                  d	k\  rX| j                          	 |j                          d{   }t        j                  d
j                  |j                        |      	 t!        j"                  |j%                          d{   j'                  d            }|j*                  d   }|j,                  t.        j0                  k7  rt        j                  d      | j                  j                  dt3        |j4                        z          |j4                  d   | _        |j4                  d   | _        t;        |j4                  d         dz  | _        t;        |j4                  d         dz  | _        d| _         | xj                  d| j6                  z   z  c_        d| _!        tD        jF                  jI                  |        | jK                  dd       d{    |j*                  dd D ]  }| jM                  |       d{     d| j8                  v r*d| jN                  v r| jQ                  |||       d{   ry| jS                  | jT                        | _+        | jS                  | jX                        | _-        y7 7 ]# t         j                  $ r d}Y sw xY w7 %# t(        $ r t        j                  d      dw xY w7 7 7 w)z<Establish a long-polling connection to the Engine.IO server.Nz3aiohttp not installed -- cannot make HTTP requests!r    z!Attempting polling connection to GET)r6   timeoutz Connection refused by the server   ,  z,Unexpected status code {} in server responseutf-8encoded_payloadzUnexpected response from serverr   z"OPEN packet not returned by serverz!Polling connection accepted with sidupgradespingInterval     @@pingTimeout&sid=rF   r:   FrH   r   r!   ).aiohttpr+   error_get_engineio_urlbase_urlinfo_send_request_get_url_timestamprequest_timeoutrQ   r   ConnectionErrorstatusjsonClientErrorformatr   Payloadreaddecoder.   packetspacket_typer   OPENr0   r@   ro   rp   intping_intervalping_timeoutrM   r-   r   r   appendrL   _receive_packetr1   _connect_websocketrW   _write_loopwrite_loop_task_read_loop_pollingr<   )	r   r5   r6   r7   rargpopen_packetpkts	            r   _connect_pollingzAsyncClient._connect_polling   sK    ?KK * +..sM9M<t}}LM$$4==4#:#:#<<g(( % * * 9KKM,,24 488c>QXX_KKMFFHn ,,>EEHH"$ $	=qvvx0G0G1 A
 iil""fkk1,,46 6/#k6F6F2GG	I##E*#((4 !1!1.!ABVK 0 0 ?@6I!*488++ 
  ''-!!)u!===99QR= 	,C&&s+++	, $--'K4??,J,,S'=III#99$:J:JK"88##%c* %&&  2@ 	=,,138<=	=$ 	> , Js   B N8"M*#AN8=M0 M-M0 /N8"N 'N(N  D?N8?N2 *N8*N4+8N8#N6$AN8-M0 0N	N8N		N8N  N//N84N86N8c           
        K   t         | j                  j                  d       y| j                  ||d      }| j                  r3| j                  j                  d|z          d}|d| j                  z   z  }n'd}|| _        | j                  j                  d|z          | j                  | j                  j                  rt        j                         | _        i }|j                         D ]U  \  }}|j                         d	k(  st        |j                  d
      D 	cg c]  }	|	j                  dd       c}	      }||=  n | j                  j                  j                  |       	 | j                   sht#        j$                         }
d|
_        t"        j(                  |
_        | j                  j-                  || j/                         z   ||
       d{   }n6| j                  j-                  || j/                         z   |       d{   }|r=t?        j@                  t>        jB                  d      jE                         }	 |jG                  |       d{    	 |jM                          d{   jN                  }t?        j@                  |      }|jP                  t>        jR                  k7  s|jN                  dk7  r| j                  j9                  d       yt?        j@                  t>        jT                        jE                         }	 |jG                  |       d{    d| _+        | j                  j                  d       nL	 |jM                          d{   jN                  }t?        j@                  |      }|jP                  t>        jX                  k7  rt;        j<                  d      | j                  j                  dtK        |jN                        z          |jN                  d   | _        |jN                  d   | _-        t]        |jN                  d         dz  | _/        t]        |jN                  d         dz  | _0        d| _+        d | _1        td        jf                  ji                  |        | jk                  d!d"       d{    || _6        | jo                  | jp                        | _9        | jo                  | jt                        | _;        yc c}	w 7 7 # t         j0                  j2                  t         j0                  j4                  t         j0                  j6                  f$ r5 |r| j                  j9                  d       Y yt;        j<                  d      w xY w7 # tH        $ r/}| j                  j9                  dtK        |             Y d}~yd}~ww xY w7 A# tH        $ r/}| j                  j9                  dtK        |             Y d}~yd}~ww xY w7 # tH        $ r/}| j                  j9                  dtK        |             Y d}~yd}~ww xY w7 # tH        $ r&}t;        j<                  dtK        |      z         d}~ww xY w7 ϭw)#z?Establish or upgrade to a WebSocket connection with the server.Nzaiohttp package not installedFr!   z Attempting WebSocket upgrade to Trt   z#Attempting WebSocket connection to cookiez; =r   )r6   ssl)r6   z*WebSocket upgrade failed: connection errorzConnection errorprober?   z7WebSocket upgrade failed: unexpected send exception: %sz7WebSocket upgrade failed: unexpected recv exception: %sencoded_packetz(WebSocket upgrade failed: no PONG packetz WebSocket upgrade was successfulzUnexpected recv exception: zno OPEN packetz#WebSocket connection accepted with ro   rp   rq   rr   rs   rF   r:   rH   )<ru   r+   rv   rw   ro   ry   rx   rd   closedClientSessionitemslowerdictsplit
cookie_jarupdate_cookies
ssl_verifyr   create_default_contextcheck_hostname	CERT_NONEverify_mode
ws_connectr{   client_exceptionsWSServerHandshakeErrorServerConnectionErrorClientConnectionErrorr,   r   r}   r   rB   PINGencodesend_str	Exceptionr0   receiver@   r   PONGUPGRADErM   r   rp   r   r   r   r-   r   r   r   rL   rN   rW   r   r   _read_loop_websocketr<   )r   r5   r6   r7   websocket_urlupgradecookiesheadervaluer   ssl_contextrN   r   er   r   s                   r   r   zAsyncClient._connect_websocket  sg    ?KK=>..sM/:<88KK2]BDGWtxx//MG)DMKK5EG 99		 0 0--/DI $]]_ 	MFE||~)8=D8IJfV\\#q)JLFO	 			++G4	E??!88:-2**---'99//!D$;$;$==# 0 6 6  99//!D$;$;$==# 0 % % fkk8??AAkk!n$$::<'-- --q1C&++-W1D##>@fnn-446Akk!n$$ &1D"KK?@<::<'-- !--q9K&&&++5 001ABBKK5K<L<L8MMO"''.DH',,Z8DM!$[%5%5n%E!F!OD #K$4$4]$C Dv MD%0D"$DJ$$++D1%%i5%AAA#99$:J:JK"88%%'e K6% ))@@))??))??A 	E ##@B 001CDD	E % ##MF 	 ( ##MF 	 % ##MF 	 ( < 001CF:< <<  BsU  DY,Y,S'
62Y,)A.S2 S,6S2 S/S2 6Y,
U= U:U= $V; 7V88V; BY,W9 *W6+W9 /$Y,X7 'X4(X7 6D$Y,Y)AY,,S2 /S2 2A-U7Y,!U77Y,:U= =	V5%V0+Y,0V55Y,8V; ;	W3%W.)Y,.W33Y,6W9 9	X1%X,'Y,,X11Y,4X7 7	Y& !Y!!Y&&Y,c                 n  K   |j                   t        t        j                        k  rt        j                  |j                      nd}| j                  j                  d|t        |j                  t              s|j                  nd       |j                   t        j                  k(  r'| j                  d|j                  d       d{    y|j                   t        j                  k(  rF| j                  t        j                  t        j                  |j                               d{    y|j                   t        j                  k(  r| j!                  d       d{    y|j                   t        j"                  k(  ry| j                  j%                  d	|j                          y7 7 7 Nw)
z(Handle incoming packets from the server.UNKNOWNzReceived packet %s data %s<binary>messageTrH   N)rR   z%Received unexpected packet of type %s)r   lenr   packet_namesr+   ry   r/   r@   bytesrC   rL   r   rA   rB   r   rJ   r   NOOPrv   )r   r   packet_names      r   r   zAsyncClient._receive_packetr  s2     V%8%8!99 ))#//:?H 	(+&sxx7CHHZ	I ??fnn,%%iT%JJJ__+##FMM&++sxx$HIII__,///---__+KKE!oo/ KI-s8   CF5	F/
A"F5,F1-7F5$F3%AF51F53F5c                 <  K   | j                   dk7  ry| j                  j                  |       d{    | j                  j	                  dt
        j                  |j                     t        |j                  t              s|j                         yd       y7 hw)z(Queue a packet to be sent to the server.rF   NzSending packet %s data %sr   )r-   r3   rK   r+   ry   r   r   r   r/   r@   r   )r   r   s     r   rA   zAsyncClient._send_packet  sx     ::$jjnnS!!!'0&sxx7CHH	I >H	I 	"s   /BBA)Bc                 (  K   | j                   | j                   j                  rt        j                         | _         t	        | j                   |j                               }	 | j                  s) ||||t        j                  |      d       d {   S  ||||t        j                  |             d {   S 7 ,7 # t        j                  t        j                  f$ r(}| j                  j                  d|||       Y d }~y d }~ww xY ww)N)totalF)r6   r@   ri   r   )r6   r@   ri   z+HTTP %s request to %s failed with error %s.)rd   r   ru   r   r4   r   r   ClientTimeoutr   r   TimeoutErrorr+   ry   )r   methodr5   r6   bodyri   http_methodexcs           r   rz   zAsyncClient._send_request  s      99		 0 0--/DIdii8	/??(t#11@eM M M )t#11@B B B	MB ##W%9%9: 	/KKJ#S#/ /	/s`   A D#0C C C D#C ;C<C ?D C C #D'D
D
DDc                 ^   K   |j                  dd      }d} j                  v rt        j                   j                           du r?|r   j                   j                     g S 	   j                       d{   }|S |r fd} j	                  |      S 	   j                      }|S |S 7 7# t        j
                  $ r Y |S   j                  j                  dz          dk(  rY yY |S xY w#   j                  j                  dz          dk(  rY yY |S xY ww)	zInvoke an event handler.rI   FNTz async handler errorr:   c                  0   K    j                        S wr
   )handlers)rU   eventr   s   r   async_handlerz1AsyncClient._trigger_event.<locals>.async_handler  s     3t}}U3T::s   z handler error)popr   r   iscoroutinefunctionrW   CancelledErrorr+   	exception)r   r   rU   rV   rI   retr   s   ```    r   rL   zAsyncClient._trigger_event  sa    JJ{E2	DMM!**4==+?@DH5455dmmE6J =7;= =	)$8DMM%$8$$??0 
 ;  55mDD)2dmmE2D9 
s
1 @"11 , 
+)--e6L.LM I- $) .& 
)--e6F.FG I- $) . 
sT   A)D-/B> B<B> 	D-&D  8D-<B> >C=D-$C=8D- %D*%D-c                   K   | j                   dk(  r| j                  j                  d| j                  z          | j	                  d| j                  | j                         z   t        | j                  | j                        dz          d{   }|?| j                  j                  d       | j                  j                  d       d{    n|j                  dk  s|j                  d	k\  rJ| j                  j                  d
|j                         | j                  j                  d       d{    nw	 t        j                  |j                          d{   j!                  d            }|j$                  D ]  }| j'                  |       d{     | j                   dk(  r| j                  j                  d       | j(                   d{    | j                   dk(  rK| j+                  dd       d{    	 t,        j.                  j1                  |        | j3                          | j                  j                  d       y7 7 7 (7 # t"        $ rB | j                  j                  d       | j                  j                  d       d{  7   Y w xY w7 7 7 # t"        $ r Y w xY ww)z-Read packets by polling the Engine.IO server.rF   zSending polling GET request to rh      ri   N*Connection refused by the server, abortingrj   rk   6Unexpected status code %s in server response, abortingrl   rm   z'Unexpected packet from server, aborting"Waiting for write loop task to endr   FrH   Exiting read loop task)r-   r+   ry   rx   rz   r{   maxr   r   r,   r3   rK   r~   r   r   r   r   r.   r   r   r   rL   r   r   rP   rQ   )r   r   r   r   s       r   r   zAsyncClient._read_loop_polling  s]    jjK'KK1DMMAC((t}}t'>'>'@@D..0A0ABQF ) H HA y##@BjjnnT***xx#~S## %9:;((DjjnnT***OO1668^4K4K5  yy 0**3///01 jjK'6 	=>""""::$%%le%DDD((//5 KKM12CH +
 + 6D ##=?jjnnT***	 0 	#D  s   BKI?KIA'K6I7K="I$ I! I$ 8#KJ2K3*KJ5)KJ7KJ9 ,-KKK!I$ $AJ/&J)'J/,K.J//K5K7K9	KKKKc                   K   | j                   dk(  rd}	 t        j                  | j                  j	                         | j
                  | j                  z          d{   }|j                  }|$| j                  j                  d       d{    nA	 	 t'        j(                  |      }| j+                  |       d{    | j                   dk(  r| j                  j!                  d	       | j,                   d{    | j                   dk(  rK| j/                  d
d       d{    	 t0        j2                  j5                  |        | j9                          | j                  j!                  d       y7 7 # t        j                  $ rB | j                  j                  d       | j                  j                  d       d{  7   Y t        j                  j                  $ rC | j                  j!                  d       | j                  j                  d       d{  7   Y \t"        $ rT}| j                  j!                  dt%        |             | j                  j                  d       d{  7   Y d}~d}~ww xY w# t"        $ rT}| j                  j!                  dt%        |             | j                  j                  d       d{  7   Y d}~d}~ww xY w7 07 7 # t6        $ r Y w xY ww)z5Read packets from the Engine.IO WebSocket connection.rF   Nr   z*Server has stopped communicating, abortingz4Read loop: WebSocket connection was closed, abortingz1Unexpected error receiving packet: "%s", abortingr   z0Unexpected error decoding packet: "%s", abortingr   r   FrH   r   )r-   r   wait_forrN   r   r   r   r@   r3   rK   r   r+   r,   ru   r   ServerDisconnectedErrorry   r   r0   r   rB   r   r   rL   r   r   rP   r.   rQ   )r   r   r   r   s       r   r   z AsyncClient._read_loop_websocket  sx    jjK'A!**GGOO% ..1B1BBD D FF9**..... &mm15 &&s+++C jjK'F 	=>""""::$%%le%DDD((//5 KKM12SD
 /'' ##@BjjnnT***,,DD   JLjjnnT***   GF jjnnT***    FAPjjnnT***	
 , 	#D  s#  L
A	F  E;0F  E>F  L
J -L
K1L
*L
 K4)L
*K7+L
0K: ,L
;F  >F   AJGJL
AJ)H,*J/L
2J:AJ	=J >J	L
	JL
	K.AK)K K)#L
)K..L
4L
7L
:	LL
LL
c                   K   | j                   dk(  rst        | j                  | j                        dz   }d}	 t	        j
                  | j                  j                         |       d{   g}|dgk(  r| j                  j                          g }nQ	 	 |j                  | j                  j                                |d    |dd }| j                  j                          nP|sn| j                   dk(  rt#        j$                  |      }| j'                  d| j(                  |j+                         d	d
i| j,                         d{   }|D ]  }| j                  j                           || j                  j/                  d       n|j0                  dk  s|j0                  dk\  r| j                  j/                  d|j0                         | j3                          n	 |D ]  }|j4                  r2| j6                  j9                  |j+                                d{    n1| j6                  j;                  |j+                                d{    | j                  j                           	 | j                   dk(  rs| j                  jG                  d       y7 8# | j                  j                  t        j                  t        j                  f$ r | j                  j                  d       Y tw xY w# | j                  j                  $ r Y 6w xY w7 7 7 # t<        j>                  j@                  tB        tD        f$ r | j                  jG                  d       Y w xY ww)zhThis background task sends packages to the server as they are
        pushed to the send queue.
        rF   r   Nzpacket queue is empty, abortingr    )r   POSTzContent-Typezapplication/octet-stream)r   r6   ri   r   rj   rk   r   z5Write loop: WebSocket connection was closed, abortingzExiting write loop task)$r-   r   r   r   r   r   r3   getr^   r   r   r+   rv   	task_doner   
get_nowaitrM   r   r   rz   rx   r   r|   r,   r~   rQ   binaryrN   
send_bytesr   ru   r   r   BrokenPipeErrorOSErrorry   )r   ri   r   r   r   r   s         r   r   zAsyncClient._write_loop!  s     jjK' $,,d.?.?@1DGG!(!1!1$**..2BG!LLM
 4& 

$$&tzz'<'<'>? r{*")#2,

,,.  %%2OOG4,,DMM
+-GH 00 - 2 2 # +CJJ((*+9KK''DF88c>QXX_KK'' )=>?hhHKKM& /::"&''"4"4SZZ\"BBB"&''"2"23::<"@@@

,,./a jjK'x 	23k MJJ$$g&:&:**, !!"CD  ::++ 2( C@11II'2 KK$$#$ s   6M.1J% *J"+J% 0$M.)K> >BM.
LBM.$=L% !L!"1L% L# L% 4M.M."J% %AK;8M.:K;;M.>LM.LM.!L% #L% %AM+(M.*M++M.)NNz	engine.io)F)r   )NNN)__name__
__module____qualname____doc__r   r:   r=   rD   r   rW   rY   r2   rb   rQ   r   r   r   rA   rz   rL   r   r   r   __classcell__)rf   s   @r   r   r   #   s    2 ;?$///b	&	J0>$,
:%xm^/&I 37/*#J&3P.3`@4r   r   )r   r(   r   r$   ru   ImportError r   r   r   r   r#   r   Clientr   r   r   r   <module>r      sZ      
       & ~4&-- ~47  Gs   A	 	AA