MCPcopy Create free account
hub / github.com/SolSaviour/INFO1112-Materials / setup

Method setup

Week 6/server.py:1989–1999  ·  view source on GitHub ↗
(self, app)

Source from the content-addressed store, hash-verified

1987 self.json_dumps = json_dumps
1988
1989 def setup(self, app):
1990 app.config._define('json.enable', default=True, validate=bool,
1991 help="Enable or disable automatic dict->json filter.")
1992 app.config._define('json.ascii', default=False, validate=bool,
1993 help="Use only 7-bit ASCII characters in output.")
1994 app.config._define('json.indent', default=True, validate=bool,
1995 help="Add whitespace to make json more readable.")
1996 app.config._define('json.dump_func', default=None,
1997 help="If defined, use this function to transform"
1998 " dict into json. The other options no longer"
1999 " apply.")
2000
2001 def apply(self, callback, route):
2002 dumps = self.json_dumps

Callers 1

installMethod · 0.45

Calls 1

_defineMethod · 0.80

Tested by

no test coverage detected