
    ib                        d dl Z d dlmZmZmZ d dlmZ d dlmZ d dl	m
Z
 d dl	mZ d dl	mZ d dl	mZ d d	l	mZ d d
l	mZ d dl	mZ d dlmZ  G d de      Z G d de      Z	  ee e j*                  d            Z	  ee e j*                  d            Z eded       G d de             Z eded       G d de             Zy# e$ r dZY Vw xY w# e$ r dZY Iw xY w)    N)AnyProtocolcast)FastAPIDeprecationWarning)EventSourceResponse)FileResponse)HTMLResponse)JSONResponse)PlainTextResponse)RedirectResponse)Response)StreamingResponse)
deprecatedc                   &    e Zd ZdddededefdZy)_UjsonModule.ensure_ascii_UjsonModule__objr   returnc                     y N )selfr   r   s      C/root/launch/venv/lib/python3.12/site-packages/fastapi/responses.pydumpsz_UjsonModule.dumps           N)__name__
__module____qualname__r   boolstrr   r   r   r   r   r      s    8;H3HHHr   r   c                   <    e Zd ZU eed<   eed<   dddededefdZy	)
_OrjsonModuleOPT_NON_STR_KEYSOPT_SERIALIZE_NUMPY.option_OrjsonModule__objr(   r   c                     y r   r   )r   r)   r(   s      r   r   z_OrjsonModule.dumps   r   r   N)r   r   r    int__annotations__r   bytesr   r   r   r   r$   r$      s#    14C3C3CCr   r$   ujsonorjsonal  UJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/   )category
stacklevelc                        e Zd ZdZdedefdZy)UJSONResponsea  JSON response using the ujson library to serialize data to JSON.

    **Deprecated**: `UJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `ujson` is not included with FastAPI and must be installed
    separately, e.g. `pip install ujson`.
    contentr   c                 h    t         J d       t         j                  |d      j                  d      S )Nz,ujson must be installed to use UJSONResponseFr   zutf-8)r.   r   encoder   r5   s     r   renderzUJSONResponse.render@   s2     P"PP {{7{7>>wGGr   Nr   r   r    __doc__r   r-   r9   r   r   r   r4   r4   '   s    Hc He Hr   r4   am  ORJSONResponse is deprecated, FastAPI now serializes data directly to JSON bytes via Pydantic when a return type or response model is set, which is faster and doesn't need a custom response class. Read more in the FastAPI docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model and https://fastapi.tiangolo.com/tutorial/response-model/c                        e Zd ZdZdedefdZy)ORJSONResponsea  JSON response using the orjson library to serialize data to JSON.

    **Deprecated**: `ORJSONResponse` is deprecated. FastAPI now serializes data
    directly to JSON bytes via Pydantic when a return type or response model is
    set, which is faster and doesn't need a custom response class.

    Read more in the
    [FastAPI docs for Custom Response](https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model)
    and the
    [FastAPI docs for Response Model](https://fastapi.tiangolo.com/tutorial/response-model/).

    **Note**: `orjson` is not included with FastAPI and must be installed
    separately, e.g. `pip install orjson`.
    r5   r   c                     t         J d       t         j                  |t         j                  t         j                  z        S )Nz.orjson must be installed to use ORJSONResponser'   )r/   r   r%   r&   r8   s     r   r9   zORJSONResponse.render^   s@    !S#SS!||F33f6P6PP  
 	
r   Nr:   r   r   r   r=   r=   E   s    
c 
e 
r   r=   )	importlibtypingr   r   r   fastapi.exceptionsr   fastapi.sser   starlette.responsesr   r	   r
   r   r   r   r   typing_extensionsr   r   r$   import_moduler.   ModuleNotFoundErrorr/   r4   r=   r   r   r   <module>rG      s    & & 8 B < < < F D 4 F (I8 IDH D6y66w?@E
-!8!8!8!BCF
 @
 'HL HH* @
 '
\ 

c  E  Fs$   "C <C CCCC