def configure_app(app, config=None):
    """
    Different ways of configuration

    :param app:
    :param config:
    :return:
    """
    # respect the config first
    if config and config != "None":
        app.config["CONFIG_PATH"] = config
        app.config.from_object(from_file(config))
    else:
        try:
            app.config.from_envvar("LEMUR_CONF")
        except RuntimeError:
            # look in default paths
            if os.path.isfile(os.path.expanduser("~/.lemur/lemur.conf.py")):
                app.config.from_object(
                    from_file(os.path.expanduser("~/.lemur/lemur.conf.py"))
                )
            else:
                app.config.from_object(
                    from_file(
                        os.path.join(
                            os.path.dirname(os.path.realpath(__file__)),
                            "default.conf.py",
                        )
                    )
                )

    # we don't use this
    app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False

    Different ways of configuration

    :param app:
    :param config:
    :return:
    
lemur/factory.py