def runserver(*args, **kwargs): """Override default `runserver` to init webapp before running.""" app = init_webapp() # TODO(sholsapp): parameterize this, but don't clobber the *args, **kwargs # space, because it's annoying to have to pass these in to the `run` method. config = ConfigObj('config/sample.config', configspec='config/sample.configspec') app.config_obj = config app.run(*args, host='0.0.0.0', **kwargs)
def dump_database(): """Dump the flask-rrd database.""" init_webapp() for r in RRD.query.all(): print r