royalnet.web

royalnet.web.create_app(config_obj: Type, blueprints: List[royalnet.web.royalprint.Royalprint])

Create a flask.Flask application object.

Gets the app.secret_key from the SECRET_KEY envvar.

Also requires a DB_PATH key in config_obj to initialize the database connection.

Warning

The code for this class was written at 1 AM, and I have no clue of how and why it works or even of if it really does work. Use with caution?

Parameters
  • config_obj – The object to be passed to flask.Flask.config.from_object().

  • blueprints – A list of blueprints to be registered to the application.

Returns

The created flask.Flask.

class royalnet.web.Royalprint(name, import_name, static_folder=None, static_url_path=None, template_folder=None, url_prefix=None, subdomain=None, url_defaults=None, root_path=None, required_tables: Optional[set] = None)

An edited flask.Blueprint containing an additional required_tables parameter.

Royalprints

Some Royalprints that can be used with the Royalnet Flask server.