+
    i:                         ^ RI HtHt ^ RIHtHtHtHtHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt  ! R R]4      t ! R R4      t]! R4      tR R ltR# )    )CallableMapping)	AnnotatedAnyBinaryIOTypeVarcast)Doc)GetJsonSchemaHandler)URL)Address)FormData)Headers)QueryParams)State)
UploadFilec                      a a ] tR t^t oRtV3R lV 3R lltRV3R lV 3R llltV3R lV 3R lltV3R lV 3R	 llt]	V3R
 lR l4       t
]	V3R lR l4       t]	V3R lR l4       tV3R ltRtVtV ;t# )r   a  
A file uploaded in a request.

Define it as a *path operation function* (or dependency) parameter.

If you are using a regular `def` function, you can use the `upload_file.file`
attribute to access the raw standard Python file (blocking, not async), useful and
needed for non-async code.

Read more about it in the
[FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/).

## Example

```python
from typing import Annotated

from fastapi import FastAPI, File, UploadFile

app = FastAPI()


@app.post("/files/")
async def create_file(file: Annotated[bytes, File()]):
    return {"file_size": len(file)}


@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile):
    return {"filename": file.filename}
```
c                F   < V ^8  d   QhRS[ S[S[! R4      3,          RR/# )   datazA
                The bytes to write to the file.
                returnN)r   bytesr
   )format__classdict__s   "pC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\fastapi/datastructures.py__annotate__UploadFile.__annotate__B   s9     ) )
) 
)    c                >   <"   \         SV `  V4      G Rj  xL
 #  L5i)z
Write some bytes to the file.

You normally wouldn't use this from a file you read in a request.

To be awaitable, compatible with async, this is run in threadpool.
N)superwrite)selfr   	__class__s   &&r   r!   UploadFile.writeB   s     $ W]4((((   c                H   < V ^8  d   QhRS[ S[S[! R4      3,          RS[/# )r   sizezL
                The number of bytes to read from the file.
                r   )r   intr
   r   )r   r   s   "r   r   r   V   s9     ( (
( 
(r   c                >   <"   \         SV `  V4      G Rj  xL
 #  L5i)zd
Read some bytes from the file.

To be awaitable, compatible with async, this is run in threadpool.
N)r    read)r"   r'   r#   s   &&r   r*   UploadFile.readV   s       W\$''''r%   c                F   < V ^8  d   QhRS[ S[S[! R4      3,          RR/# )r   offsetzO
                The position in bytes to seek to in the file.
                r   N)r   r(   r
   )r   r   s   "r   r   r   h   s9     * *
* 
*r   c                >   <"   \         SV `  V4      G Rj  xL
 #  L5i)z
Move to a position in the file.

Any next read or write will be done from that position.

To be awaitable, compatible with async, this is run in threadpool.
N)r    seek)r"   r-   r#   s   &&r   r/   UploadFile.seekh   s     $ W\&))))r%   c                   < V ^8  d   QhRR/# )r   r   N )r   r   s   "r   r   r   |   s     % %T %r   c                <   <"   \         SV `  4       G Rj  xL
 #  L5i)zU
Close the file.

To be awaitable, compatible with async, this is run in threadpool.
N)r    close)r"   r#   s   &r   r4   UploadFile.close|   s      W]_$$$s   c                *   < V ^8  d   QhRS[ RS[ RR/# )r   _UploadFile__input_value_r   r   r   )r   r   s   "r   r   r      s"     / /c /c /l /r   c                |    \        V\        4      '       g   \        R \        V4       24      h\	        \
        V4      # )zExpected UploadFile, received: )
isinstanceStarletteUploadFile
ValueErrortyper	   r   )clsr7   r8   s   &&&r   	_validateUploadFile._validate   s6    -)<==>tM?R>STUUJ..r   c                X   < V ^8  d   QhRS[ S[S[3,          RS[RS[S[S[3,          /# )r   core_schemahandlerr   )r   strr   r   dict)r   r   s   "r   r   r      s6     6 6!#s(+66J6	c3h6r   c                    R RRR/# )r>   stringr   binaryr2   )r?   rC   rD   s   &&&r   __get_pydantic_json_schema__'UploadFile.__get_pydantic_json_schema__   s     (H55r   c                   < V ^8  d   QhRS[ S[,          RS[S[.S[S[S[3,          3,          RS[S[S[3,          /# )r   sourcerD   r   )r>   r   r   r   rE   )r   r   s   "r   r   r      sL     A A#YA)13%c9J2J)KA	c	Ar   c                2    ^RI Hp V! V P                  4      # )   )"with_info_plain_validator_function)
_compat.v2rP   r@   )r?   rM   rD   rP   s   &&& r   __get_pydantic_core_schema__'UploadFile.__get_pydantic_core_schema__   s     	C1#--@@r   c                *  < V ^8  d   Qh/ S[ S[S[! R4      3,          ;R&   S[ S[R,          S[! R4      3,          ;R&   S[ S[R,          S[! R4      3,          ;R&   S[ S[S[! R4      3,          ;R	&   S[ S[R,          S[! R
4      3,          ;R&   # )r   z,The standard Python file object (non-async).fileNzThe original file name.filenamezThe size of the file in bytes.r'   zThe headers of the request.headersz2The content type of the request, from the headers.content_type)r   r   r
   rE   r(   r   )r   r   s   "r   r   r      s     D :;	= E L d
C(A$BBCCM N C$J$D EE
FFO P w$A BBCCQ R d
CLMM S r   r2   ))__name__
__module____qualname____firstlineno____doc__r!   r*   r/   r4   classmethodr@   rJ   rR   __annotate_func____static_attributes____classdictcell____classcell__)r#   r   s   @@r   r   r      sy     X) )(( ($* *(% % / /
 6 6
 A Ay  r   r   c                   Z   a  ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR ltRtV t	R	# )
DefaultPlaceholderz
You shouldn't use this class directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.
c                    < V ^8  d   QhRS[ /# )r   valuer9   )r   r   s   "r   r   DefaultPlaceholder.__annotate__   s      c r   c                    Wn         R # Nrg   )r"   rg   s   &&r   __init__DefaultPlaceholder.__init__   s    
r   c                    < V ^8  d   QhRS[ /# )r   r   )bool)r   r   s   "r   r   rh      s        $  r   c                ,    \        V P                  4      # rj   )ro   rg   )r"   s   &r   __bool__DefaultPlaceholder.__bool__   s    DJJr   c                &   < V ^8  d   QhRS[ RS[/# )r   or   )objectro   )r   r   s   "r   r   rh      s     K K K4 Kr   c                d    \        V\        4      ;'       d    VP                  V P                  8H  # rj   )r;   re   rg   )r"   rt   s   &&r   __eq__DefaultPlaceholder.__eq__   s%    !/0JJQWW

5JJr   rk   N)
rZ   r[   r\   r]   r^   rl   rq   rw   ra   rb   )r   s   @r   re   re      s*         K Kr   re   DefaultTypec                0    V ^8  d   QhR\         R\         /# )r   rg   r   )ry   )r   s   "r   r   r      s     % %; %; %r   c                    \        V 4      # )z
You shouldn't use this function directly.

It's used internally to recognize when a default value has been overwritten, even
if the overridden default value was truthy.
)re   rk   s   &r   Defaultr|      s     e$$r   N)collections.abcr   r   typingr   r   r   r   r	   annotated_docr
   pydanticr   starlette.datastructuresr   r   r   r   r   r   r   r<   re   ry   r|   r2   r   r   <module>r      s^    -   ) / 7 9 7 ? 3 FAA$ AAHK K$ m$%r   