o
    ii~                     @   s  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 d dlmZ zd dlZW n eyS   dZY nw zd dlZW n eye   dZY nw ededdG dd de	ZededdG dd de	ZdS )    )Any)FastAPIDeprecationWarning)EventSourceResponse)FileResponse)HTMLResponse)JSONResponse)PlainTextResponse)RedirectResponse)Response)StreamingResponse)
deprecatedNal  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dZdS )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`.
    contentreturnc                 C   s$   t d usJ dt j|dddS )Nz,ujson must be installed to use UJSONResponseF)ensure_asciizutf-8)ujsondumpsencodeselfr    r   Y/var/www/scraper.webshop2u.hu/html/venv/lib/python3.10/site-packages/fastapi/responses.pyrender3   s   zUJSONResponse.renderN__name__
__module____qualname____doc__r   bytesr   r   r   r   r   r          
r   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                   @   r   )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`.
    r   r   c                 C   s&   t d usJ dt j|t jt jB dS )Nz.orjson must be installed to use ORJSONResponse)option)orjsonr   OPT_NON_STR_KEYSOPT_SERIALIZE_NUMPYr   r   r   r   r   Q   s   zORJSONResponse.renderNr   r   r   r   r   r$   8   r#   r$   )typingr   fastapi.exceptionsr   fastapi.sser   starlette.responsesr   r   r   r   r	   r
   r   typing_extensionsr   r   ImportErrorr&   r   r$   r   r   r   r   <module>   sB    		