__init__.py 514 B

12345678910111213141516
  1. """
  2. Endpoints to support "play" mode, data restoration
  3. """
  4. from flask import Flask, Blueprint
  5. # The api blueprint. It is registered with the Flask app (see app.py)
  6. flexmeasures_api = Blueprint("flexmeasures_api_play", __name__)
  7. def register_at(app: Flask):
  8. """This can be used to register this blueprint together with other api-related things"""
  9. import flexmeasures.api.play.routes # noqa: F401 this is necessary to load the endpoints
  10. app.register_blueprint(flexmeasures_api, url_prefix="/api")