@staticmethod
    def __get_application_data(app):
        environment = {}

        for name in app.config:
            value = app.config[name]
            environment[name] = str(value) if value else None

        for name in os.environ:
            value = os.environ[name]
            environment["os.%s" % name] = str(value)

        if pkg_resources:
            modules = {}

            for module in pkg_resources.working_set:
                modules[module.project_name] = module.version
        else:
            modules = None

        return {
            "framework": "flask",
            "env": Exceptional.__filter(app, environment,
                "EXCEPTIONAL_ENVIRONMENT_FILTER"),
            "language": "python",
            "language_version": sys.version.replace('\n', ''),
            "application_root_directory": app.root_path,
            "loaded_libraries": modules
        }
Get application data.
dataset/ETHPy150Open jzempel/flask-exceptional/flask_exceptional.py/Exceptional.__get_application_data