Virtual ``settings.py`` with values transported from real
    :mod:`settings.py`, so the Brython frontend may be configured same way as
    backend.

    Some of the critical values are intentionally left out.

def settings_api():
    """
    Virtual ``settings.py`` with values transported from real
    :mod:`settings.py`, so the Brython frontend may be configured same way as
    backend.

    Some of the critical values are intentionally left out.
    """
    variables = [
        "%s = %s" % (var, repr(getattr(settings, var)))
        for var in sorted(dir(settings))
        if (not var.startswith("_") and var.upper() == var and
            not var.startswith("SEEDER"))  # hide the private tokens and url
    ]

    return PY_HEADER + "\n\n".join(variables)