INNER CODE UNIT · Python
make_app
buckaroo-data/buckaroo · buckaroo/server/app.py:13
def make_app(sessions: SessionManager | None = None, port: int = 8888, open_browser: bool = True,
datasets: list | None = None) -> tornado.web.Application:
"""Build the tornado app.
``datasets`` is the operator-supplied list of dropdown entries the
demo page (/s/<id>) exposes — each a ``{"label", "kind", "target"}``
dict, with ``kind`` in ``("pandas", "lazy", "xorq")``. ``None`` /
``[]`` means no datasets configured: the page omits the dropdown
entirely rather than shipping the author's filesystem layout. See
issue #811."""
if sessions is None:
sessions = SessionManager()
static_path = os.path.join(os.path.dirname(__file__), "..", "static")
return tornado.web.Application([
(r"/health", HealthHandler),
(r"/diagnostics", DiagnosticsHandler),