
    [i                        S SK r S SKrS SKrS SKJrJrJr  S SKJrJ	r	  S SK
J
r
Jr  S SK Jr  S SKJrJrJrJrJrJrJr  S SKrS SKJr  S SKJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-  S S	K.J/r/  S S
K0J1r1J2r2  S SK3J4r4  S SK5J6r6  S SK7J8r8  S SK9J:r:  S SK;J<r<  S SK=J>r>J?r?  S SK@JArA  S SKBJCrC  S S	KDJ/rE  S SKFJGrG  S SKHJIrIJJrJJKrKJLrLJMrM  S SKNJOrOJPrP  S SKQJRrR  S SKSJTrT  S SKUJVrVJWrWJXrX  SrYSrZSdS jr[S\R                  S\]S\44S jr^S SSS!.S"\4S#\_S$\\`\<      S%\\`\]      S\44
S& jjraS'\`\   S\`\   4S( jrbS"\4S\`\   4S) jrcS*\S+\4   S\R                  4S, jreS*\S+\4   S\R                  4S- jrfS.\S/\g\]\4   S\4S0 jrhS*\S+\4   S\4S1 jriSSSS2SS3.S\]S*\S+\4   S4\\]   S5\\`\]      S%\\`\]      S6\_S7\\VS8   S4   S\44S9 jjrjS:\]S;\S"\4S\\_   4S< jrk\ " S= S>5      5       rlS:\]S.\S?\S@\_S\l4
SA jrmSB\S"\4SS4SC jrnS"\4SD\SE\g\]\4   S\4SF jro\ " SG SH5      5       rpSSSSSSI.SJ\\P\T4   S"\4SK\\\g\]\4   \I4      SL\\E   SM\\R   SN\\   SO\\g\<\4      SP\SQ\_S\p4SR jjrqSB\S?\SS\g\]\4   ST\r\]S+4   S\r\\`\   4   4
SU jrs SeSB\SS\\]\4   SV\\]S4   S\4SW jjrtS'\\   SX\\\]\4   \L\J4   S\r\g\]\4   \`\   4   4SY jruSZ\S\_4S[ jrvS'\`\   S\_4S\ jrwS]\`\   S^\IS\g\]\4   4S_ jrxS]\`\   S^\\\g\]\4   \I4      SQ\_S\r\g\]\4   \`\g\]\4      4   4S` jrySa\4S4\]SQ\_S\\   4Sb jrzSB\S\]4Sc jr{g)f    N)	CoroutineMappingSequence)AsyncExitStackcontextmanager)copydeepcopy)	dataclass)	AnnotatedAnyCallable
ForwardRefOptionalUnioncast)params)
ModelFieldRequiredParam	Undefined_regenerate_error_with_loccopy_field_infocreate_body_modelevaluate_forwardreffield_annotation_is_scalarget_cached_model_fieldsget_missing_field_erroris_bytes_fieldis_bytes_sequence_fieldis_scalar_fieldis_scalar_sequence_fieldis_sequence_field.is_uploadfile_or_nonable_uploadfile_annotation!is_uploadfile_sequence_annotationlenient_issubclasssequence_typesserialize_sequence_valuevalue_is_sequence)BackgroundTasks)asynccontextmanagercontextmanager_in_threadpool)	Dependant)DependencyScopeError)logger)SecurityScopes)DependencyCacheKey)create_model_fieldget_path_param_names)	BaseModel)	FieldInfo)run_in_threadpool)FormDataHeadersImmutableMultiDictQueryParams
UploadFile)HTTPConnectionRequest)Response)	WebSocket)Literalget_args
get_originzForm data requires "python-multipart" to be installed. 
You can install "python-multipart" with: 

pip install python-multipart
zForm data requires "python-multipart" to be installed. It seems you installed "multipart" instead. 
You can remove "multipart" with: 

pip uninstall multipart

And then install "python-multipart" with: 

pip install python-multipart
returnc                  n    SSK Jn   U S:  d   eg ! [        [        4 a     SSKJn   U (       d   e SSKJn  U(       d   e g ! [         a+    [        R                  " [        5        [        [        5      S ef = f! [         a+    [        R                  " [        5        [        [        5      S ef = ff = f)Nr   )__version__z0.0.12)parse_options_header)python_multipartrC   ImportErrorAssertionError	multipartmultipart.multipartrD   r-   error!multipart_incorrect_install_errorRuntimeErrormultipart_not_installed_error)rC   rD   s     mC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\fastapi/dependencies/utils.pyensure_multipart_is_installedrO   U   s    H0 X%%%( H	H-;	P ,++ P>?"#DE4OP  	HLL67<=4G	H!Hs+    B4A;A5A88A;;5B00B4dependspathc                    [        U R                  5      (       d   S5       e/ n[        U [        R                  5      (       a,  U R
                  (       a  UR                  U R
                  5        [        UU R                  U R                  US9$ )Nz;A parameter-less dependency must have a callable dependency)rQ   callscopeown_oauth_scopes)	callable
dependency
isinstancer   Securityscopesextendget_dependantrT   )rP   rQ   rU   s      rN   get_parameterless_sub_dependantr]   p   sw    G&&'' E' #%'6??++/mm)	     Fskip_repeatsvisitedparent_oauth_scopes	dependantr`   ra   rb   c                `   Uc  / nUR                  U R                  5        U=(       d    / U R                  =(       d    / -   n[        S0 SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  _SU R                  _SU R                  _S	U R                  _S
U R                  _SU R                  _SU R                   _SU R"                  _SU R$                  _SU_SU R&                  _SU R(                  _SU R*                  _6nU R,                   GH,  nU(       a  UR                  U;   a  M  [/        UUUUR                  S9nUR,                  R                  U5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR,                  R1                  UR,                  5        GM/     U$ )Npath_paramsquery_paramsheader_paramscookie_paramsbody_paramsnamerS   request_param_namewebsocket_param_namehttp_connection_param_nameresponse_param_namebackground_tasks_param_namesecurity_scopes_param_namerU   rb   	use_cacherQ   rT   r_    )append	cache_keyoauth_scopesr+   re   r   rf   rg   rh   ri   rj   rS   rk   rl   rm   rn   ro   rp   rU   rq   rQ   rT   dependenciesget_flat_dependantr[   )rc   r`   ra   rb   use_parent_oauth_scopesflat_dependantsub_dependantflat_subs           rN   rw   rw      s    NN9&&'28b$"  ))..0++002  --224  --224	
 ))..0 ^^ ^^ %77 ';; $-#G#G &99 %.$I$I $-#G#G #33 4  %%!" ^^#$ oo%N( #//M33w>%% . ; ;	
 	##**84""))(*>*>?##**8+@+@A$$++H,B,BC$$++H,B,BC""))(*>*>?##**8+@+@A 0" r^   fieldsc                     U (       d  U $ U S   n[        U 5      S:X  a6  [        UR                  [        5      (       a  [	        UR                  5      nU$ U $ )Nr      )lenr$   type_r2   r   )r|   first_fieldfields_to_extracts      rN   _get_flat_fields_from_paramsr      sN    )K
6{a.{/@/@)LL3K4E4EF  Mr^   c                     [        U SS9n[        UR                  5      n[        UR                  5      n[        UR                  5      n[        UR
                  5      nX#-   U-   U-   $ )NT)r`   )rw   r   re   rf   rg   rh   )rc   ry   re   rf   rg   rh   s         rN   get_flat_paramsr      sa    '	EN.~/I/IJK/0K0KLL01M1MNM01M1MNM%5EEr^   rS   .c                     [         R                  S:  a   [        R                  " U SS9nU$ [        R                  " U 5      nU$ ! [         a    [        R                  " U 5      n U$ f = f)N)   
   T)eval_str)sysversion_infoinspect	signature	NameError)rS   r   s     rN   _get_signaturer      sr    
7"	0))$>I  %%d+	  	0  ))$/I 	0s   A  A)(A)c                 z   [        U 5      n[        R                  " U 5      n[        US0 5      nUR                  R                  5        Vs/ s HL  n[        R                  " UR                  UR                  UR                  [        UR                  U5      S9PMN     nn[        R                  " U5      nU$ s  snf )N__globals__)rj   kinddefault
annotation)r   r   unwrapgetattr
parametersvalues	Parameterrj   r   r   get_typed_annotationr   	Signature)rS   r   	unwrappedglobalnsparamtyped_paramstyped_signatures          rN   get_typed_signaturer      s    t$It$Iy-4H ))002 3E 	MM+E,<,<hG		
 3   ''5Os   AB8r   r   c                 |    [        U [        5      (       a&  [        U 5      n [        XU5      n U [	        S 5      L a  g U $ N)rX   strr   r   type)r   r   s     rN   r   r      s:    *c""
+
(xH
d#r^   c                     [        U 5      n[        R                  " U 5      nUR                  nU[        R                  R
                  L a  g [        US0 5      n[        X45      $ )Nr   )r   r   r   return_annotationr   emptyr   r   )rS   r   r   r   r   s        rN   get_typed_return_annotationr      sU    t$It$I,,JW&&,,,y-4H
55r^   T)rj   rU   rb   rq   rT   rj   rU   rq   rT   )functionrequestc                 p   [        UUU UUUUS9nU=(       d    / U=(       d    / -   n[        U 5      n	[        U5      n
U
R                  nUR	                  5        GHX  u  pX;   n[        UUR                  UR                  US9nUR                  Gbm  UR                  R                  (       d   eUR                  (       d  UR                  (       a`  UR                  S:X  aP  UR                  R                  S:X  a6  UR                  (       d   e[        SUR                  R                    S35      e/ n[#        UR                  [$        R&                  5      (       a:  UR                  R(                  (       a  [+        UR                  R(                  5      n[-        U UR                  R                  UUUUR                  R.                  UR                  R                  S9nUR0                  R3                  U5        GM  [5        UUR6                  US9(       a  UR8                  b   S	U< 35       eGM  UR8                  c   e[#        UR8                  R:                  [$        R<                  5      (       a(  UR>                  R3                  UR8                  5        GMD  [A        UR8                  US
9  GM[     U$ )N)rS   rj   rQ   rq   rT   rU   rb   )
param_namer   valueis_path_paramr   r   zThe dependency "zS" has a scope of "request", it cannot depend on dependencies with scope "function".)rQ   rS   rj   rU   rb   rq   rT   r   type_annotationrc   z0Cannot specify multiple FastAPI annotations for )fieldrc   )!r+   r1   r   r   itemsanalyze_paramr   r   rP   rW   is_gen_callableis_async_gen_callablecomputed_scoperT   rS   r,   __name__rX   r   rY   rZ   listr\   rq   rv   rs   !add_non_field_param_to_dependencyr   r   
field_infoBodyri   add_param_to_fields)rQ   rS   rj   rU   rb   rq   rT   rc   current_scopespath_param_namesendpoint_signaturesignature_paramsr   r   r   param_detailssub_own_oauth_scopesrz   s                     rN   r\   r\      sm    )/I */R4D4JKN+D1,T2)44-335
"6%!''--'	
   , ((3333**i.M.M,,	9!))//:= ~~%~*&y~~'>'>&? @Y Y  /1 -//AA ((//+/0E0E0L0L+M()"**55!5$2'//99#++11M ""))-8,!)99

 !&&. B:.Q. ""...m))44fkkBB!!(()<)<=m&9&9YOa 6b r^   r   r   c                 T   [        U[        5      (       a  Xl        g[        U[        5      (       a  Xl        g[        U[
        5      (       a  Xl        g[        U[        5      (       a  Xl        g[        U[        5      (       a  Xl
        g[        U[        5      (       a  Xl        gg )NT)r$   r;   rk   r=   rl   r:   rm   r<   rn   StarletteBackgroundTasksro   r.   rp   r   s      rN   r   r   F  s     /733'1$	OY	7	7)3&	O^	<	</9,	OX	6	6(2%	O-E	F	F0:-	O^	<	</9,r^   c                   T    \ rS rSr% \\S'   \\R                     \S'   \\	   \S'   Sr
g)ParamDetailsi^  r   rP   r   rr   N)r   
__module____qualname____firstlineno__r   __annotations__r   r   Dependsr   __static_attributes__rr   r^   rN   r   r   ^  s"    fnn%%Jr^   r   r   r   c           	      
   S nS n[         n[         nU[        R                  R                  La  UnUn[	        U5      [
        L Gav  [        U5      nUS   nUSS   V	s/ s H,  n	[        U	[        [        R                  45      (       d  M*  U	PM.     n
n	U
 V	s/ s HE  n	[        U	[        R                  [        R                  [        R                  45      (       d  MC  U	PMG     nn	U(       a  US   nOS n[        U[        5      (       a  [        UUS9nUR                  [        :X  d7  UR                  [         :X  d#   SUR"                  R$                   SU < S35       eU[        R                  R                  La  U(       a   S5       eX$l        O-[         Ul        O![        U[        R                  5      (       a  Un[        U[        R                  5      (       a  Ub   S	U < 35       eUb   S
U < 35       eUnO@[        U[        5      (       a+  Ub   SU < 35       eUn[        U[        5      (       a  Xdl        Ub,  UR(                  c  [+        U5      n[,        R.                  " XVS9n[1        U[2        [4        [6        [8        [:        [<        45      (       a  Ub   SU< 35       eUb   SU< 35       eOUc  Uc  U[        R                  R                  La  UO[         nU(       a  [        R>                  " US9nOl[A        U5      (       d  [C        U5      (       a  [        RD                  " X}S9nO7[G        US9(       d  [        R                  " X}S9nO[        RH                  " X}S9nS nUGb  U(       aB  [        U[        R>                  5      (       d"   SUR"                  R$                   SU < 35       eOL[        U[        R                  5      (       a-  [K        USS 5      c  [        RL                  RN                  Ul(        Un[        U[        RR                  5      (       a
  [U        5         URV                  (       d%  [K        USS 5      (       a  U R/                  SS5      nOURV                  =(       d    U nUUl+        [Y        U UUR                  UUR                  [         [        4;   US9nU(       a  [[        US9(       d   S5       eOq[        U[        RH                  5      (       aR  [[        U5      (       dB  []        U5      (       d2  [1        UR^                  [`        5      (       a  [K        USS5      S:X  d   e[c        XeUS9$ s  sn	f s  sn	f )Nr   r~   )r   r   `z1` default value cannot be set in `Annotated` for z). Set the default value with `=` instead.z*Path parameters cannot have default valueszGCannot specify `Depends` in `Annotated` and default value together for zaCannot specify a FastAPI annotation in `Annotated` and `Depends` as a default value together for zQCannot specify FastAPI annotations in `Annotated` and default value together for )rW   z"Cannot specify `Depends` for type z+Cannot specify FastAPI annotation for type )r   )r   r   zCannot use `z` for path param in_convert_underscores_-)rj   r   r   aliasrequiredr   )r   z1Path params must be of one of the supported typesshape)r   rP   r   )2r   r   r   r   r@   r   r?   rX   r3   r   r   Paramr   r   r   r   r   	__class__r   r   rW   r   dataclassesreplacer$   r;   r=   r:   r<   r   r.   Pathr"   r#   Filer   Queryr   
ParamTypesqueryr   FormrO   r   r0   r   r    r   r2   r   )r   r   r   r   r   rP   r   use_annotationannotated_argsargfastapi_annotationsfastapi_specific_annotationsfastapi_annotationdefault_valuer   use_annotation_from_field_infor   s                    rN   r   r   e  s	    JGON**000#$.!Y.!*-(+ &ab)
)#	6>>:; ) 	 
 +(
*LLKKNN * 	% (
 (,R0  "&()44(-)J
 ""i/:3E3E3V J((112 3$$.>1Z\V
 G--333(V*VV(%*"%2
"*FNN;;(G%(( 	
'N,	
 ! 	
++5.:	
! 	E9	%	%! 	
'N,	
! 
j),,$3! w119w-%%gJ $	

 
 X"D_DW XX! 	
9/9LM	
! 
	!&g.?.?.E.E!E=  ?J;
 
.??VJ+GVJWJEj&++66 z33<<= >>#6
 z6<<00
E408#..44JN)7&j&++..)+GJ8Mt$T$T&&sC0E$$2
E 
"0&&''M9+EE!
 "/ C/ 
FLL11&&+E22&u{{I>>w2a7 PUVVk

(
s   )U	UAUUr   c                 ,   U R                   n[        USS 5      nU[        R                  R                  :X  a  UR
                  R                  U 5        g U[        R                  R                  :X  a  UR                  R                  U 5        g U[        R                  R                  :X  a  UR                  R                  U 5        g U[        R                  R                  :X  d   SU R                   35       eUR                  R                  U 5        g )Nr   z>non-body parameters must be in path, query, header or cookie: )r   r   r   r   rQ   re   rs   r   rf   headerrg   cookierj   rh   )r   rc   r   field_info_ins       rN   r   r     s    !!JJt4M))...$$U+	&++11	1%%e,	&++22	2&&u- 1 1 8 88 	
LUZZLY	
8 	&&u-r^   stack
sub_valuesc                 *  #    U R                   (       d   eU R                  (       a  [        U R                   5      " S0 UD6nO5U R                  (       a$  [	        [        U R                   5      " S0 UD65      nUR                  W5      I S h  vN $  N7f)Nrr   )rS   r   r)   r   r*   r   enter_async_context)rc   r   r   cms       rN   _solve_generatorr     sm      >>>&& 0>:>		"	").*H*V:*VW**2....s   B
BBBc                   h    \ rS rSr% \\\4   \S'   \\   \S'   \	\
   \S'   \\S'   \\\4   \S'   Srg)	SolvedDependencyi*  r   errorsbackground_tasksresponsedependency_cacherr   N)r   r   r   r   dictr   r   r   r   r   r   r<   r/   r   rr   r^   rN   r   r   *  s=    cNI788-s233r^   r   )bodyr   r   dependency_overrides_providerr   r   r   r   r   r   r   async_exit_stackembed_body_fieldsc        	         
  #    U R                   R                  S5      n	[        U	[        5      (       d   S5       eU R                   R                  S5      n
[        U
[        5      (       d   S5       e0 n/ nUc  [	        5       nUR
                  S	 S Ul        Uc  0 nUR                   GH  n[        [        S[        4   UR                  5      Ul        UR                  nUnU(       aq  UR                  (       a`  UR                  n[        US0 5      R                  UU5      nUR                  n[        UUUR                   UR"                  UR                   S9n[%        U UUUUUUUUS	9	I S h  vN nUR&                  nUR(                  (       a  UR+                  UR(                  5        GM  UR,                  (       a  UR.                  U;   a  XmR.                     nOUR0                  (       d  UR2                  (       a2  U	nUR                   S
:X  a  U
n[5        UUUR6                  S9I S h  vN nOJUR8                  (       a  U" S0 UR6                  D6I S h  vN nO[;        U40 UR6                  D6I S h  vN nUR                   b  UXR                   '   UR.                  U;  d  GM  UXmR.                  '   GM     [=        UR>                  U R>                  5      u  nn[=        UR@                  U R@                  5      u  nn[=        URB                  U R
                  5      u  nn[=        URD                  U RF                  5      u  nnURI                  U5        URI                  U5        URI                  U5        URI                  U5        UUU-   U-   U-   -  nURJ                  (       aB  [M        URJ                  UUS9I S h  vN u  nnURI                  U5        UR+                  U5        URN                  (       a  XURN                  '   URP                  (       a$  [        U [R        5      (       a  XURP                  '   O4URT                  (       a#  [        U [V        5      (       a  XURT                  '   URX                  (       a  Uc
  [[        5       nX;URX                  '   UR\                  (       a  XKUR\                  '   UR^                  (       a  [a        UR"                  S9XR^                  '   [c        UUUUUS9$  GN GN GN GN GNF7f)Nfastapi_inner_astackz/fastapi_inner_astack not found in request scopefastapi_function_astackz2fastapi_function_astack not found in request scopezcontent-length.dependency_overrides)rQ   rS   rj   rb   rT   )	r   rc   r   r   r   r   r   r   r   r   )rc   r   r   )body_fieldsreceived_bodyr   )rZ   )r   r   r   r   r   rr   )2rT   getrX   r   r<   headersstatus_coderv   r   r   r   rS   r  r   rQ   r\   rj   ru   solve_dependenciesr   r   r[   rq   rt   r   r   r   r   is_coroutine_callabler4   request_params_to_argsre   rf   rg   rh   cookiesupdateri   request_body_to_argsrm   rk   r;   rl   r=   ro   r(   rn   rp   r.   r   )r   rc   r   r   r   r   r   r   r   request_astackfunction_astackr   r   rz   rS   use_sub_dependantoriginal_calluse_pathsolved_resultsolved
use_astackpath_valuespath_errorsquery_valuesquery_errorsheader_valuesheader_errorscookie_valuescookie_errorsbody_valuesbody_errorss                                  rN   r  r  3  s     ]]&&'=>Nnn55 95 mm''(ABOo~66 <6  FF:-.#"//!(38"4m6H6HI!!))-BB)..M-/Erc-/  *..H -"''$1$>$>#))! 1'-*G--/

 

 )99MM-../""}'>'>BR'R%&=&=>F--1B1X1X'J""j0,
++ (// F
 447-"6"677F,TJ]5I5IJJF))/F%%&""*::8>445q 0r  6w22 K "8 4 4"L, $:$ M= $:$ M= MM+
MM,
MM- 
MM- 
kL(=8=HHF '!--/
 
	
 	k"k"++7>y334##
7G(D(D/6y++,		'	'Jw	,J,J18y--.,,#.08Hy445$$08y,,-++7E))8
334 )) a

. 8J4
sc   E+T-S=.B=T+T ,+TTT6T7-T)DTT	D:T TTT	Tr   locc                     Uc4  U R                   (       a  S [        US9/4$ [        U R                  5      / 4$ U R	                  XUS9u  pE[        U[        5      (       a  [        USS9nS U4$ U/ 4$ )N)r   rr   )r   
loc_prefix)r   r   r	   r   validaterX   r   r   )r   r   r   r   v_errors_
new_errorss          rN    _validate_value_with_model_fieldr'    sy     }>>1c:;;;EMM*B....C.8KB'4  /w2N
Z2vr^   r   c                    U=(       d    [        U 5      n[        U 5      (       a-  [        U[        [        45      (       a  UR                  U5      nOUR                  US 5      nUbc  [        U R                  [        R                  5      (       a  [        U[        5      (       a  US:X  d  [        U 5      (       a6  [        U5      S:X  a'  U R                  (       a  g [        U R                  5      $ U$ )N r   )get_validation_aliasr!   rX   r7   r6   getlistr  r   r   r   r   r   r   r	   r   )r   r   r   r   s       rN   _get_multidict_valuer,    s     0)%0EJv8JG7T$U$Uu%

5$'u''555#&&e$$Uq>>EMM**Lr^   received_paramsc                 z   0 n/ nU (       d  X#4$ U S   nU nSnSn[        U 5      S:X  aM  [        UR                  [        5      (       a.  [	        UR                  5      nSn[        UR                  SS5      n0 n[        5       n	U H  n
S n[        U[        5      (       aJ  [        U
R                  SU5      nU(       a,  [        U
5      nXR                  :X  a  UR                  SS5      n[        XUS9nUb  X[        U
5      '   U	R                  U=(       d    [        U
5      5        M     UR                  5        Hr  nX;  d  M
  [!        US	5      (       aD  UR#                  U5      n[        U[$        5      (       a  [        U5      S:X  a	  US   X'   MY  XU'   M_  UR'                  U5      X'   Mt     U(       ag  UR                  n[        U[(        R*                  5      (       d   S
5       eUR,                  R.                  4n[1        XHUUS9u  nnUR                  U0U4$ U  H  n
[        X5      nU
R                  n[        U[(        R*                  5      (       d   S
5       eUR,                  R.                  [        U
5      4n[1        XUUS9u  nnU(       a  UR3                  U5        M  UX*R                  '   M     X#4$ )Nr   FTr~   r   r   r   )r   r+  z"Params must be subclasses of Paramr   r   r   r   )r   r$   r   r2   r   r   r   setrX   r6   r*  rj   r   r,  addkeyshasattrr+  r   r  r   r   r   r   r'  r[   )r|   r-  r   r   r   r   single_not_embedded_fielddefault_convert_underscoresparams_to_processprocessed_keysr   r   r   r   keyr   r   r$  r%  s                      rN   r
  r
    s     F#%F~)K %"&
6{a.{/@/@)LL3K4E4EF$(! '.""$94'
# )+UN"ow// #*  "79T# #,U3JJ&!MM#s3E$U5I=B259:5?$8$?@ #" ##%$	22'//4eT**E
a-21X%*-2c*)8)<)<S)A!& & ! ++
*fll33 	
0	
3 !+ 4 466v3
G   "%w..$U<%%
*fll33 	
0	
3 ~~##%9%%@A6V
G MM'"!#F::  >r^   
field_typec                     SSK Jn  [        U 5      nU[        La  X!La  g[	        U 5      nU H  n[        U[        5      (       a  M    g   g)zJCheck if field type is a Union where all members are BaseModel subclasses.r   )	UnionTypeFT)fastapi.typesr;  r@   r   r?   r$   r2   )r9  r;  origin
union_argsr   s        rN   is_union_of_base_modelsr?  :  sJ    '
#F Uv6*%J!#y11  r^   c                 ~   U (       d  gU  Vs1 s H  oR                   iM     nn[        U5      S:  a  gU S   n[        UR                  SS 5      (       a  g[	        UR                  [
        R                  5      (       a:  [        UR                  [        5      (       d  [        UR                  5      (       d  ggs  snf )NFr~   Tr   embed)rj   r   r   r   rX   r   r   r$   r   r2   r?  )r|   r   body_param_names_setr   s       rN   _should_embed_body_fieldsrC  M  s     5;;F5JJF;
 1$)K{%%w55 	;))6;;77";#4#4i@@'(9(9::! <s   B:r  r  c                   ^#    0 nU  GHj  n[        X15      nUR                  n[        U[        R                  5      (       a>  [        U5      (       a.  [        U[        5      (       a  UR                  5       I S h  vN nO[        U5      (       a  [        U[        R                  5      (       a  [        U5      (       a  [        U[        5      (       d   e/ mS[        / [        [        [        [        4   4   SS 4U4S jjn[        R                  " 5        IS h  vN nU H  nUR!                  XhR                  5        M      S S S 5      IS h  vN   [#        UTS9nUc  GM]  XB[%        U5      '   GMm     U  Vs1 s H  n[%        U5      iM     n	nUR'                  5        H7  n
X;  d  M
  UR)                  U
5      n[+        U5      S:X  a	  US   X*'   M3  XU
'   M9     U$  GNe N N! , IS h  vN  (       d  f       N= fs  snf 7f)NfnrA   c                 R   >#    U " 5       I S h  vN nTR                  U5        g  N7fr   )rs   )rE  resultresultss     rN   
process_fn&_extract_form_body.<locals>.process_fn}  s"       "tv& $s   '%')r   r   r~   r   )r,  r   rX   r   r   r   r9   readr   r'   r%   r   r   r   anyiocreate_task_group
start_soonr&   r*  r2  r+  r   )r  r  r   r   r   r   rI  tg	sub_valuefield_aliasesr8  param_valuesrH  s               @rN   _extract_form_bodyrS  e  s     F$U:%%
z6;;//u%%5*--**,&E#E**:v{{33!%(( e^4444/1G'R3S=!99:'' ..00B!&IMM*nn= "' 10 -5HE27'./; < ?JJkU)%0kMJ!!##(005L< A%*1o*s $ M= '  1000 Kss   A7H:G;B!HG"H %G&HG$H%H;H H,4H"H$H&G=	,G/-G=	9Hc                   #    0 n/ nU (       d   S5       e[        U 5      S:H  =(       a    U(       + nU S   nUnU nU(       aI  [        UR                  [        5      (       a*  [	        U[
        5      (       a  [        UR                  5      n[	        U[
        5      (       a  [        X5      I S h  vN nU(       a  Sn	[        XgX9S9u  pUR                  U
0U4$ U  Hd  nS[        U5      4n	S nUb   UR                  [        U5      5      n[        XX9S9u  pU(       a  UR                  U5        MV  XUR                  '   Mf     X44$  N! [         a    UR                  [        U	5      5         M  f = f7f)Nz3request_body_to_args() should be called with fieldsr~   r   )r   r/  r   )r   r$   r   r2   rX   r5   r   rS  r'  rj   r*  r  AttributeErrorrs   r   r[   )r  r  r   r   r   r4  r   body_to_processr   r   r$  r%  r   r   s                 rN   r  r    ss    
  F#%FMMM; #K 0A 5 O>O:Oa.K#O*5 	"{00)<<}h//3K4E4EF-** 23D TT (6V
   "%w..+E23#&'++,@,GH
 7V
 MM'"!#5::! " >3 U " 5c:;s7   B+E1-E.A E1/E	<E1$E.*E1-E..E1ry   c                    U R                   (       d  gU R                   S   nU(       d  U$ SU-   n[        U R                   US9n[        S U R                    5       5      nUSS.nU(       d  SUS'   [        S	 U R                    5       5      (       a  [        R                  nO[        S
 U R                    5       5      (       a  [        R
                  nO[        R                  nU R                    V	s/ s HD  n	[        U	R                  [        R                  5      (       d  M.  U	R                  R                  PMF     n
n	[        [        U
5      5      S:X  a  U
S   US'   [        SUUSU" S0 UD6S9nU$ s  sn	f )a{  
Get a ModelField representing the request body for a path operation, combining
all body parameters into a single field if necessary.

Used to check if it's form data (with `isinstance(body_field, params.Form)`)
or JSON and to generate the JSON Schema for a request body.

This is **not** used to validate/parse the request body, that's done with each
individual body parameter.
Nr   Body_)r|   
model_namec              3   J   #    U  H  oR                   (       d  M  S v   M     g7f)TN)r   .0fs     rN   	<genexpr>!get_body_field.<locals>.<genexpr>  s     J!;Azz44!;s   #	#r   )r   r   r   c              3   j   #    U  H)  n[        UR                  [        R                  5      v   M+     g 7fr   )rX   r   r   r   r[  s     rN   r^  r_    s$     
U:TQ:allFKK00:T   13c              3   j   #    U  H)  n[        UR                  [        R                  5      v   M+     g 7fr   )rX   r   r   r   r[  s     rN   r^  r_    s$     W<VqZfkk22<Vra  r~   
media_type)rj   r   r   r   r   rr   )ri   r   anyr   r   r   r   rX   r   rc  r   r0  r0   )ry   rj   r   first_paramrY  	BodyModelr   BodyFieldInfo_kwargsBodyFieldInfor]  body_param_media_typesfinal_fields               rN   get_body_fieldrk    s`    %% ,,Q/K4J!))jI J!;!;JJH, *.Y'

U.:T:T
UUU+1;;	WN<V<VW	W	W $//"
/!,,4 $ALL##/ 	 "

 s)*+q01G1J .$ 8#78K "
s   3-E5$E5c                 F    [        U SS 5      nU=(       d    U R                  $ )Nvalidation_alias)r   r   )r   vas     rN   r*  r*    s     	*D	1Br^   )rA   Nr   )|r   r   r   collections.abcr   r   r   
contextlibr   r   r   r	   r
   typingr   r   r   r   r   r   r   rL  fastapir   fastapi._compatr   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   fastapi.backgroundr(   fastapi.concurrencyr)   r*   fastapi.dependencies.modelsr+   fastapi.exceptionsr,   fastapi.loggerr-   fastapi.security.oauth2r.   r<  r/   fastapi.utilsr0   r1   pydanticr2   pydantic.fieldsr3   starlette.backgroundr   starlette.concurrencyr4   starlette.datastructuresr5   r6   r7   r8   r9   starlette.requestsr:   r;   starlette.responsesr<   starlette.websocketsr=   typing_extensionsr>   r?   r@   rM   rK   rO   r   r   r]   boolr   rw   r   r   r   r   r   r   r   r   r\   r   r   r   r   r   r   r  tupler'  r,  r
  r?  rC  rS  r  rk  r*  rr   r^   rN   <module>r     s     
 8 8 5  !         . / 2 3 ! 2 , B  % L 3  7 ( * ; ;% % "H6 c i $ 26/333 3 d-./	3
 "$s),3 3lj)9 d:>N Fy FT*-= F
#s(+ 
0A0A 
hsCx0 W5F5F "S DcN s 	6hsCx&8 	6S 	6  ,0/39=H
H 38
H 3-	H
 tCy)H "$s),H H ./56H HV),9Bd^0      gWgW gW 	gW
 gW gWT.* . .t . //$2/@DS#X// 4 4 4 7;;?#'37@DI7I%&I I 5c3h12
3	I
 78I x I $,C=I t$6$;<=I %I I IX!$.238nCHc?
3S	>" MQ&sCx09>sDy9I0PZ P738,k7BCP 4S>49$%Pf  &d:&6 4 0,j!,, 
#s(^,^/j!/E$sCx.(":;</ / 4S>4S#X//0	/d2 2(+2@D2j2j
 s r^   