biggr_models.handlers.home_handlers#

Handlers for the BiGGr front page and statistics page.

Classes#

HomeHandler

Front page, with precomputed entity counts on the cards.

StatisticsHandler

Database growth over time.

Functions#

build_model_chart(points[, width, height, pad_left, pad])

Turn [{"date": ..., "count": ...}, ...] into SVG geometry for one line.

Module Contents#

biggr_models.handlers.home_handlers.build_model_chart(points, width=720, height=320, pad_left=64, pad=32)#

Turn [{“date”: …, “count”: …}, …] into SVG geometry for one line.

Returns None when there are fewer than two points, so the template can show the cold-start message instead of an axis with nothing on it.

The y axis starts at zero: scaling to the minimum would turn a small absolute change into a dramatic climb, which is the kind of misleading chart this page exists to avoid.

class biggr_models.handlers.home_handlers.HomeHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#

Bases: biggr_models.handlers.utils.BaseHandler

Front page, with precomputed entity counts on the cards.

template#
get()#
class biggr_models.handlers.home_handlers.StatisticsHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#

Bases: biggr_models.handlers.utils.BaseHandler

Database growth over time.

template#
get()#