
    ,hX             "       "   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	m
Z
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 d dlmZ d dlmZmZmZm Z m!Z!m"Z" d dl#m$Z$m%Z% d dl&m'Z' d d	l(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ d d
l0m1Z1 d dl2m3Z3m4Z4m5Z5m6Z6 d dl7m8Z8m9Z9 d dl:m;Z;m<Z<m=Z=m>Z>m?Z? d dl@mAZA d dlBmCZC d dlDmEZE d dlFmGZG d dlHmIZI d dlJmKZKmLZL d dlMmNZNmOZOmPZPmQZQmRZRmSZS d dlMmTZT d dlUmVZVmWZWmXZXmYZY d dlZm[Z[ d dl\m]Z]m^Z^m_Z_ ddddede`de`de`def
d Zad!eXe   d"eXe   deXe   fd#Zbdddd$dddd$d%d&ee   d'ed(ee9   d)ee9   d*e`de`de`de`d+e`defd,Zcd-e'd.eedef   d+e`defd/Zedd e$eK      dddd$dddddfd-e'd0ee   d1eef   d2eeeL   e%f   d3ee   d4ee9   d5ee9   d6e`d7e`d8e`d9e`d:ee   d;e`deeIgeeeeLf   f   fd<Zg	 	 dDd-e'd:ee   d;e`dee[geeeef   f   fd=Zh G d> d?eCj                        Zj G d@ dAeCj                        Zl G dB dCeCj                        Zny)E    N)AsyncExitStackasynccontextmanager)EnumIntEnum)AnyAsyncIteratorCallable	CoroutineDictListMappingOptionalSequenceSetTupleTypeUnion)params)
ModelField	Undefined_get_model_config_model_dump_normalize_errorslenient_issubclass)DefaultDefaultPlaceholder)	Dependant)_should_embed_body_fieldsget_body_fieldget_dependantget_flat_dependantget_parameterless_sub_dependantget_typed_return_annotationsolve_dependencies)jsonable_encoder)FastAPIErrorRequestValidationErrorResponseValidationErrorWebSocketRequestValidationError)DecoratedCallableIncEx)create_cloned_fieldcreate_model_fieldgenerate_unique_idget_value_or_defaultis_body_allowed_for_status_code)	BaseModel)routing)run_in_threadpool)HTTPException)Request)JSONResponseResponse)	BaseRouteMatchcompile_pathget_namerequest_responsewebsocket_session)Mount)AppTypeASGIAppLifespanScope	WebSocket)	AnnotatedDoc
deprecatedF)exclude_defaultsexclude_noneresexclude_unsetrH   rI   returnc                   t        | t              r*t        t        |       dd       }|r| S t	        | d|||      S t        | t
              r| D cg c]  }t        ||||       c}S t        | t              r1| j                         D ci c]  \  }}|t        ||||       c}}S t        j                  |       rt        j                  |       S | S c c}w c c}}w )Nread_with_orm_modeT)by_aliasrK   rH   rI   rK   rH   rI   )
isinstancer1   getattrr   r   list_prepare_response_contentdictitemsdataclassesis_dataclassasdict)rJ   rK   rH   rI   rN   itemkvs           Q/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/fastapi/routing.pyrT   rT   O   s    #y!$%6s%;=QSWX
 J'-%
 	
 
C	 
  &+!1)	
 	
 
C	 		
 1 (+!1)	 
 	
 
	!	!#	&!!#&&J+

s   CCoriginal_contextnested_contextc           	      x     t         dt        dt        t        t        t
        t        f         f fd       }|S )NapprL   c                ,  K    |       4 d {   } |       4 d {   }||d  ni |xs i |xs i  d d d       d {    d d d       d {    y 7 Q7 B7 # 1 d {  7  sw Y   )xY w7  # 1 d {  7  sw Y   y xY wwN )ra   maybe_original_statemaybe_nested_stater_   r^   s      r]   merged_lifespanz0_merge_lifespan_context.<locals>.merged_lifespan   s      $C( 	Y 	Y,@%c* Y Y.@%-2F2NJX06BX<P<VTVXX	Y Y	Y 	Y 	YY Y Y Y Y	Y 	Y 	Y 	Ys   BA"BA?A$A?A(A?A&A?BA=B$A?&A?(A:	.A1/A:	6A?=B?BBBB)r   r?   r   r   r   strr   )r^   r_   rg   s   `` r]   _merge_lifespan_contextri   ~   sF     YY	xS 12	3Y Y     T)fieldincludeexcluderO   rK   rH   rI   is_coroutinerk   response_contentrl   rm   rO   rn   c        	   	        K   | rg }	t        | d      st        ||||      }|r| j                  |i d      \  }
}n$t        | j                  |i d       d {   \  }
}t	        |t
              r|	j                  |       n|r|	j                  |       |	rt        t        |	      |      t        | d      r| j                  |
||||||      S t        |
||||||      S t        |      S 7 w)N	serializerP   )response)loc)errorsbody)rl   rm   rO   rK   rH   rI   )hasattrrT   validater3   rQ   rS   extendappendr(   r   rq   r%   )rk   ro   rl   rm   rO   rK   rH   rI   rn   rt   valueerrors_s               r]   serialize_responser|      s!     uk*8 +!1)	  "^^,<bm^TNE7#4 0"-$ NE7 gt$MM'"MM'")(07G  5+&??!+!1) #    '-%
 	
   011Cs   AC0C.BC0	dependantvaluesc                    K   | j                   J d       |r | j                   di | d {   S t        | j                   fi | d {   S 7 "7 w)N!dependant.call must be a functionrd   )callr3   r}   r~   rn   s      r]   run_endpoint_functionr      sU     
 >>%J'JJ#Y^^-f---&y~~@@@@ .@s!   +AAAAAA
body_fieldstatus_coderesponse_classresponse_fieldresponse_model_includeresponse_model_excluderesponse_model_by_aliasresponse_model_exclude_unsetresponse_model_exclude_defaultsresponse_model_exclude_nonedependency_overrides_providerembed_body_fieldsc                 V   	
  j                   J d       t        j                   j                         xr$ t        j                  t
        j                        t        |t              r|j                  n|dt        dt        f 	
fd}|S )Nr   requestrL   c                 R  K   d }t               4 d {   }	 d }rr4| j                          d {   }|j                  |j                         n| j	                          d {   }|rt
        }| j                  j                  d      }|s| j                          d {   }ntt        j                  j                         }||d<   |j                         dk(  r>|j                         }|dk(  s|j                  d      r| j                          d {   }|t
        k7  r|}n|}g }t               4 d {   }t-        | ||       d {   }|j.                  }|s2t1        |j2                         d {   }t5        |t6              r |j8                  |j:                  |_        |}nd|j:                  i}!r!n|j<                  j>                  }|||d<   |j<                  j>                  r|j<                  j>                  |d<   tA        | 	       d {   } |fi |}tC        |j>                        sd|_        |j                  jD                  jG                  |j<                  j                  jD                         d d d       d {    |rt!        tI        |      |
      }
|
d d d       d {    |tK        d      |S 7 7 7 7 I7 # t        j                  $ r>}	t!        dd|	j"                  fdi d|	j$                  id	g|	j&                  
      }
|
|	d }	~	wt(        $ r  t*        $ r}	t)        dd      }||	d }	~	ww xY w7 07 7 7 G7 # 1 d {  7  sw Y   xY w7 # 1 d {  7  sw Y   xY ww)Nzcontent-typeapplicationjsonz+jsonjson_invalidru   zJSON decode errorerror)typers   msginputctx)ru   i  z#There was an error parsing the body)r   detail)r   r}   ru   r   async_exit_stackr   r   
backgroundr   )	rk   ro   rl   rm   rO   rK   rH   rI   rn   rj   a}  No response object was returned. There's a high chance that the application code is raising an exception and a dependency with yield has a block with a bare except, or a block with except Exception, and is not raising the exception again. Read more about it in the docs: https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-except)&r   formpush_async_callbackcloseru   r   headersgetr   emailmessageMessageget_content_maintypeget_content_subtypeendswithJSONDecodeErrorr'   posr   docr4   	Exceptionr$   rt   r   r~   rQ   r7   r   background_tasksrr   r   r|   r0   rawrx   r   r&   )"r   rr   
file_stackru   
body_bytes	json_bodycontent_type_valuer   subtypeevalidation_error
http_errorrt   r   solved_resultraw_responseresponse_argscurrent_status_codecontentactual_response_classr   r}   r   r   is_body_formrn   r   r   r   r   r   r   r   r   s"                      r]   ra   z get_request_handler.<locals>.app   s    *.!# h	' h	'z-( #%,\\^3"66tzzB+2<<>%9
%-6I181D1D^1T.#529,,.,@	*/--*?*?*A:L 7#*#?#?#A]#R.5.I.I.KG'.&'8G<L<LW<U:A,,.4H	(I5'0'1. !#F%' 3X 3X+;&8#'2O%5&7' ! '--)>"+,33%1* $L
 ",9'22:6C6T6TL3#/ )-*H*H9  + (!.!7!7!C!C ,
 /:;NM-8(11== - 6 6 B B *-8 );"0-9$:$:%<*F-L)D)5
) 
# $9#RM#R>x?S?ST,/HM ((,,33M4J4J4R4R4V4VWg3X 3Xh #9%f-D$  '&Qh	' h	'R G  ch	'
  4 &:
 -A 5I
 '' .#9 %3$*AEE?#6%'$+QUU#3 $  'A-   (* #,Q
 !a'	(3X!$4
#K3X 3X 3X 3Xah	' h	' h	' h	's4  N'K%N'NK4K(3K4(K+)<K4%K.&A4K4K1K4-N=M->NM;M0.M;M3B)M;/M60A,M;N'M9(NN'NN'(K4+K4.K41K44M*9M  M*M%%M**N0M;3M;6M;9N;N	NN		NN'N$NN$ N')r   asyncioiscoroutinefunctionrQ   
field_infor   Formr   rz   r5   r7   )r}   r   r   r   r   r   r   r   r   r   r   r   r   ra   r   r   rn   s   ``` ````````` @@@r]   get_request_handlerr      s     >>%J'JJ..y~~>LP*Z-B-BFKK"PL."450>0D0D .s7 sx s s sj Jrj   c                 ,     dt         dd f fd}|S )N	websocketrL   c                   K   t               4 d {   }|| j                  d<   t        | |       d {   }|j                  rt	        t        |j                              j                  J d        j                  di |j                   d {    d d d       d {    y 7 7 x7 7 # 1 d {  7  sw Y   y xY ww)Nfastapi_astack)r   r}   r   r   r   r   rd   )r   scoper$   rt   r)   r   r   r~   )r   r   r   r}   r   r   s      r]   ra   zget_websocket_app.<locals>.appm  s     !# 	9 	9'7 1AIOO,-"4!#.K!1"3# M ##5%m&:&:;  >>-R/RR )..8=#7#7888#	9 	9 	9
 9#	9 	9 	9 	9sg   CB0C#B8B2A B8B4B8C*B6+C2B84B86C8C
>C?C
CrC   )r}   r   r   ra   s   ``` r]   get_websocket_appr   h  s    
9Y 94 9( Jrj   c                        e Zd Zdddddededef   dee   deeej                        dee   d	dfd
Z
ded	eeef   f fdZ xZS )APIWebSocketRouteN)namedependenciesr   pathendpoint.r   r   r   rL   c                x   || _         || _        |t        |      n|| _        t	        |xs g       | _        t        |      \  | _        | _        | _	        t        | j                  | j                        | _        | j
                  d d d   D ]=  }| j                  j
                  j                  dt        || j                               ? t        | j                        | _        t!        | j                  j"                        | _        t'        t)        | j                  || j$                              | _        y )Nr   r   r   dependsr   )r}   r   r   )r   r   r;   r   rS   r   r:   
path_regexpath_formatparam_convertorsr    r}   insertr"   r!   _flat_dependantr   body_params_embed_body_fieldsr=   r   ra   )selfr   r   r   r   r   r   s          r]   __init__zAPIWebSocketRoute.__init__  s	    	 *.,HX&D	 !34COPTCU@)4+@&D,<,<4==Q((2. 	GNN''../dFVFVW	
  2$..A";  ,,#
 %...K"&"9"9
rj   r   c                 `    t         |   |      \  }}|t        j                  k7  r| |d<   ||fS Nroutesupermatchesr9   NONEr   r   matchchild_scope	__class__s       r]   r   zAPIWebSocketRoute.matches  7    "W_U3{EJJ#'K k!!rj   )__name__
__module____qualname__rh   r	   r   r   r   r   Dependsr   rB   r   r9   r   __classcell__r   s   @r]   r   r     s     #;?7;

 38$

 sm
 x78
 (0}
 

@"U "uUE\': " "rj   r   c            8           e Zd Z ed      dddddddddddddddddd ee      ddd ee      ddededef   d	ed
e	e
   de	eeeef         de	eej                         de	e   de	e   dede	eee
ef   eeef   f      de	e   de	e   de	eee   ee   f      de	e   de	e   de	e   dedededededeee   ef   de	e   de	ee      de	eeef      d eed gef   ef   d!df6d"Zd!eegeeeef   f   fd#Zd$ed!eeef   f fd%Z  xZ!S )&APIRouteNSuccessful ResponseTF)response_modelr   tagsr   summarydescriptionresponse_description	responsesrG   r   methodsoperation_idr   r   r   r   r   r   include_in_schemar   r   	callbacksopenapi_extragenerate_unique_id_functionr   r   .r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rL   c                X   || _         || _        t        |t              r t	        |      }t        |t              rd }n|}|| _        || _        |	| _	        || _
        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        |xs g | _        |
xs i | _        |t5        |      n|| _        t9        |      \  | _        | _        | _        |dg}|D ch c]  }|jA                          c}| _!        t        |t              r|jD                  }n|}| j                  xs  ||       | _#        t        |tH              rtK        |      }|| _&        | j                  r]tO        |      sJ d| d       d| jF                  z   }tQ        || j                  d      | _)        tU        | jR                        | _+        nd | _)        d | _+        tY        |xs g       | _-        |xs- t]        j^                  | j                  j`                  xs d      | _1        | jb                  je                  d      d	   jg                         | _1        i }| j2                  ji                         D ]k  \  } }!t        |!tj              sJ d
       |!jm                  d      }"|"s1tO        |       sJ d|  d       d|  d| jF                   }tQ        ||"d      }#|#|| <   m |r|| _7        ni | _7        tq        |      sJ d       ts        | j<                  | j                        | _:        | jZ                  d d d   D ]=  }$| jt                  jZ                  jw                  d	ty        |$| j<                               ? t{        | jt                        | _>        t        | j|                  j                        | _A        t        | j|                  | jF                  | j                        | _C        t        | j                               | _F        y c c}w )NGETzStatus code z must not have a response body	Response_serialization)r   type_mode r   z%An additional response must be a dictmodel_zAn endpoint must be a callabler   r   r   )flat_dependantr   r   )Gr   r   rQ   r   r#   r   r7   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r;   r   r:   r   r   r   upperr   rz   	unique_idr   intr   r0   r-   r   r,   secure_cloned_response_fieldrS   r   inspectcleandoc__doc__r   splitstriprV   rU   r   response_fieldscallabler    r}   r   r"   r!   r   r   r   r   r   r   r<   get_route_handlerra   )%r   r   r   r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   return_annotationmethodcurrent_generate_unique_idresponse_namer  additional_status_coderr   r  r   r   s%                                        r]   r   zAPIRoute.__init__  s   D 	 n&89 ;H E!"3X>!%!2,$8!$(&<#&<#'>$,H)/N,+F(!2,-J*"*+F(JB	"b*.,HX&D	COPTCU@)4+@?gG?F!GV&,,.!G13EF+11 ' *E&**N.H.Nk7+k*K&2;? {m+IJ ($..8M"4"))$#D $D$7$78 - #'D04D- !34&W'*:*:4==;P;P;VTV*W  ++11$7:@@B040D0D0F 	I,"Hh-V/VVLL)E67MN "#9"::XY #,,B+C1T^^DT U!3&e/" ;I 67	I FUD #%D !C#CC&D,<,<4==Q((2. 	GNN''../dFVFVW	
  2$..A";  ,,#
 )//"55

 $D$:$:$<=W "Hs   P'c                 6   t        | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  | j                        S )N)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   s    r]   r  zAPIRoute.get_route_handler;  s    "nn((..<<#'#>#>#'#>#>$($@$@)-)J)J,0,P,P(,(H(H*.*L*L"55
 	
rj   r   c                 `    t         |   |      \  }}|t        j                  k7  r| |d<   ||fS r   r   r   s       r]   r   zAPIRoute.matchesL  r   rj   )"r   r   r   r   r6   r.   rh   r	   r   r   r  r   r   r   r   r   r   r   boolr   r+   r   r7   r   r8   r   r5   r
   r  rB   r   r9   r   r   r   s   @r]   r   r     s    &dm%)15;?!%%)$9EI%)"8<&*2626(,-205,1"&DKE
 8</326 &'AL>L> 38$L>
 L> c]L> tE#t),-.L> x78L> #L> c]L> "L> DsCx$sCx.!@ABL> TNL> smL> %C$s) 345L>  sm!L>" !)#L>$ !)%L>& "&'L>( '+)L>* *.+L>, &*-L>.  /L>0 d8n.@@A1L>6 (0}7L>8 DO,9L>:  S#X/;L>< &+j\3&');;&
=L>B 
CL>\
8WIyc8AS7T,T#U 
""U "uUE\': " "rj   r   c            8       %    e Zd ZdZddd ee      ddddddeddddd ee      ddee	 e
d      f   deeeee	ef          e
d	      f   d
eeeej"                         e
d      f   deee    e
d      f   deeeeee	f   ee	ef   f       e
d      f   deeee       e
d      f   deeee       e
d       ed      f   dee e
d      f   deee    e
d      f   deee    e
d      f   deee    e
d      f   deeeeg ef          e
d      f   deeeeg ef          e
d       f   d!eeee       e
d"      f   d#eee    e
d$      f   d%ee e
d&      f   d'eeege	f    e
d(      f   d)df$ fd*Z	 	 	 dud+e	d,eee	      d-ee	   d%ed)eegef   f
d.Z ed      dddddd/dddddddd0d0d0d ee      dddd ee      d1d+e	d2ed3ef   d4ed5ee   deeee	ef         d
eeej"                        d6ee	   d7ee	   d8e	deeeee	f   ee	ef   f      d#ee   d,eee e	   ee	   f      d9ee	   d:ee!   d;ee!   d<ed=ed>ed?ed%ed@eee   e"f   d-ee	   dAeee      deee      dBeee	ef      d'eeege	f   e"f   d)df6dCZ# ed      dddddd/dddddddd0d0d0d ee      ddd ee      dDd+e	d4ed5ee   deeee	ef         d
eeej"                        d6ee	   d7ee	   d8e	deeeee	f   ee	ef   f      d#ee   d,eee	      d9ee	   d:ee!   d;ee!   d<ed=ed>ed?ed%ed@ee   d-ee	   deee      dBeee	ef      d'eege	f   d)eegef   f2dEZ$	 dvddFd+e	d2ed3ef   d-ee	   d
eeej"                        d)df
dGZ%	 dvddFd+ee	 e
dH      f   d-eee	    e
dI      f   d
eeeej"                         e
dJ      f   d)eegef   fdKZ&	 dvd+e	d-ee	df   d)eegef   fdLZ'ddd ee      dddd ee      dM	dNed  e
dO      f   dee	 e
d      f   deeeee	ef          e
d	      f   d
eeeej"                         e
d      f   deee    e
d      f   deeeeee	f   ee	ef   f       e
d      f   deeee       e
d      f   d#eee    e
d$      f   d%ee e
dP      f   d'eeege	f    e
d(      f   d)dfdQZ( ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0diZ) ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0djZ* ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0dkZ+ ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0dlZ, ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0dmZ- ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0dnZ. ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0doZ/ ed      dddddd/ddddddd0d0d0d ee      ddd ee      dRd+ee	 e
dS      f   d4ee e
dT      f   d5eee    e
dU      f   deeeee	ef          e
dV      f   d
eeeej"                         e
dW      f   d6eee	    e
dX      f   d7eee	    e
dY      f   d8ee	 e
dZ      f   deeeeee	f   ee	ef   f       e
d[      f   d#eee    e
d\      f   d9eee	    e
d]      f   d:eee!    e
d^      f   d;eee!    e
d_      f   d<ee e
d`      f   d=ee e
da      f   d>ee e
db      f   d?ee e
dc      f   d%ee e
dd      f   d@eee    e
de      f   d-eee	    e
df      f   deeee       e
dg      f   dBeeee	ef       e
dh      f   d'eeege	f    e
d(      f   d)eegef   f0dpZ0 edq      dree	 e
ds      f   d)eegef   fdt       Z1 xZ2S )w	APIRoutera  
    `APIRouter` class, used to group *path operations*, for example to structure
    an app in multiple files. It would then be included in the `FastAPI` app, or
    in another `APIRouter` (ultimately included in the app).

    Read more about it in the
    [FastAPI docs for Bigger Applications - Multiple Files](https://fastapi.tiangolo.com/tutorial/bigger-applications/).

    ## Example

    ```python
    from fastapi import APIRouter, FastAPI

    app = FastAPI()
    router = APIRouter()


    @router.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "Rick"}, {"username": "Morty"}]


    app.include_router(router)
    ```
    r  NT)prefixr   r   default_response_classr   r   routesredirect_slashesdefaultr   route_class
on_startupon_shutdownlifespanrG   r   r   r  z'An optional path prefix for the router.r   a  
                A list of tags to be applied to all the *path operations* in this
                router.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
                r   a  
                A list of dependencies (using `Depends()`) to be applied to all the
                *path operations* in this router.

                Read more about it in the
                [FastAPI docs for Bigger Applications - Multiple Files](https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter-with-a-custom-prefix-tags-responses-and-dependencies).
                r   a
  
                The default response class to be used.

                Read more in the
                [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class).
                r   a*  
                Additional responses to be shown in OpenAPI.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Additional Responses in OpenAPI](https://fastapi.tiangolo.com/advanced/additional-responses/).

                And in the
                [FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter-with-a-custom-prefix-tags-responses-and-dependencies).
                r   ao  
                OpenAPI callbacks that should apply to all *path operations* in this
                router.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
                r!  a  
                **Note**: you probably shouldn't use this parameter, it is inherited
                from Starlette and supported for compatibility.

                ---

                A list of routes to serve incoming HTTP and WebSocket requests.
                a5  
                You normally wouldn't use this parameter with FastAPI, it is inherited
                from Starlette and supported for compatibility.

                In FastAPI, you normally would use the *path operation methods*,
                like `router.get()`, `router.post()`, etc.
                r"  z
                Whether to detect and redirect slashes in URLs when the client doesn't
                use the same format.
                r#  z
                Default function handler for this router. Used to handle
                404 Not Found errors.
                r   z
                Only used internally by FastAPI to handle dependency overrides.

                You shouldn't need to use it. It normally points to the `FastAPI` app
                object.
                r$  a4  
                Custom route (*path operation*) class to be used by this router.

                Read more about it in the
                [FastAPI docs for Custom Request and APIRoute class](https://fastapi.tiangolo.com/how-to/custom-request-and-route/#custom-apiroute-class-in-a-router).
                r%  z
                A list of startup event handler functions.

                You should instead use the `lifespan` handlers.

                Read more in the [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
                r&  a  
                A list of shutdown event handler functions.

                You should instead use the `lifespan` handlers.

                Read more in the
                [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
                r'  a'  
                A `Lifespan` context manager handler. This replaces `startup` and
                `shutdown` functions with a single context manager.

                Read more in the
                [FastAPI docs for `lifespan`](https://fastapi.tiangolo.com/advanced/events/).
                rG   aa  
                Mark all *path operations* in this router as deprecated.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
                r   a  
                To include (or not) all the *path operations* in this router in the
                generated OpenAPI.

                This affects the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
                r   a  
                Customize the function used to generate unique IDs for the *path
                operations* shown in the generated OpenAPI.

                This is particularly useful when automatically generating clients or
                SDKs for your API.

                Read more about it in the
                [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
                rL   c                `   t         |   |||	|||       |r0|j                  d      sJ d       |j                  d      rJ d       || _        |xs g | _        t        |xs g       | _        || _        || _	        |xs i | _
        |xs g | _        |
| _        || _        || _        || _        y )N)r!  r"  r#  r%  r&  r'  /!A path prefix must start with '/'FA path prefix must not end with '/', as the routes will start with '/')r   r   
startswithr   r  r   rS   r   rG   r   r   r   r   r$  r   r   )r   r  r   r   r   r   r   r!  r"  r#  r   r$  r%  r&  r'  rG   r   r   r   s                     r]   r   zAPIRouter.__init__n  s    n 	-!# 	 	
 $$S)N+NNs+ X ,0JB	 !34$!2"b"b-J*&&<#+F(rj   r   r   r   c                 <     dt         dt         f fd}|S )NfuncrL   c                 4    j                  |        | S )N)r   r   r   )	add_route)r.  r   r   r   r   r   s    r]   	decoratorz"APIRouter.route.<locals>.decoratore  s*    NN"3   Krj   r*   )r   r   r   r   r   r1  s   ````` r]   r   zAPIRouter.route^  s%    	- 	2C 	 	 rj   r   Fr   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   route_class_overrider   r   r   r   .r   r   r   r   r   r   r   r   r   r   r   r   r   r4  r   c                   |xs | j                   }|
xs i }
i | j                  |
}t        || j                        }| j                  j                         }|r|j                  |       | j                  j                         }|r|j                  |       | j                  j                         } |r| j                  |       t        || j                        }! || j                  |z   fi d|d|d|d|d|d|d|d|	d	|d
|xs | j                  d|d|d|d|d|d|d|d|d|xr | j                  d|d|d| j                  d| d|d|!}"| j                  j                  |"       y )Nr   r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r$  r   r/   r   r   copyrx   r   r   r   r  rG   r   r   r!  ry   )#r   r   r   r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r4  r   r   r   r$  combined_responsescurrent_response_classcurrent_tagscurrent_dependenciescurrent_callbacksr  r   s#                                      r]   add_api_routezAPIRouter.add_api_routeq  s   D +>d.>.>O	<<)<!5D77"
 yy~~'%#00557 ''5 NN//1$$Y/%9')I)I&
" KK$

 *
 $	

 
 .
 
 $
 "6
 )
 "4T__
 
 &
 $:
 $:
  %<!
" *F#
$ -L%
& )D'
( 0JD4J4J)
* 2+
, -
. +/*L*L/
0 (1
2 (3
4 )C5
8 	5!rj   r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   c                    	
 dt         dt         f
	 fd}|S )Nr.  rL   c                 \    j                  | 
	       | S )Nr=  )r<  )r.  r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s    r]   r1  z&APIRouter.api_route.<locals>.decorator  sh    -')'%9#%)'='=(?-I0O,G"3-#+,G3  6 Krj   r2  )r   r   r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r1  s   ````````````````````````` r]   	api_routezAPIRouter.api_route  s2    <	- 	2C 	 	 	 	< rj   )r   c                    | j                   j                         }|r|j                  |       t        | j                  |z   |||| j
                        }| j                  j                  |       y )N)r   r   r   r   )r   r6  rx   r   r  r   r!  ry   )r   r   r   r   r   r:  r   s          r]   add_api_websocket_routez!APIRouter.add_api_websocket_route  sf      $00557 ''5!KK$-*.*L*L
 	5!rj   z1
                WebSocket path.
                zQ
                A name for the WebSocket. Only used internally.
                a  
                A list of dependencies (using `Depends()`) to be used for this
                WebSocket.

                Read more about it in the
                [FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).
                c                8     dt         dt         f fd}|S )a  
        Decorate a WebSocket function.

        Read more about it in the
        [FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/).

        **Example**

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI, WebSocket

        app = FastAPI()
        router = APIRouter()

        @router.websocket("/ws")
        async def websocket_endpoint(websocket: WebSocket):
            await websocket.accept()
            while True:
                data = await websocket.receive_text()
                await websocket.send_text(f"Message text was: {data}")

        app.include_router(router)
        ```
        r.  rL   c                 2    j                  |        | S )N)r   r   )rB  )r.  r   r   r   r   s    r]   r1  z&APIRouter.websocket.<locals>.decoratorQ  s&    ((dL )  Krj   r2  )r   r   r   r   r1  s   ```` r]   r   zAPIRouter.websocket  s&    v	- 	2C 	 	 rj   c                 4     dt         dt         f fd}|S )Nr.  rL   c                 0    j                  |        | S )Nr   )add_websocket_route)r.  r   r   r   s    r]   r1  z,APIRouter.websocket_route.<locals>.decorator\  s    $$T4d$;Krj   r2  )r   r   r   r1  s   ``` r]   websocket_routezAPIRouter.websocket_routeY  s     	- 	2C 	 rj   )	r  r   r   r   r   r   rG   r   r   routerzThe `APIRouter` to include.z
                Include (or not) all the *path operations* in this router in the
                generated OpenAPI schema.

                This affects the generated OpenAPI (e.g. visible at `/docs`).
                c       	         	   |r0|j                  d      sJ d       |j                  d      rEJ d       |j                  D ]/  }t        |d      }t        |dd      }||r"t	        d| d	       |i }|j                  D ]  }t        |t              r7i ||j                  }t        |j                  |j                  || j                        }g }|r|j                  |       |j                  r|j                  |j                         g }|r|j                  |       |j                  r|j                  |j                         g }|r|j                  |       |j                  r|j                  |j                         t        |j                  |j                  |
| j                        }| j!                  ||j"                  z   |j$                  |j&                  |j(                  |||j*                  |j,                  |j.                  ||j0                  xs |xs | j0                  |j2                  |j4                  |j6                  |j8                  |j:                  |j<                  |j>                  |j@                  |jB                  xr | jB                  xr |	||jD                  tG        |      ||jH                  |
       Lt        |tJ        jL                        r\tO        |j2                  xs g       }| jQ                  ||j"                  z   |j$                  ||jB                  |jD                         t        |tR              rtg }|r|j                  |       |j                  r|j                  |j                         | jU                  ||j"                  z   |j$                  ||jD                         Ft        |tJ        jV                        sb| jY                  ||j"                  z   |j$                  |jD                          |jZ                  D ]  }| j]                  d|        |j^                  D ]  }| j]                  d|        ta        | jb                  |jb                        | _1        y)a|  
        Include another `APIRouter` in the same current `APIRouter`.

        Read more about it in the
        [FastAPI docs for Bigger Applications](https://fastapi.tiangolo.com/tutorial/bigger-applications/).

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI

        app = FastAPI()
        internal_router = APIRouter()
        users_router = APIRouter()

        @users_router.get("/users/")
        def read_users():
            return [{"name": "Rick"}, {"name": "Morty"}]

        internal_router.include_router(users_router)
        app.include_router(internal_router)
        ```
        r)  r*  r+  r   r   unknownNz6Prefix and path cannot be both empty (path operation: )r3  )r   r   r   )r   r   rG  startupshutdown)2r,  r   r!  rR   r&   rQ   r   r   r/   r   r   rx   r   r   r   r   r<  r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r2   RouterS   r0  r   rB  WebSocketRouterH  r%  add_event_handlerr&  ri   lifespan_context)r   rJ  r  r   r   r   r   r   rG   r   r   rr   r   r   r7  use_response_classr9  r:  r;  r  r   handlers                          r]   include_routerzAPIRouter.include_routerb  s   N $$S)N+NNs+ X ]] q&)q&)4#D&PQUPVVWX 	 I]] T	E%*%E	%EU__%E"%9((11*//	&"  " ''-:: ''

3=?$(//=%%(//0B0BC$&!%,,Y7??%,,U__=-A5566/44	.* ""UZZ'NN#(#7#7 % 1 1%!5!MM % 1 1).)C)C0$//P:P!MM!&!3!3+0+G+G+0+G+G,1,I,I161S1S494Y4Y050Q0Q&+&=&= '*..'*)#5)-e/"'"5"50J9 # < E7==1u}}23UZZ'NN#&+&=&=   E#45')$(//=%%(//0B0BC,,UZZ'NN!5	 -  E7#9#9:((UZZ'ejj ) eT	j (( 	7G""9g6	7)) 	8G"":w7	8 7!!##!
rj   )r   r   r   r   r   r   r   r   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   z
                The URL path to be used for this *path operation*.

                For example, in `http://example.com/items`, the path is `/items`.
                a  
                The type to use for the response.

                It could be any valid Pydantic *field* type. So, it doesn't have to
                be a Pydantic model, it could be other things, like a `list`, `dict`,
                etc.

                It will be used for:

                * Documentation: the generated OpenAPI (and the UI at `/docs`) will
                    show it as the response (JSON Schema).
                * Serialization: you could return an arbitrary object and the
                    `response_model` would be used to serialize that object into the
                    corresponding JSON.
                * Filtering: the JSON sent to the client will only contain the data
                    (fields) defined in the `response_model`. If you returned an object
                    that contains an attribute `password` but the `response_model` does
                    not include that field, the JSON sent to the client would not have
                    that `password`.
                * Validation: whatever you return will be serialized with the
                    `response_model`, converting any data as necessary to generate the
                    corresponding JSON. But if the data in the object returned is not
                    valid, that would mean a violation of the contract with the client,
                    so it's an error from the API developer. So, FastAPI will raise an
                    error and return a 500 error code (Internal Server Error).

                Read more about it in the
                [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).
                aM  
                The default status code to be used for the response.

                You could override the status code by returning a response directly.

                Read more about it in the
                [FastAPI docs for Response Status Code](https://fastapi.tiangolo.com/tutorial/response-status-code/).
                ac  
                A list of tags to be applied to the *path operation*.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/#tags).
                a[  
                A list of dependencies (using `Depends()`) to be applied to the
                *path operation*.

                Read more about it in the
                [FastAPI docs for Dependencies in path operation decorators](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/).
                aL  
                A summary for the *path operation*.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
                a  
                A description for the *path operation*.

                If not provided, it will be extracted automatically from the docstring
                of the *path operation function*.

                It can contain Markdown.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Path Operation Configuration](https://fastapi.tiangolo.com/tutorial/path-operation-configuration/).
                z
                The description for the default response.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).
                z
                Additional responses that could be returned by this *path operation*.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).
                z
                Mark this *path operation* as deprecated.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).
                a  
                Custom operation ID to be used by this *path operation*.

                By default, it is generated automatically.

                If you provide a custom operation ID, you need to make sure it is
                unique for the whole API.

                You can customize the
                operation ID generation with the parameter
                `generate_unique_id_function` in the `FastAPI` class.

                Read more about it in the
                [FastAPI docs about how to Generate Clients](https://fastapi.tiangolo.com/advanced/generate-clients/#custom-generate-unique-id-function).
                a\  
                Configuration passed to Pydantic to include only certain fields in the
                response data.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
                aW  
                Configuration passed to Pydantic to exclude certain fields in the
                response data.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
                a|  
                Configuration passed to Pydantic to define if the response model
                should be serialized by alias when an alias is used.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_include-and-response_model_exclude).
                a  
                Configuration passed to Pydantic to define if the response data
                should have all the fields, including the ones that were not set and
                have their default values. This is different from
                `response_model_exclude_defaults` in that if the fields are set,
                they will be included in the response, even if the value is the same
                as the default.

                When `True`, default values are omitted from the response.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
                a  
                Configuration passed to Pydantic to define if the response data
                should have all the fields, including the ones that have the same value
                as the default. This is different from `response_model_exclude_unset`
                in that if the fields are set but contain the same default values,
                they will be excluded from the response.

                When `True`, default values are omitted from the response.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#use-the-response_model_exclude_unset-parameter).
                a~  
                Configuration passed to Pydantic to define if the response data should
                exclude fields set to `None`.

                This is much simpler (less smart) than `response_model_exclude_unset`
                and `response_model_exclude_defaults`. You probably want to use one of
                those two instead of this one, as those allow returning `None` values
                when it makes sense.

                Read more about it in the
                [FastAPI docs for Response Model - Return Type](https://fastapi.tiangolo.com/tutorial/response-model/#response_model_exclude_none).
                a  
                Include this *path operation* in the generated OpenAPI schema.

                This affects the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for Query Parameters and String Validations](https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#exclude-from-openapi).
                ae  
                Response class to be used for this *path operation*.

                This will not be used if you return a response directly.

                Read more about it in the
                [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/#redirectresponse).
                zW
                Name for this *path operation*. Only used internally.
                a  
                List of *path operations* that will be used as OpenAPI callbacks.

                This is only for OpenAPI documentation, the callbacks won't be used
                directly.

                It will be added to the generated OpenAPI (e.g. visible at `/docs`).

                Read more about it in the
                [FastAPI docs for OpenAPI Callbacks](https://fastapi.tiangolo.com/advanced/openapi-callbacks/).
                ah  
                Extra metadata to be included in the OpenAPI schema for this *path
                operation*.

                Read more about it in the
                [FastAPI docs for Path Operation Advanced Configuration](https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#custom-openapi-path-operation-schema).
                c                V    | j                  |||||||||	|
dg|||||||||||||      S )ax  
        Add a *path operation* using an HTTP GET operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI

        app = FastAPI()
        router = APIRouter()

        @router.get("/items/")
        def read_items():
            return [{"name": "Empanada"}, {"name": "Arepa"}]

        app.include_router(router)
        ```
        r   r   r   r   r   r   r   r   r   r   rG   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   rG   r   r   r   r   r   r   r   r   r   r   r   r   r   s                           r]   r   zAPIRouter.getV  se    |
 ~~)#%#!5!G%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a%  
        Add a *path operation* using an HTTP PUT operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI
        from pydantic import BaseModel

        class Item(BaseModel):
            name: str
            description: str | None = None

        app = FastAPI()
        router = APIRouter()

        @router.put("/items/{item_id}")
        def replace_item(item_id: str, item: Item):
            return {"message": "Item replaced", "id": item_id}

        app.include_router(router)
        ```
        PUTrY  rZ  r[  s                           r]   putzAPIRouter.put  se    F ~~)#%#!5!G%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a  
        Add a *path operation* using an HTTP POST operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI
        from pydantic import BaseModel

        class Item(BaseModel):
            name: str
            description: str | None = None

        app = FastAPI()
        router = APIRouter()

        @router.post("/items/")
        def create_item(item: Item):
            return {"message": "Item created"}

        app.include_router(router)
        ```
        POSTrY  rZ  r[  s                           r]   postzAPIRouter.postM  e    F ~~)#%#!5!H%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a  
        Add a *path operation* using an HTTP DELETE operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI

        app = FastAPI()
        router = APIRouter()

        @router.delete("/items/{item_id}")
        def delete_item(item_id: str):
            return {"message": "Item deleted"}

        app.include_router(router)
        ```
        DELETErY  rZ  r[  s                           r]   deletezAPIRouter.delete	  se    |
 ~~)#%#!5!J%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a  
        Add a *path operation* using an HTTP OPTIONS operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI

        app = FastAPI()
        router = APIRouter()

        @router.options("/items/")
        def get_item_options():
            return {"additions": ["Aji", "Guacamole"]}

        app.include_router(router)
        ```
        OPTIONSrY  rZ  r[  s                           r]   optionszAPIRouter.optionsD  se    |
 ~~)#%#!5!K%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a0  
        Add a *path operation* using an HTTP HEAD operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI
        from pydantic import BaseModel

        class Item(BaseModel):
            name: str
            description: str | None = None

        app = FastAPI()
        router = APIRouter()

        @router.head("/items/", status_code=204)
        def get_items_headers(response: Response):
            response.headers["X-Cat-Dog"] = "Alone in the world"

        app.include_router(router)
        ```
        HEADrY  rZ  r[  s                           r]   headzAPIRouter.head  rb  rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a
  
        Add a *path operation* using an HTTP PATCH operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI
        from pydantic import BaseModel

        class Item(BaseModel):
            name: str
            description: str | None = None

        app = FastAPI()
        router = APIRouter()

        @router.patch("/items/")
        def update_item(item: Item):
            return {"message": "Item updated in place"}

        app.include_router(router)
        ```
        PATCHrY  rZ  r[  s                           r]   patchzAPIRouter.patch;  e    F ~~)#%#!5!I%#9#9$;)E,K(C/)'(C1  
 	
rj   c                V    | j                  |||||||||	|
dg|||||||||||||      S )a  
        Add a *path operation* using an HTTP TRACE operation.

        ## Example

        ```python
        from fastapi import APIRouter, FastAPI
        from pydantic import BaseModel

        class Item(BaseModel):
            name: str
            description: str | None = None

        app = FastAPI()
        router = APIRouter()

        @router.trace("/items/{item_id}")
        def trace_item(item_id: str):
            return None

        app.include_router(router)
        ```
        TRACErY  rZ  r[  s                           r]   tracezAPIRouter.trace  ro  rj   z
        on_event is deprecated, use lifespan event handlers instead.

        Read more about it in the
        [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).
        
event_typezM
                The type of event. `startup` or `shutdown`.
                c                 0     dt         dt         f fd}|S )a  
        Add an event handler for the router.

        `on_event` is deprecated, use `lifespan` event handlers instead.

        Read more about it in the
        [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/#alternative-events-deprecated).
        r.  rL   c                 ,    j                  |        | S rc   )rR  )r.  rs  r   s    r]   r1  z%APIRouter.on_event.<locals>.decoratorS  s    "":t4Krj   r2  )r   rs  r1  s   `` r]   on_eventzAPIRouter.on_event7  s     8	- 	2C 	 rj   )NNTrc   )3r   r   r   r  r   r6   r   r.   rE   rh   rF   r   r   r   r   r   r   r   r   r7   r   r  r   r8   rG   r  r@   r	   rA   r   r*   r   r   r+   r   r<  r@  rB  r   rI  rW  r   r^  ra  re  rh  rk  rn  rr  rv  r   r   s   @r]   r  r  S  s-1   : RT   L!   ,           &'knG #s#LMMNnG T%T	*+,

	nG$  Xfnn-.	
%nG< !*N
!
=nGR T%S/4S>9:;

SnGr T)_%

snGN T)_%	 
OnGz $
{nGL W
MnG^ (1SM
(
_nGt N

unGJ Xhr3w/01	
KnGb Xhr3w/01	

cnG@ Xc]#	
AnGX TN	

YnGr %

snGN &/hZ_%	&
OnGl 
mnGf (,""& $s)$ sm	
   
$%'88	90 &dm%)15;?!%%)$9EI%)8<&*2626(,-205,1"&DKE
 #9=/326 &'AP"P" 38$P"
 P" c]P" tE#t),-.P" x78P" #P" c]P" "P" DsCx$sCx.!@ABP" TNP" %C$s) 345P" smP"  !)!P"" !)#P"$ "&%P"& '+'P"( *.)P"* &*+P",  -P". d8n.@@A/P"4 sm5P"6 'tH~67P"8 DO,9P":  S#X/;P"< &+hZ_%'99&
=P"B 
CP"l &dm%)15;?!%%)$9EI%)'+&*2626(,-205,1"&)0)>"/326AHB
5<< 	<
 c]< tE#t),-.< x78< #< c]< "< DsCx$sCx.!@AB< TN< $s)$< sm< !)<  !)!<" "&#<$ '+%<& *.'<( &*)<*  +<, X-<. sm/<0 DO,1<2  S#X/3<4 &.xj#o%>5<: 
$%'88	9;<D #	" <@"" 38$" sm	" x78" 
"L #A< =A
A SM
A&  Xfnn-.	
'A> 
$%'88	9?AH 37$S$Y/	$%'88	9 RT   L!      &']r
+s+H'IIJr
 #s#LMMN	r

 T%T	*+,

r
&  Xfnn-.	
'r
> !*N
!
?r
T T%S/4S>9:;

Ur
t T)_%

ur
P TN	

Qr
j %

kr
@ &/hZ_%	&
Ar
^ 
_r
D	 DM    $  "  (    $ " "   L!     &'U
w
	
w
 "!
w
^ SM	

_w
x T%T	*+,	

yw
R  Xfnn-.	
Sw
j SM	

kw
D SM
Ew
h (	
iw
| T%S/4S>9:;	
}w
P TN	
Qw
d  SM
ew
L !*UO	!
Mw
d !*UO	!
ew
| "+	"
}w
T '0'
Uw
x *3*
yw
Z &/&
[w
| %	

}w
V "N	

Ww
p SM
qw
@	 T)_%

A	w
`	 !T#s(^$	
a	w
x	 &/hZ_%	&
y	w
V
 
$%'88	9W
w
N DM    $  "  (    $ " "   L!     &'U
|
	
|
 "!
|
^ SM	

_|
x T%T	*+,	

y|
R  Xfnn-.	
S|
j SM	

k|
D SM
E|
h (	
i|
| T%S/4S>9:;	
}|
P TN	
Q|
d  SM
e|
L !*UO	!
M|
d !*UO	!
e|
| "+	"
}|
T '0'
U|
x *3*
y|
Z &/&
[|
| %	

}|
V "N	

W|
p SM
q|
@	 T)_%

A	|
`	 !T#s(^$	
a	|
x	 &/hZ_%	&
y	|
V
 
$%'88	9W
|
X DM    $  "  (    $ " "   L!     &'U
|
	
|
 "!
|
^ SM	

_|
x T%T	*+,	

y|
R  Xfnn-.	
S|
j SM	

k|
D SM
E|
h (	
i|
| T%S/4S>9:;	
}|
P TN	
Q|
d  SM
e|
L !*UO	!
M|
d !*UO	!
e|
| "+	"
}|
T '0'
U|
x *3*
y|
Z &/&
[|
| %	

}|
V "N	

W|
p SM
q|
@	 T)_%

A	|
`	 !T#s(^$	
a	|
x	 &/hZ_%	&
y	|
V
 
$%'88	9W
|
X DM    $  "  (    $ " "   L!     &'U
w
	
w
 "!
w
^ SM	

_w
x T%T	*+,	

yw
R  Xfnn-.	
Sw
j SM	

kw
D SM
Ew
h (	
iw
| T%S/4S>9:;	
}w
P TN	
Qw
d  SM
ew
L !*UO	!
Mw
d !*UO	!
ew
| "+	"
}w
T '0'
Uw
x *3*
yw
Z &/&
[w
| %	

}w
V "N	

Ww
p SM
qw
@	 T)_%

A	w
`	 !T#s(^$	
a	w
x	 &/hZ_%	&
y	w
V
 
$%'88	9W
w
N DM    $  "  (    $ " "   L!     &'U
w
	
w
 "!
w
^ SM	

_w
x T%T	*+,	

yw
R  Xfnn-.	
Sw
j SM	

kw
D SM
Ew
h (	
iw
| T%S/4S>9:;	
}w
P TN	
Qw
d  SM
ew
L !*UO	!
Mw
d !*UO	!
ew
| "+	"
}w
T '0'
Uw
x *3*
yw
Z &/&
[w
| %	

}w
V "N	

Ww
p SM
qw
@	 T)_%

A	w
`	 !T#s(^$	
a	w
x	 &/hZ_%	&
y	w
V
 
$%'88	9W
w
N DM    $  "  (    $ " "   L!     &'U
|
	
|
 "!
|
^ SM	

_|
x T%T	*+,	

y|
R  Xfnn-.	
S|
j SM	

k|
D SM
E|
h (	
i|
| T%S/4S>9:;	
}|
P TN	
Q|
d  SM
e|
L !*UO	!
M|
d !*UO	!
e|
| "+	"
}|
T '0'
U|
x *3*
y|
Z &/&
[|
| %	

}|
V "N	

W|
p SM
q|
@	 T)_%

A	|
`	 !T#s(^$	
a	|
x	 &/hZ_%	&
y	|
V
 
$%'88	9W
|
X DM    $  "  (    $ " "   L!     &'U
|
	
|
 "!
|
^ SM	

_|
x T%T	*+,	

y|
R  Xfnn-.	
S|
j SM	

k|
D SM
E|
h (	
i|
| T%S/4S>9:;	
}|
P TN	
Q|
d  SM
e|
L !*UO	!
M|
d !*UO	!
e|
| "+	"
}|
T '0'
U|
x *3*
y|
Z &/&
[|
| %	

}|
V "N	

W|
p SM
q|
@	 T)_%

A	|
`	 !T#s(^$	
a	|
x	 &/hZ_%	&
y	|
V
 
$%'88	9W
|
X DM    $  "  (    $ " "   L!     &'U
|
	
|
 "!
|
^ SM	

_|
x T%T	*+,	

y|
R  Xfnn-.	
S|
j SM	

k|
D SM
E|
h (	
i|
| T%S/4S>9:;	
}|
P TN	
Q|
d  SM
e|
L !*UO	!
M|
d !*UO	!
e|
| "+	"
}|
T '0'
U|
x *3*
y|
Z &/&
[|
| %	

}|
V "N	

W|
p SM
q|
@	 T)_%

A	|
`	 !T#s(^$	
a	|
x	 &/hZ_%	&
y	|
V
 
$%'88	9W
|
| 	
 
$%'88	9rj   r  )NF)or   rW   email.messager   r  r   
contextlibr   r   enumr   r   typingr   r   r	   r
   r   r   r   r   r   r   r   r   r   fastapir   fastapi._compatr   r   r   r   r   r   fastapi.datastructuresr   r   fastapi.dependencies.modelsr   fastapi.dependencies.utilsr   r   r    r!   r"   r#   r$   fastapi.encodersr%   fastapi.exceptionsr&   r'   r(   r)   fastapi.typesr*   r+   fastapi.utilsr,   r-   r.   r/   r0   pydanticr1   	starletter2   starlette.concurrencyr3   starlette.exceptionsr4   starlette.requestsr5   starlette.responsesr6   r7   starlette.routingr8   r9   r:   r;   r<   r=   r>   starlette.typesr?   r@   rA   rB   starlette.websocketsrD   typing_extensionsrE   rF   rG   r  rT   ri   r|   rh   r   r  r   r   rQ  r   rP  r   Routerr  rd   rj   r]   <module>r     sY        :        ? 1   .  3    3 . & 6  - = = * 8 8 #,	, , 	,
 , 	,^sm5=c]c]& #'##":2J:2 :2 e_	:2
 e_:2 :2 :2 :2 :2 :2 	:2z
A
A%)#s(^
ACG
A
A (,!%@G@U+/.2.2$().,1(-37#LL$L #L $x.*<<=	L
 Z(L %UOL %UOL "L #'L &*L "&L $,C=L L wi3X#5667Lb 48##+C=  yk9S#s]334	8%".. %"Pd"w}} d"ND< D<rj   