Skip to content

Module tifeatures.resources.response

tifeatures custom responses.

Classes

GeoJSONResponse

class GeoJSONResponse(
    content: Any,
    status_code: int = 200,
    headers: Union[Dict[str, str], NoneType] = None,
    media_type: Union[str, NoneType] = None,
    background: Union[starlette.background.BackgroundTask, NoneType] = None
)

GeoJSON Response

Ancestors (in MRO)

  • fastapi.responses.ORJSONResponse
  • starlette.responses.JSONResponse
  • starlette.responses.Response

Class variables

charset
media_type

Instance variables

headers

Methods

def delete_cookie(
    self,
    key: str,
    path: str = '/',
    domain: Union[str, NoneType] = None,
    secure: bool = False,
    httponly: bool = False,
    samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
) -> None

init_headers

def init_headers(
    self,
    headers: Union[Mapping[str, str], NoneType] = None
) -> None

render

def render(
    self,
    content: Any
) -> bytes
def set_cookie(
    self,
    key: str,
    value: str = '',
    max_age: Union[int, NoneType] = None,
    expires: Union[datetime.datetime, str, int, NoneType] = None,
    path: str = '/',
    domain: Union[str, NoneType] = None,
    secure: bool = False,
    httponly: bool = False,
    samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
) -> None

SchemaJSONResponse

class SchemaJSONResponse(
    content: Any,
    status_code: int = 200,
    headers: Union[Dict[str, str], NoneType] = None,
    media_type: Union[str, NoneType] = None,
    background: Union[starlette.background.BackgroundTask, NoneType] = None
)

Schema Response

Ancestors (in MRO)

  • fastapi.responses.ORJSONResponse
  • starlette.responses.JSONResponse
  • starlette.responses.Response

Class variables

charset
media_type

Instance variables

headers

Methods

def delete_cookie(
    self,
    key: str,
    path: str = '/',
    domain: Union[str, NoneType] = None,
    secure: bool = False,
    httponly: bool = False,
    samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
) -> None

init_headers

def init_headers(
    self,
    headers: Union[Mapping[str, str], NoneType] = None
) -> None

render

def render(
    self,
    content: Any
) -> bytes
def set_cookie(
    self,
    key: str,
    value: str = '',
    max_age: Union[int, NoneType] = None,
    expires: Union[datetime.datetime, str, int, NoneType] = None,
    path: str = '/',
    domain: Union[str, NoneType] = None,
    secure: bool = False,
    httponly: bool = False,
    samesite: Union[Literal['lax', 'strict', 'none'], NoneType] = 'lax'
) -> None