Views (harp.views)

The Views (harp.views) package contains tools for transforming non-response controller return values into responses.

Contents

class html[source]

Bases: str

content_type = 'text/html'
class json[source]

Bases: dict

This is a marked dict type that our view event listener will recognize and serialize to json in a response.

Usage:

def handler():
    return json({"foo": "bar"})

Submodules