aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/types.py
blob: f373825f1058ce979a3f6ee5cd7684dfffa997aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import Tuple, Union

from flask import Response as FlaskResponse
from werkzeug.wrappers import Response as WerkzeugResponse

# type to represent any of the used/plausible return types
AnyResponse = Union[
    FlaskResponse,
    str,
    Tuple[str, int],
    WerkzeugResponse,
    Tuple[FlaskResponse, int],
    Tuple[WerkzeugResponse, int],
]