def app(host, port, env):
    """Simple click example for overwrite dynaconf settings"""

    # change the environment to update proper settings
    settings.setenv(env)

    # update the dynaconfig settings
    settings.update({"host": host, "port": port})

    assert host == settings.HOST
    assert port == settings.PORT
    assert env == settings.current_env

    # ensure that other env didn't change
    with settings.using_env("staging"):
        assert host != settings.HOST
        assert env != settings.current_env
Simple click example for overwrite dynaconf settings
tests_functional/legacy/click_override_strict/app.py