biggr_models.handlers.home_handlers
===================================

.. py:module:: biggr_models.handlers.home_handlers

.. autoapi-nested-parse::

   Handlers for the BiGGr front page and statistics page.



Classes
-------

.. autoapisummary::

   biggr_models.handlers.home_handlers.HomeHandler
   biggr_models.handlers.home_handlers.StatisticsHandler


Functions
---------

.. autoapisummary::

   biggr_models.handlers.home_handlers.build_model_chart


Module Contents
---------------

.. py:function:: 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.


.. py:class:: HomeHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)

   Bases: :py:obj:`biggr_models.handlers.utils.BaseHandler`


   Front page, with precomputed entity counts on the cards.


   .. py:attribute:: template


   .. py:method:: get()


.. py:class:: StatisticsHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)

   Bases: :py:obj:`biggr_models.handlers.utils.BaseHandler`


   Database growth over time.


   .. py:attribute:: template


   .. py:method:: get()


