Skip to content

responses

titiler.core.resources.responses

Common response models.

GeoJSONResponse

Bases: JSONResponse

GeoJSON Response

JSONResponse

Bases: JSONResponse

Custom JSON Response.

render

render(content: Any) -> bytes

Render JSON.

Same defaults as starlette.responses.JSONResponse.render but allow NaN to be replaced by null using simplejson

NumpyEncoder

Bases: JSONEncoder

Custom JSON Encoder.

default

default(obj)

Catch numpy types and convert them.

XMLResponse

Bases: Response

XML Response