parameters: (view_func)
return_statement: return wraps(view_func)(_decorator)
docstring: Decorator for creating views that return pylab images as a JSON object filled with base64 encoded pngs.
      Adds querystring options for performing scaling.
docstring_summary: Decorator for creating views that return pylab images as a JSON object filled with base64 encoded pngs.
      Adds querystring options for performing scaling.
docstring_tokens: Decorator for creating views that return pylab images as a JSON object filled with base64 encoded pngs . Adds querystring options for performing scaling .
function: def pylabToJsonBase64PNGs(view_func):
      """
      Decorator for creating views that return pylab images as a JSON object filled with base64 encoded pngs.
      Adds querystring options for performing scaling.
      """
      def _decorator(*args, **kwargs):
          images_data = view_func(*args, **kwargs)
          transformer = lambda buf: "data:image/png;base64,%s" % base64.b64encode(_image_to_png(buf)).decode("ascii")
          images_data = mapterminals(transformer, images_data)
  
          return Response(json.dumps(images_data), mimetype="application/json")
      return wraps(view_func)(_decorator)
function_tokens: def pylabToJsonBase64PNGs ( view_func ) : def _decorator ( * args , * * kwargs ) : images_data = view_func ( * args , * * kwargs ) transformer = lambda buf : "data:image/png;base64,%s" % base64 . b64encode ( _image_to_png ( buf ) ) . decode ( "ascii" ) images_data = mapterminals ( transformer , images_data ) return Response ( json . dumps ( images_data ) , mimetype = "application/json" ) return wraps ( view_func ) ( _decorator )