
    RPf@              7      @   d dl mZ d dlZ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	m
Z
 d dlZd dlZd dlmZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ d dlmZm Z  d dl!m"Z"m#Z#  ejH                   e% ejL                                     Z' ejH                   e% ejL                                     Z( ejH                   e% ejL                                     Z) ejH                   e% ejL                                     Z* ejH                   ejL                         D  cg c]
  } | dk7  s	|  c}       Z+ ejH                  e      Z,d	Z- ej\                  d
      Z/ddZ0 ejb                  ddi       ejd                  dd       ejf                  de4ddd       ejf                  de5ddd       ejf                  de4dd       ejf                  de5dd       ejf                  ddd d!"       ejf                  d#d$dd% ejl                  d&      '       ejf                  d(d)dd*+       ejf                  d,d-dd.+       ejf                  d/e7d0dd12       ejf                  d3de5d45       ejf                  d6e+d7d8d       ejf                  d9e(d7d:d       ejf                  d;e)d7d<d       ejf                  d=e5d>d?d       ejf                  d@e5dAdBd       ejf                  dCe7dDdEd       ejf                  dFe7dDdGd       ejf                  dHe8ddId       ejf                  dJe*d7dKd       ejf                  dLe,d7dMd       ejf                  dN ejl                  d&      ddOd       ejf                  dP ejl                  d&      ddQd       ejf                  dRe'ddSd       ejf                  dTdddU"       ejf                  dVdddW"       ejf                  dXdddY"       ejf                  dZddd["       ejf                  d\ddd]"       ejf                  d^e4dd_       ejf                  d`e4dadb       ejf                  dce5ddd       ejf                  dee5dfdg       ejf                  dhe5ddi       ejf                  dje5dkdld       ejf                  dme5ddn       ejf                  doe4ddpd       ejf                  dqe4ddrd       ejf                  dse4ddtd       ejf                  due5 e5e      dvd       ejf                  dwe5 e5ejr                        dxd       ejf                  dye4ddzd       ejf                  d{e4d|d}d       ejf                  d~ddd+       ejf                  dde0d dd       ejf                  ddadd       ejf                  dde5dd       ejf                  ddd dd      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                                                                                                                                                                                                                                                                                                                                                       Z:ddddd7d7d7d>dAdDdDdd7d7d dddd0ddedddddddaddfddkddddeejr                  dd|dddd dd.	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ;e<dk(  r e:        yyc c} w )    )annotationsN)AnyCallable)ASGIApplication)HTTP_PROTOCOLS
INTERFACESLIFESPAN
LOG_LEVELSLOGGING_CONFIGLOOP_SETUPSSSL_PROTOCOL_VERSIONWS_PROTOCOLSConfigHTTPProtocolTypeInterfaceTypeLifespanTypeLoopSetupTypeWSProtocolType)ServerServerState)ChangeReloadMultiprocessnone   uvicorn.errorc           	        |r| j                   ry t        j                  dj                  t        j
                  t        j                         t        j                         t        j                                      | j                          y )NzKRunning uvicorn {version} with {py_implementation} {py_version} on {system})versionpy_implementation
py_versionsystem)resilient_parsingclickechoformatuvicorn__version__platformpython_implementationpython_versionr    exit)ctxparamvalues      F/var/www/fastapitest/venv/lib/python3.12/site-packages/uvicorn/main.pyprint_versionr/   .   sf    C))	JJU\\''&<<>..0??$	 	] 	
 HHJ    auto_envvar_prefixUVICORN)context_settingsappUVICORN_APP)envvarz--hostz	127.0.0.1zBind socket to this host.T)typedefaulthelpshow_defaultz--porti@  zABind socket to this port. If 0, an available port will be picked.z--udszBind to a UNIX domain socket.)r7   r8   r9   z--fdz)Bind to socket from this file descriptor.z--reloadFzEnable auto-reload.)is_flagr8   r9   z--reload-dirreload_dirszRSet reload directories explicitly, instead of using the current working directory.)exists)multipler9   r7   z--reload-includereload_includeszSet glob patterns to include while watching for files. Includes '*.py' by default; these defaults can be overridden with `--reload-exclude`. This option has no effect unless watchfiles is installed.)r>   r9   z--reload-excludereload_excludeszSet glob patterns to exclude while watching for files. Includes '.*, .py[cod], .sw.*, ~*' by default; these defaults can be overridden with `--reload-include`. This option has no effect unless watchfiles is installed.z--reload-delayg      ?zTDelay between previous and next check if application needs to be. Defaults to 0.25s.)r7   r8   r:   r9   z	--workersz~Number of worker processes. Defaults to the $WEB_CONCURRENCY environment variable if available, or 1. Not valid with --reload.)r8   r7   r9   z--loopautozEvent loop implementation.z--httpzHTTP protocol implementation.z--wsz"WebSocket protocol implementation.z--ws-max-sizei   z#WebSocket max size message in bytesz--ws-max-queue    z2The maximum length of the WebSocket message queue.z--ws-ping-intervalg      4@z#WebSocket ping interval in seconds.z--ws-ping-timeoutz"WebSocket ping timeout in seconds.z--ws-per-message-deflatez)WebSocket per-message-deflate compressionz
--lifespanzLifespan implementation.z--interfacez:Select ASGI3, ASGI2, or WSGI as the application interface.z
--env-filezEnvironment configuration file.z--log-configzBLogging configuration file. Supported formats: .ini, .json, .yaml.z--log-levelzLog level. [default: info]z--access-log/--no-access-logzEnable/Disable access log.z--use-colors/--no-use-colorsz!Enable/Disable colorized logging.z"--proxy-headers/--no-proxy-headerszdEnable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to populate remote address info.z"--server-header/--no-server-headerz%Enable/Disable default Server header.z--date-header/--no-date-headerz#Enable/Disable default Date header.z--forwarded-allow-ipszComma separated list of IPs to trust with proxy headers. Defaults to the $FORWARDED_ALLOW_IPS environment variable if available, or '127.0.0.1'.z--root-path zLSet the ASGI 'root_path' for applications submounted below a given URL path.z--limit-concurrencyz^Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses.z	--backlogi   z0Maximum number of connections to hold in backlogz--limit-max-requestszEMaximum number of requests to service before terminating the process.z--timeout-keep-alive   zLClose Keep-Alive connections if no new data is received within this timeout.z--timeout-graceful-shutdownz8Maximum number of seconds to wait for graceful shutdown.z--ssl-keyfilezSSL key filez--ssl-certfilezSSL certificate filez--ssl-keyfile-passwordzSSL keyfile passwordz--ssl-versionz,SSL version to use (see stdlib ssl module's)z--ssl-cert-reqsz@Whether client certificate is required (see stdlib ssl module's)z--ssl-ca-certszCA certificates filez--ssl-ciphersTLSv1z(Ciphers to use (see stdlib ssl module's)z--headerheaderszASpecify custom default HTTP response headers as a Name:Value pairz	--versionz%Display the uvicorn version and exit.)r;   callbackexpose_valueis_eagerr9   z	--app-dirzuLook for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.)r8   r:   r9   z--h11-max-incomplete-event-sizeh11_max_incomplete_event_sizezFFor h11, the maximum number of bytes to buffer of an incomplete event.z	--factoryzFTreat APP as an application factory, i.e. a () -> <ASGI app> callable.)r;   r8   r9   r:   c/                   t        | fi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|t        n|d|d|d|d|d|xs d d|xs d d|xs d d|d|d|d|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|%d&|&d'|'d(|(d)|)d*|*D /cg c]  }/|/j                  d+d,       c}/d-|+d.|.d/|,d0|- y c c}/w )1Nhostportudsfdloophttpwsws_max_sizews_max_queuews_ping_intervalws_ping_timeoutws_per_message_deflatelifespanenv_file
log_config	log_level
access_log	interfacereloadr<   r?   r@   reload_delayworkersproxy_headersserver_headerdate_headerforwarded_allow_ips	root_pathlimit_concurrencybackloglimit_max_requeststimeout_keep_alivetimeout_graceful_shutdownssl_keyfilessl_certfilessl_keyfile_passwordssl_versionssl_cert_reqsssl_ca_certsssl_ciphersrF   :   
use_colorsfactoryapp_dirrJ   )runr   split)0r4   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r]   r^   r<   r?   r@   r_   r`   rY   rZ   r[   r\   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rF   rt   rv   rJ   ru   headers0                                                   r.   mainrz   <   s1   z
 00 0 	0
 0 0 0 0  0 "0 *0 (0  60 0 0  &0%7>Z!0" #0$ %0& '0( )0*  '4+0, (/4-0. (/4/00 "102 304 $506 $708  90: 0;0< =0> ,?0@ A0B .C0D .E0F #<G0H  I0J "K0L 2M0N  O0P $Q0R "S0T  U0V 5<<&c1%<W0X Y0Z [0\ ]0^ 'D_0V =s   C).rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r]   r^   r<   r?   r@   r_   r`   rY   rZ   r[   r\   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rF   rt   rv   ru   rJ   c       .           |, t         j                  j                  d|,       t        | fi d|d|d|d|d|d|d|d	|d
|	d|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d |d!| d"|!d#|"d$|#d%|$d&|%d'|&d(|'d)|(d*|)d+|*d,|+d-|-d.|.}/t	        |//      }0|/j
                  s|/j                  d0kD  rKt        | t              s;t        j                  d1      }1|1j                  d2       t        j                  d0       |/j                  r8|/j                         }2t        |/|0j                   |2g3      j!                          nW|/j                  d0kD  r8|/j                         }2t#        |/|0j                   |2g3      j!                          n|0j!                          |/j$                  rHt&        j                  j)                  |/j$                        rt'        j*                  |/j$                         |0j,                  s7|/j                  s*|/j                  d0k(  rt        j                  t.               y y y y )4Nr   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r]   r^   r<   r?   r@   r_   r`   rY   rZ   r[   r\   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rF   rt   ru   rJ   )configrs   r   zRYou must pass the application as an import string to enable 'reload' or 'workers'.)targetsockets)syspathinsertr   r   r^   r`   
isinstancestrlogging	getLoggerwarningr*   should_reloadbind_socketr   rw   r   rN   osr=   removestartedSTARTUP_FAILURE)3r4   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r]   r^   r<   r?   r@   r_   r`   rY   rZ   r[   r\   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rF   rt   rv   ru   rJ   r|   serverloggersocks3                                                      r.   rw   rw     s$   d 7#// / 	/
 / / / /  / "/ */ (/  6/ / /  !/"  #/$ (%/& ('/( ")/* +/, -/. //0 1/2 3/4 $5/6 $7/8  9/: 0;/< =/> ,?/@ A/B .C/D .E/F #<G/H  I/J "K/L 2M/N  O/P $Q/R "S/T  U/V W/X Y/Z [/\ 'D]/F` 6"F!+ZS5I""?3no!!#VFJJ?CCE	!	!!#VFJJ?CCE

zzbggnnVZZ0
		&**>>&"6"66>>Q;N! <O"6>r0   __main__)r+   zclick.Contextr,   zclick.Parameterr-   boolreturnNone)`r4   r   rL   r   rM   intrN   r   rO   r   rP   r   rQ   r   rR   r   rS   r   rT   r   rU   floatrV   r   rW   r   rX   r   r]   r   r^   r   r<   	list[str]r?   r   r@   r   r_   r   r`   r   rY   r   rZ   r   r[   r   r\   r   ra   r   rb   r   rc   r   rd   r   re   r   rf   r   rg   r   rh   r   ri   r   rj   
int | Nonerk   r   rl   r   rm   r   rn   r   ro   r   rp   r   rq   r   rF   r   rt   r   rv   r   rJ   r   ru   r   r   r   )`r4   z*ASGIApplication | Callable[..., Any] | strrL   r   rM   r   rN   
str | NonerO   r   rP   r   rQ   z)type[asyncio.Protocol] | HTTPProtocolTyperR   z'type[asyncio.Protocol] | WSProtocolTyperS   r   rT   r   rU   float | NonerV   r   rW   r   rX   r   r]   r   r^   r   r<   list[str] | str | Noner?   r   r@   r   r_   r   r`   r   rY   str | os.PathLike[str] | NonerZ   zdict[str, Any] | str | Noner[   zstr | int | Noner\   r   ra   r   rb   r   rc   r   rd   r   re   r   rf   r   rg   r   rh   r   ri   r   rj   r   rk   r   rl   r   rm   r   rn   r   ro   r   rp   r   rq   r   rF   zlist[tuple[str, str]] | Nonert   zbool | Nonerv   r   ru   r   rJ   r   r   r   )=
__future__r   asyncior   r   r'   sslr   typingr   r   r"   r%   uvicorn._typesr   uvicorn.configr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   uvicorn.serverr   r   uvicorn.supervisorsr   r   ChoicelistkeysLEVEL_CHOICESHTTP_CHOICES
WS_CHOICESLIFESPAN_CHOICESLOOP_CHOICESINTERFACE_CHOICESr   r   r   r/   commandargumentoptionr   r   Pathr   r   	CERT_NONErz   rw   __name__)keys   0r.   <module>r      s   "   	  
 
     *     / :T/*//"345u||D!4!4!4!678U\\$0|00234
5<<]X]]_ 56 u||,<K,<,<,>PS#-SPQ ELL, 			?	+ !5y ABm,		$ 		L gC4STf33^_j$<QR	`	4	  
@	 
	 		b 	
=	 		% 		( 
		- 		. 		= 		. 		- 		4 		# 		E 	4	 	* 	4	 	M 		% "	%	 "	,	 (	r	 (	0	 $	.	 	
S	 		W	 		l	 		;	 		P	 		W !		C	 oCNY]^		 		 	$%	7 		K 		 		3 	L	 	0 
2	 %#		Q 	Qa	a
a a 
	a
 	a a a 	a a a a a !a a a  !a" #a$ %a& 'a( )a* +a, -a. /a0 1a2 3a4 5a6 7a8 9a: ;a< =a> ?a@ AaB CaD EaF  *GaH IaJ KaL MaN OaP QaR SaT UaV WaX YaZ [a\ $.]a^ _a` 
aa _ S ` U - CX	aN  6<28%)$(#'#%*..2.2.2.<"&26$(%),0"26'++#,0"04ax"	3x" x" 	x"
 
x" 	x" x" 4x" 	0x" x" x" #x" "x" !x" x"  !x"" #x"$ (%x"& ,'x"( ,)x"* +x", -x". ,/x"0 ,1x"2  3x"4 5x"6 7x"8 9x": ;x"< 0=x"> ?x"@ "Ax"B Cx"D #Ex"F Gx"H  *Ix"J Kx"L 0Mx"N %Ox"P Qx"R Sx"T Ux"V Wx"X *Yx"Z [x"\ ]x"^ _x"` $.ax"b 
cx"v zF C Qs    
^+^