backtrader.bokeh.webapp module

Web application server.

Provides Bokeh Server wrapper.

class backtrader.bokeh.webapp.Webapp[源代码]

基类:object

Web application server.

Wraps Bokeh Server, providing the following features: - Auto-start server - Session management - Auto-open browser

title

Page title

template

Template filename

scheme

Theme instance

address

Server address

port

Server port

__init__(title, template, scheme, on_root_model, on_session_destroyed=None, autostart=True, address='localhost', port=8999)[源代码]

Initialize web application.

参数:
  • title -- Page title

  • template -- Template filename

  • scheme -- Theme instance

  • on_root_model -- Callback function to build root model

  • on_session_destroyed -- Session destroyed callback (optional)

  • autostart -- Whether to auto-start

  • address -- Server address

  • port -- Server port

start(loop=None)[源代码]

Start server.

参数:

loop -- Tornado IOLoop (optional)

stop()[源代码]

Stop server.