o
    ß’Oj|I  ã                :   @  sâ  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Zd dl	m
Z
 d dlmZ d dlmZ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! d dl"m#Z# d d	l$m%Z%m&Z& e 'e(e )¡ ƒ¡Z*e 'e(e )¡ ƒ¡Z+e 'e¡Z,dìdd„Z-e .d¡Z/dídd„Z0ej1ddid�ej2ddd�ej3d e4d!d"d#d$�ej3d%e5d&d'd#d$�ej3d(e4dd)d*�ej3d+e5dd,d*�ej3d-d#d.d/d0�ej3d1d2d#d3ej6d#d4�d5�ej3d6d7d#d8d9�ej3d:d;d#d<d9�ej3d=e7d>d#d?d@�ej3dAde5dBdC�ej3dDe4e-e ƒdEdFd#dG�ej3dHe4e-eƒdEdId#dG�ej3dJe4e-e!ƒdEdKd#dG�ej3dLe5dMdNd#d$�ej3dOe5dPdQd#d$�ej3dRe7dSdTd#d$�ej3dUe7dSdVd#d$�ej3dWe8d#dXd#d$�ej3dYe+dEdZd#d$�ej3d[e,dEd\d#d$�ej3d]ej6d#d4�dd^d#d$�ej3d_ej6d#d4�dd`d#d$�ej3dae*ddbd#d$�ej3dcd#d#ddd0�ej3ded#ddfd0�ej3dgd#d#dhd0�ej3did#d#djd0�ej3dkd#d#dld0�ej3dme4ddnd*�ej3doe4dpdqd*�ej3dre5ddsd*�ej3dte5dudvd*�ej3dwe5ddxd*�ej3dye5d dzd#d$�ej3d{e5d|d}d#d$�ej3d~e5ddd*�ej3d€e5d|d�d#d$�ej3d‚e4ddƒd#d$�ej3d„e4dd…d#d$�ej3d†e4dd‡d#d$�ej3dˆe5e5eƒd‰d#d$�ej3dŠe5e5ej9ƒd‹d#d$�ej3dŒe4dd�d#d$�ej3dŽe4dd�d#d$�ej3d�d‘d#d’d9�ej3d“d#e0d.d#d”d•�ej3d–dpd#d—d˜�ej3d™dše5dd›d*�ej3dœd#d.d�d#dž�ej3dŸd#d.d d#dž�dîd×dØ„ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒZ:d!d&dddEdEdEdMdPdSdSd#dEdEd.dddd>ddedd#d#d#d#ddpddudd d|dd|dddeej9ddddddd.dd.dÙœ2dïdædç„Z;dðdédê„Z<e=dëk�rïe:ƒ  dS dS )ñé    )ÚannotationsN)ÚCallable)ÚRawConfigParser)ÚIOÚAnyÚget_args)ÚASGIApplication)Ú
INTERFACESÚLIFESPANÚ
LOG_LEVELSÚLOGGING_CONFIGÚSSL_PROTOCOL_VERSIONÚSTARTUP_FAILUREÚConfigÚHTTPProtocolTypeÚInterfaceTypeÚLifespanTypeÚLoopFactoryTypeÚWSProtocolType)ÚServer)ÚChangeReloadÚMultiprocessÚ_typer   ÚreturnÚstrc                 C  s    dd  dd„ t| ƒD ƒ¡› d�S )Nú[ú|c                 s  s   � | ]	}|d kr|V  qdS )ÚnoneN© )Ú.0Úkeyr   r   úR/var/www/html/pharmsmart-cdr-gen/venv/lib/python3.10/site-packages/uvicorn/main.pyÚ	<genexpr>)   s   € z%_metavar_from_type.<locals>.<genexpr>ú])Újoinr   )r   r   r   r!   Ú_metavar_from_type(   s    r%   úuvicorn.errorÚctxúclick.ContextÚparamúclick.ParameterÚvalueÚboolÚNonec                 C  s@   |r| j rd S t djtjt ¡ t ¡ t 	¡ d�¡ |  
¡  d S )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_versionr1   Úexit)r'   r)   r+   r   r   r!   Úprint_version/   s   
üÿr<   Ú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.)rC   rD   rE   z--fdz)Bind to socket from this file descriptor.z--reloadFzEnable auto-reload.)Úis_flagrD   rE   z--reload-dirÚreload_dirszRSet reload directories explicitly, instead of using the current working directory.)Úexists)ÚmultiplerE   rC   z--reload-includeÚreload_includeszÆSet 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.)rJ   rE   z--reload-excludeÚreload_excludeszÙSet 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.)rC   rD   rF   rE   z	--workersz~Number of worker processes. Defaults to the $WEB_CONCURRENCY environment variable if available, or 1. Not valid with --reload.)rD   rC   rE   z--loopÚautoz"Event loop factory implementation.)rC   ÚmetavarrD   rE   rF   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-headerszaEnable/Disable X-Forwarded-Proto, X-Forwarded-For to populate url scheme and 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-ipszóComma separated list of IP Addresses, IP Networks, or literals (e.g. UNIX Socket path) to trust with proxy headers. Defaults to the $FORWARDED_ALLOW_IPS environment variable if available, or '127.0.0.1'. The literal '*' means trust everything.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--limit-max-requests-jitterzuMaximum jitter to add to limit_max_requests. Staggers worker restarts to avoid all workers restarting simultaneously.z--timeout-keep-aliveé   zYClose Keep-Alive connections if no new data is received within this timeout (in seconds).z--timeout-graceful-shutdownz8Maximum number of seconds to wait for graceful shutdown.z--timeout-worker-healthcheckzKMaximum number of seconds to wait for a worker to respond to a healthcheck.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-cipherszNCiphers to use (see stdlib ssl module's). Defaults to OpenSSL's safe defaults.z--headerÚheaderszASpecify custom default HTTP response headers as a Name:Value pairz	--versionz%Display the uvicorn version and exit.)rG   ÚcallbackÚexpose_valueÚis_eagerrE   z	--app-dirzuLook for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.)rD   rF   rE   z--h11-max-incomplete-event-sizeÚh11_max_incomplete_event_sizezFFor h11, the maximum number of bytes to buffer of an incomplete event.z--reset-contextvarszXRun each ASGI request in a fresh contextvars.Context. Hides context set in the lifespan.)rG   rD   rE   rF   z	--factoryzFTreat APP as an application factory, i.e. a () -> <ASGI app> callable.ÚhostÚportÚintÚudsÚfdÚloopúLoopFactoryType | strÚhttpúHTTPProtocolType | strÚwsúWSProtocolType | strÚws_max_sizeÚws_max_queueÚws_ping_intervalÚfloatÚws_ping_timeoutÚws_per_message_deflateÚlifespanr   Ú	interfacer   Úreloadú	list[str]Úreload_delayÚworkersÚenv_fileÚ
log_configÚ	log_levelÚ
access_logÚproxy_headersÚserver_headerÚdate_headerÚforwarded_allow_ipsÚ	root_pathÚlimit_concurrencyÚbacklogÚlimit_max_requestsÚlimit_max_requests_jitterÚtimeout_keep_aliveÚtimeout_graceful_shutdownú
int | NoneÚtimeout_worker_healthcheckÚssl_keyfileÚssl_certfileÚssl_keyfile_passwordÚssl_versionÚssl_cert_reqsÚssl_ca_certsÚssl_ciphersú
str | NoneÚ
use_colorsÚapp_dirÚreset_contextvarsÚfactoryc2           2      C  s  t | fi d|“d|“d|“d|“d|“d|“d|“d|“d	|	“d
|
“d|“d|“d|“d|“d|d u r5tn|“d|“d|“d|“d|“d|pGd “d|pLd “d|p¬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/|-“d0|1“d1|.“d2|/“d3|0“Ž d S “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/|-“d0|1“d1|.“d2|/“d3|0“Ž d S )4NrW   rX   rZ   r[   r\   r^   r`   rb   rc   rd   rf   rg   rh   rn   ro   rp   rq   ri   rj   rH   rK   rL   rl   rm   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r~   r   r€   r�   r‚   rƒ   r„   r…   rR   c                 S  s   g | ]}|  d d¡‘qS )ú:é   )Úsplit)r   Úheaderr   r   r!   Ú
<listcomp>å  s    zmain.<locals>.<listcomp>r‡   rŠ   rˆ   rV   r‰   )Úrunr   )2r@   rW   rX   rZ   r[   r\   r^   r`   rb   rc   rd   rf   rg   rh   ri   rj   rH   rK   rL   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r~   r   r€   r�   r‚   rƒ   r„   r…   rR   r‡   rˆ   rV   r‰   rŠ   r   r   r!   Úmain=   sD    }ÿþýüûúùø	÷
öõôóòñ€ðïîíì€ë€êéèçæåäãâá à!ß"Þ#Ý$Ü%Û&Ú'Ù(Ø)×*Ö+Õ,Ô-Ó.Ò/Ñ0Ð1Ï2Îéèçæåäãâá à!ß"Þ#Ý$Ü%Û&Ú'Ù(Ø)×*Ö+Õ,Ô-Ó.Ò/Ñ0Ð1Ï2Îr‘   )2rW   rX   rZ   r[   r\   r^   r`   rb   rc   rd   rf   rg   rh   ri   rj   rH   rK   rL   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r~   r   r€   r�   r‚   rƒ   r„   r…   Ússl_context_factoryrR   r‡   rˆ   rŠ   rV   r‰   ú*ASGIApplication | Callable[..., Any] | strú/type[asyncio.Protocol] | HTTPProtocolType | strú-type[asyncio.Protocol] | WSProtocolType | strúfloat | Noneúlist[str] | str | Noneústr | os.PathLike[str] | NoneúJdict[str, Any] | str | os.PathLike[str] | RawConfigParser | IO[Any] | Noneústr | int | Noner’   úGCallable[[Config, Callable[[], ssl.SSLContext]], ssl.SSLContext] | Noneúlist[tuple[str, str]] | Noneúbool | Nonec       2   7   	   C  sŒ  |/d urt 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.|-“d/|.“d0|0“d1|1“d2|2“Ž}3|3js¬|3jd3krÁt| tƒsÀt 	d4¡}4|4 
d5¡ t  t¡ n|3 ¡  t|3d6�}5zKz,|3jrß|3 ¡ }6t|3|5j|6gd7� ¡  n|3jd3krò|3 ¡ }6t|3|6gd8� ¡  n|5 ¡  W n
 t�y   Y nw W |3j�rtj |3j¡�rt |3j¡ n|3j�r)tj |3j¡�r*t |3j¡ w w w |5j�s@|3j�sB|3jd3k�rDt  t¡ d S d S d S d S )9Nr   rW   rX   rZ   r[   r\   r^   r`   rb   rc   rd   rf   rg   rh   ri   rj   rH   rK   rL   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r~   r   r€   r�   r‚   rƒ   r„   r…   r’   rR   r‡   rŠ   rV   r‰   rŒ   r&   zRYou must pass the application as an import string to enable 'reload' or 'workers'.)Úconfig)ÚtargetÚsockets)r    )ÚsysÚpathÚinsertr   rj   rm   Ú
isinstancer   ÚloggingÚ	getLoggerÚwarningr;   r   Úload_appr   Úshould_reloadÚbind_socketr   r�   r   ÚKeyboardInterruptrZ   ÚosrI   ÚremoveÚstarted)7r@   rW   rX   rZ   r[   r\   r^   r`   rb   rc   rd   rf   rg   rh   ri   rj   rH   rK   rL   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r~   r   r€   r�   r‚   rƒ   r„   r…   r’   rR   r‡   rˆ   rŠ   rV   r‰   rž   ÚloggerÚserverÚsockr   r   r!   r�   î  s
  6ÿþýüûúùø	÷
öõôóòñðïîíìëêéèçæåäãâá à!ß"Þ#Ý$Ü%Û&Ú'Ù(Ø)×*Ö+Õ,Ô-Ó.Ò/Ñ0Ð1Ï2Î4



€

€ÿ€€ÿÿÿr�   Únamec                 C  s8   | dkrt  dt¡ ddlm} |S tdt› d| › �ƒ‚)NÚServerStatezOuvicorn.main.ServerState is deprecated, use uvicorn.server.ServerState instead.r   )r³   zmodule z has no attribute )ÚwarningsÚwarnÚDeprecationWarningÚuvicorn.serverr³   ÚAttributeErrorÚ__name__)r²   r³   r   r   r!   Ú__getattr__x  s   þrº   Ú__main__)r   r   r   r   )r'   r(   r)   r*   r+   r,   r   r-   )fr@   r   rW   r   rX   rY   rZ   r   r[   rY   r\   r]   r^   r_   r`   ra   rb   rY   rc   rY   rd   re   rf   re   rg   r,   rh   r   ri   r   rj   r,   rH   rk   rK   rk   rL   rk   rl   re   rm   rY   rn   r   ro   r   rp   r   rq   r,   rr   r,   rs   r,   rt   r,   ru   r   rv   r   rw   rY   rx   rY   ry   rY   rz   rY   r{   rY   r|   r}   r~   rY   r   r   r€   r   r�   r   r‚   rY   rƒ   rY   r„   r   r…   r†   rR   rk   r‡   r,   rˆ   r   rV   r}   r‰   r,   rŠ   r,   r   r-   )hr@   r“   rW   r   rX   rY   rZ   r†   r[   r}   r\   r]   r^   r”   r`   r•   rb   rY   rc   rY   rd   r–   rf   r–   rg   r,   rh   r   ri   r   rj   r,   rH   r—   rK   r—   rL   r—   rl   re   rm   r}   rn   r˜   ro   r™   rp   rš   rq   r,   rr   r,   rs   r,   rt   r,   ru   r—   rv   r   rw   r}   rx   rY   ry   r}   rz   rY   r{   rY   r|   r}   r~   rY   r   r˜   r€   r˜   r�   r†   r‚   rY   rƒ   rY   r„   r˜   r…   r†   r’   r›   rR   rœ   r‡   r�   rˆ   r†   rŠ   r,   rV   r}   r‰   r,   r   r-   )r²   r   r   r   )>Ú
__future__r   Úasyncior¥   r¬   r8   Ússlr¡   r´   Úcollections.abcr   Úconfigparserr   Útypingr   r   r   r3   r6   Úuvicorn._typesr   Úuvicorn.configr	   r
   r   r   r   r   r   r   r   r   r   r   r·   r   Úuvicorn.supervisorsr   r   ÚChoiceÚlistÚkeysÚLEVEL_CHOICESÚLIFESPAN_CHOICESÚINTERFACE_CHOICESr%   r¦   r¯   r<   ÚcommandÚargumentÚoptionr   rY   ÚPathre   r,   Ú	CERT_NONEr‘   r�   rº   r¹   r   r   r   r!   Ú<module>   s   8



ûû
ûüü	ûüúúúûûûûûûû
û
ûûüüüüüü	üüüüúûüûûûûûûûüúüûûûrmÌ 


ÿ