biggr_models.handlers.escher_handlers
=====================================

.. py:module:: biggr_models.handlers.escher_handlers


Attributes
----------

.. autoapisummary::

   biggr_models.handlers.escher_handlers.ESCHER_CSS


Classes
-------

.. autoapisummary::

   biggr_models.handlers.escher_handlers.EscherHandler


Functions
---------

.. autoapisummary::

   biggr_models.handlers.escher_handlers.builder_to_html_string


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

.. py:data:: ESCHER_CSS
   :value: Multiline-String

   .. raw:: html

      <details><summary>Show Value</summary>

   .. code-block:: python

      """svg.escher-svg #mouse-node {
        fill: none;
      }
      svg.escher-svg #canvas {
        stroke: #ccc;
        stroke-width: 7px;
        fill: white;
      }
      svg.escher-svg .resize-rect {
        fill: black;
        opacity: 0;
        stroke: none;
      }
      svg.escher-svg .label {
        font-family: sans-serif;
        font-style: italic;
        font-weight: bold;
        font-size: 8px;
        fill: black;
        stroke: none;
        text-rendering: optimizelegibility;
        cursor: default;
      }
      svg.escher-svg .reaction-label {
        font-size: 30px;
        fill: rgb(13, 110, 253);
        text-rendering: optimizelegibility;
      }
      svg.escher-svg .node-label {
        font-size: 20px;
      }
      svg.escher-svg .gene-label {
        font-size: 18px;
        fill: rgb(32, 32, 120);
        text-rendering: optimizelegibility;
        cursor: default;
      }
      svg.escher-svg .text-label .label {
        font-size: 50px;
      }
      svg.escher-svg .text-label-input {
        font-size: 50px;
      }
      svg.escher-svg .node-circle {
        stroke-width: 4px;
      }
      svg.escher-svg .midmarker-circle, svg.escher-svg .multimarker-circle {
        fill: white;
        fill-opacity: 0.2;
        stroke: rgb(50, 50, 50);
        display: none !important;
      }
      svg.escher-svg g.selected .node-circle{
        stroke-width: 6px;
        stroke: rgb(20, 113, 199);
      }
      svg.escher-svg g.selected .label {
        fill: rgb(20, 113, 199);
      }
      svg.escher-svg .metabolite-circle {
        stroke: #d36b2a;
        fill: #ff883f;
      }
      svg.escher-svg g.selected .metabolite-circle {
        stroke: rgb(5, 2, 0);
      }
      svg.escher-svg .segment {
        stroke: #334E75;
        stroke-width: 10px;
        fill: none;
      }
      svg.escher-svg .arrowhead {
        fill: #334E75;
      }
      svg.escher-svg .stoichiometry-label-rect {
        fill: white;
        opacity: 0.5;
      }
      svg.escher-svg .stoichiometry-label {
        fill: #334E75;
        font-size: 17px;
      }
      svg.escher-svg .membrane {
        fill: none;
        stroke: rgb(255, 187, 0);
      }
      svg.escher-svg .brush .extent {
        fill-opacity: 0.1;
        fill: black;
        stroke: #fff;
        shape-rendering: crispEdges;
      }
      svg.escher-svg #brush-container .background {
        fill: none;
      }
      svg.escher-svg .bezier-circle {
        fill: rgb(255,255,255);
      }
      svg.escher-svg .bezier-circle.b1 {
        stroke: red;
      }
      svg.escher-svg .bezier-circle.b2 {
        stroke: blue;
      }
      svg.escher-svg .connect-line{
        stroke: rgb(200,200,200);
      }
      svg.escher-svg .direction-arrow {
        cursor: default;
        stroke: black;
        stroke-width: 1px;
        fill: white;
        opacity: 0.3;
      }
      svg.escher-svg .start-reaction-target {
        stroke: rgb(100,100,100);
        fill: none;
        opacity: 0.5;
      }
      svg.escher-svg .rotation-center-line {
        stroke: red;
        stroke-width: 5px;
      }
      svg.escher-svg .highlight {
        fill: #D97000;
        text-decoration: underline;
      }
      svg.escher-svg .node-to-combine {
        stroke-width: 12px !important;
      }
      .escher-container .button.btn, .escher-container .buttonGroup.btn {
        border-radius: none !important;
        background: rgb(51, 122, 183) !important;
        border: 1px solid rgb(43.35, 103.7, 155.55) !important;
        color: white !important;
        font-weight: normal !important;
      }
      .legend-container{
        display: none !important;
      }
      """

   .. raw:: html

      </details>



.. py:function:: builder_to_html_string(builder: escher.plots.Builder, **kwargs)

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

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


   Base RequestHandler that handles standard requests.


   .. py:attribute:: name
      :value: None



   .. py:method:: initialize(**kwargs)

      Hook for subclass initialization. Called for each request.

      A dictionary passed as the third argument of a ``URLSpec`` will be
      supplied as keyword arguments to ``initialize()``.

      Example::

          class ProfileHandler(RequestHandler):
              def initialize(self, database):
                  self.database = database

              def get(self, username):
                  ...

          app = Application([
              (r'/user/(.*)', ProfileHandler, dict(database=database)),
              ])



   .. py:method:: prepare()

      Called at the beginning of a request before  `get`/`post`/etc.

      Override this method to perform common initialization regardless
      of the request method. There is no guarantee that ``prepare`` will
      be called if an error occurs that is handled by the framework.

      Asynchronous support: Use ``async def`` or decorate this method with
      `.gen.coroutine` to make it asynchronous.
      If this method returns an  ``Awaitable`` execution will not proceed
      until the ``Awaitable`` is done.

      .. versionadded:: 3.1
         Asynchronous support.



   .. py:method:: get(model_bigg_id: str, map_bigg_id: str, **kwargs)


   .. py:method:: write_map(map_json: str, builder_opts: Dict[str, Any] = {}, **kwargs)


