We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ModuleNotFoundError: No module named 'flask'
Dynaconf requires Flask by default, is that by mistake or is it intentionally?

```bash
 File "/app/.heroku/python/lib/python3.6/site-packages/dynaconf/__init__.py", line 5, in <module>        
   from dynaconf.contrib import FlaskDynaconf        
 File "/app/.heroku/python/lib/python3.6/site-packages/dynaconf/contrib/__init__.py", line 1, in <module>        
   from dynaconf.contrib.flask_dynaconf import FlaskDynaconf, DynaconfConfig  # noqa        
 File "/app/.heroku/python/lib/python3.6/site-packages/dynaconf/contrib/flask_dynaconf.py", line 2, in <module>        
   from flask.config import Config        
ModuleNotFoundError: No module named 'flask'
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dynaconf/contrib/flask_dynaconf.py`
Content:
```
1 # coding: utf-8
2 from flask.config import Config
3 from dynaconf import LazySettings
4 
5 
6 class FlaskDynaconf(object):
7     """
8     The arguments are.
9     app = The created app
10     dynaconf_args = Extra args to be passed to Dynaconf (validator for example)
11 
12     All other values are stored as config vars specially:
13 
14     ENVVAR_FOR_DYNACONF = Name of environment variable to use if you want to
15                         change the settings file from env vars
16                         example:
17                             export MYSITE_SETTINGS_MODULE=/tmp/settings.py
18                         with the above the settings will be loaded from that
19                         file
20                         Dynaconf supports .py, .yml, .toml
21 
22     DYNACONF_NAMESPACE = Namespace prefix for your envvars to become settings
23                         example:
24                             export MYSITE_SQL_PORT='@int 5445'
25 
26                         with that exported to env you access using:
27                             app.config.SQL_PORT
28                             app.config.get('SQL_PORT')
29                             app.config.get('sql_port')
30                             # get is case insensitive
31                             app.config['SQL_PORT']
32 
33                         Dynaconf uses `@int, @bool, @float, @json` to cast env
34                         vars
35 
36     SETTINGS_MODULE_FOR_DYNACONF = The name of the module or file to use as
37                                 default to load settings. If nothing is passed
38                                 it will be `settings.py` or value found in
39                                 `ENVVAR_FOR_DYNACONF`
40                                 Dynaconf supports .py, .yml, .toml
41 
42     YAML = If using YAML for settings module, you pass an extra yaml file here
43         It is general useful to have a different file to store secrets
44         example `.secrets.yml` and then values in that file will
45         override other values. And you can exclude the .secrets from your
46         public repositories.
47 
48     --------------------------------------------------------------------------
49 
50     ATTENTION: Take a look at `settings.yml` and `.secrets.yml` to know the
51             required settings format.
52 
53     Settings load order in Dynaconf:
54     0) Load all defaults and Flask defaults
55     1) Load all passed variables when applying FlaskDynaconf
56     2) Update with data in SETTINGS_MODULE_FOR_DYNACONF
57     3) Update with data in YAML extra file if provided
58     4) Update with data in environmente vars `DYNACONF_NAMESPACE_`
59 
60     YAML files are very useful to have `namespaced` settings, lets say,
61     `production` and `development`.
62 
63     You can also achieve the same using multiple `.py` files naming as
64     `settings.py`, `production_settings.py` and `development_settings.py`
65     (see examples/validator)
66 
67     Example::
68 
69         app = Flask(__name__)
70         FlaskDynaconf(
71             app,
72             ENVVAR_FOR_DYNACONF="MYSITE_SETTINGS_MODULE",
73             DYNACONF_NAMESPACE='MYSITE',
74             SETTINGS_MODULE_FOR_DYNACONF='settings.yml',
75             YAML='.secrets.yml',
76             EXTRA_VALUE='You can add aditional config vars here'
77         )
78 
79     Take a look at examples/flask in Dynaconf repository
80 
81     """
82     def __init__(self, app=None, instance_relative_config=False,
83                  dynaconf_instance=None, **kwargs):
84         """kwargs holds initial dynaconf configuration"""
85         self.kwargs = kwargs
86         if 'DYNACONF_NAMESPACE' not in kwargs:
87             kwargs['DYNACONF_NAMESPACE'] = 'FLASK'
88         self.dynaconf_instance = dynaconf_instance
89         self.instance_relative_config = instance_relative_config
90         if app:
91             self.init_app(app, **kwargs)
92 
93     def init_app(self, app, **kwargs):
94         """kwargs holds initial dynaconf configuration"""
95         self.kwargs.update(kwargs)
96         self.settings = self.dynaconf_instance or LazySettings(**self.kwargs)
97         app.config = self.make_config(app)
98         app.dynaconf = self.settings
99 
100     def make_config(self, app):
101         root_path = app.root_path
102         if self.instance_relative_config:  # pragma: no cover
103             root_path = app.instance_path
104         if self.dynaconf_instance:
105             self.settings.update(self.kwargs)
106         return DynaconfConfig(
107             root_path=root_path,
108             defaults=app.config,
109             _settings=self.settings
110         )
111 
112 
113 class DynaconfConfig(Config):
114     """
115     Settings load order in Dynaconf
116     0) Load all defaults and Flask defaults
117     1) Load all passed variables above
118     2) Update with data in SETTINGS_MODULE_FOR_DYNACONF
119     3) Update with data in YAML
120     4) Update with data in rnvironmente vars `DYNACONF_NAMESPACE_`
121     """
122 
123     def get(self, key, default=None):
124         """Gets config from dynaconf variables
125         if variables does not exists in dynaconf try getting from
126         app.config to support runtime settings."""
127         return self._settings.get(key, Config.get(self, key, default))
128 
129     def __init__(self, _settings, *args, **kwargs):
130         """perform the initial load"""
131         super(DynaconfConfig, self).__init__(*args, **kwargs)
132         Config.update(self, _settings.store)
133         self._settings = _settings
134 
135     def __getitem__(self, key):
136         """
137         First try to get value from dynaconf then from Flask
138         """
139         return self.get(key)
140 
141     def __getattr__(self, name):
142         """
143         First try to get value from dynaconf then from Flask
144         """
145         try:
146             return getattr(self._settings, name)
147         except AttributeError:
148             return self[name]
149 
150     def __call__(self, name, *args, **kwargs):
151         return self.get(name, *args, **kwargs)
152
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dynaconf/contrib/flask_dynaconf.py b/dynaconf/contrib/flask_dynaconf.py
--- a/dynaconf/contrib/flask_dynaconf.py
+++ b/dynaconf/contrib/flask_dynaconf.py
@@ -1,5 +1,12 @@
 # coding: utf-8
-from flask.config import Config
+try:
+    from flask.config import Config
+    flask_installed = True
+except ImportError:
+    flask_installed = False
+    Config = object
+
+
 from dynaconf import LazySettings
 
 
@@ -82,6 +89,11 @@
     def __init__(self, app=None, instance_relative_config=False,
                  dynaconf_instance=None, **kwargs):
         """kwargs holds initial dynaconf configuration"""
+        if not flask_installed:
+            raise RuntimeError(
+                "To use this extension Flask must be installed "
+                "install it with: pip install flask"
+            )
         self.kwargs = kwargs
         if 'DYNACONF_NAMESPACE' not in kwargs:
             kwargs['DYNACONF_NAMESPACE'] = 'FLASK'

{"golden_diff": "diff --git a/dynaconf/contrib/flask_dynaconf.py b/dynaconf/contrib/flask_dynaconf.py\n--- a/dynaconf/contrib/flask_dynaconf.py\n+++ b/dynaconf/contrib/flask_dynaconf.py\n@@ -1,5 +1,12 @@\n # coding: utf-8\n-from flask.config import Config\n+try:\n+    from flask.config import Config\n+    flask_installed = True\n+except ImportError:\n+    flask_installed = False\n+    Config = object\n+\n+\n from dynaconf import LazySettings\n \n \n@@ -82,6 +89,11 @@\n     def __init__(self, app=None, instance_relative_config=False,\n                  dynaconf_instance=None, **kwargs):\n         \"\"\"kwargs holds initial dynaconf configuration\"\"\"\n+        if not flask_installed:\n+            raise RuntimeError(\n+                \"To use this extension Flask must be installed \"\n+                \"install it with: pip install flask\"\n+            )\n         self.kwargs = kwargs\n         if 'DYNACONF_NAMESPACE' not in kwargs:\n             kwargs['DYNACONF_NAMESPACE'] = 'FLASK'\n", "issue": "ModuleNotFoundError: No module named 'flask'\nDynaconf requires Flask by default, is that by mistake or is it intentionally?\r\n\r\n```bash\r\n File \"/app/.heroku/python/lib/python3.6/site-packages/dynaconf/__init__.py\", line 5, in <module>        \r\n   from dynaconf.contrib import FlaskDynaconf        \r\n File \"/app/.heroku/python/lib/python3.6/site-packages/dynaconf/contrib/__init__.py\", line 1, in <module>        \r\n   from dynaconf.contrib.flask_dynaconf import FlaskDynaconf, DynaconfConfig  # noqa        \r\n File \"/app/.heroku/python/lib/python3.6/site-packages/dynaconf/contrib/flask_dynaconf.py\", line 2, in <module>        \r\n   from flask.config import Config        \r\nModuleNotFoundError: No module named 'flask'\r\n```\n", "before_files": [{"content": "# coding: utf-8\nfrom flask.config import Config\nfrom dynaconf import LazySettings\n\n\nclass FlaskDynaconf(object):\n    \"\"\"\n    The arguments are.\n    app = The created app\n    dynaconf_args = Extra args to be passed to Dynaconf (validator for example)\n\n    All other values are stored as config vars specially:\n\n    ENVVAR_FOR_DYNACONF = Name of environment variable to use if you want to\n                        change the settings file from env vars\n                        example:\n                            export MYSITE_SETTINGS_MODULE=/tmp/settings.py\n                        with the above the settings will be loaded from that\n                        file\n                        Dynaconf supports .py, .yml, .toml\n\n    DYNACONF_NAMESPACE = Namespace prefix for your envvars to become settings\n                        example:\n                            export MYSITE_SQL_PORT='@int 5445'\n\n                        with that exported to env you access using:\n                            app.config.SQL_PORT\n                            app.config.get('SQL_PORT')\n                            app.config.get('sql_port')\n                            # get is case insensitive\n                            app.config['SQL_PORT']\n\n                        Dynaconf uses `@int, @bool, @float, @json` to cast env\n                        vars\n\n    SETTINGS_MODULE_FOR_DYNACONF = The name of the module or file to use as\n                                default to load settings. If nothing is passed\n                                it will be `settings.py` or value found in\n                                `ENVVAR_FOR_DYNACONF`\n                                Dynaconf supports .py, .yml, .toml\n\n    YAML = If using YAML for settings module, you pass an extra yaml file here\n        It is general useful to have a different file to store secrets\n        example `.secrets.yml` and then values in that file will\n        override other values. And you can exclude the .secrets from your\n        public repositories.\n\n    --------------------------------------------------------------------------\n\n    ATTENTION: Take a look at `settings.yml` and `.secrets.yml` to know the\n            required settings format.\n\n    Settings load order in Dynaconf:\n    0) Load all defaults and Flask defaults\n    1) Load all passed variables when applying FlaskDynaconf\n    2) Update with data in SETTINGS_MODULE_FOR_DYNACONF\n    3) Update with data in YAML extra file if provided\n    4) Update with data in environmente vars `DYNACONF_NAMESPACE_`\n\n    YAML files are very useful to have `namespaced` settings, lets say,\n    `production` and `development`.\n\n    You can also achieve the same using multiple `.py` files naming as\n    `settings.py`, `production_settings.py` and `development_settings.py`\n    (see examples/validator)\n\n    Example::\n\n        app = Flask(__name__)\n        FlaskDynaconf(\n            app,\n            ENVVAR_FOR_DYNACONF=\"MYSITE_SETTINGS_MODULE\",\n            DYNACONF_NAMESPACE='MYSITE',\n            SETTINGS_MODULE_FOR_DYNACONF='settings.yml',\n            YAML='.secrets.yml',\n            EXTRA_VALUE='You can add aditional config vars here'\n        )\n\n    Take a look at examples/flask in Dynaconf repository\n\n    \"\"\"\n    def __init__(self, app=None, instance_relative_config=False,\n                 dynaconf_instance=None, **kwargs):\n        \"\"\"kwargs holds initial dynaconf configuration\"\"\"\n        self.kwargs = kwargs\n        if 'DYNACONF_NAMESPACE' not in kwargs:\n            kwargs['DYNACONF_NAMESPACE'] = 'FLASK'\n        self.dynaconf_instance = dynaconf_instance\n        self.instance_relative_config = instance_relative_config\n        if app:\n            self.init_app(app, **kwargs)\n\n    def init_app(self, app, **kwargs):\n        \"\"\"kwargs holds initial dynaconf configuration\"\"\"\n        self.kwargs.update(kwargs)\n        self.settings = self.dynaconf_instance or LazySettings(**self.kwargs)\n        app.config = self.make_config(app)\n        app.dynaconf = self.settings\n\n    def make_config(self, app):\n        root_path = app.root_path\n        if self.instance_relative_config:  # pragma: no cover\n            root_path = app.instance_path\n        if self.dynaconf_instance:\n            self.settings.update(self.kwargs)\n        return DynaconfConfig(\n            root_path=root_path,\n            defaults=app.config,\n            _settings=self.settings\n        )\n\n\nclass DynaconfConfig(Config):\n    \"\"\"\n    Settings load order in Dynaconf\n    0) Load all defaults and Flask defaults\n    1) Load all passed variables above\n    2) Update with data in SETTINGS_MODULE_FOR_DYNACONF\n    3) Update with data in YAML\n    4) Update with data in rnvironmente vars `DYNACONF_NAMESPACE_`\n    \"\"\"\n\n    def get(self, key, default=None):\n        \"\"\"Gets config from dynaconf variables\n        if variables does not exists in dynaconf try getting from\n        app.config to support runtime settings.\"\"\"\n        return self._settings.get(key, Config.get(self, key, default))\n\n    def __init__(self, _settings, *args, **kwargs):\n        \"\"\"perform the initial load\"\"\"\n        super(DynaconfConfig, self).__init__(*args, **kwargs)\n        Config.update(self, _settings.store)\n        self._settings = _settings\n\n    def __getitem__(self, key):\n        \"\"\"\n        First try to get value from dynaconf then from Flask\n        \"\"\"\n        return self.get(key)\n\n    def __getattr__(self, name):\n        \"\"\"\n        First try to get value from dynaconf then from Flask\n        \"\"\"\n        try:\n            return getattr(self._settings, name)\n        except AttributeError:\n            return self[name]\n\n    def __call__(self, name, *args, **kwargs):\n        return self.get(name, *args, **kwargs)\n", "path": "dynaconf/contrib/flask_dynaconf.py"}], "after_files": [{"content": "# coding: utf-8\ntry:\n    from flask.config import Config\n    flask_installed = True\nexcept ImportError:\n    flask_installed = False\n    Config = object\n\n\nfrom dynaconf import LazySettings\n\n\nclass FlaskDynaconf(object):\n    \"\"\"\n    The arguments are.\n    app = The created app\n    dynaconf_args = Extra args to be passed to Dynaconf (validator for example)\n\n    All other values are stored as config vars specially:\n\n    ENVVAR_FOR_DYNACONF = Name of environment variable to use if you want to\n                        change the settings file from env vars\n                        example:\n                            export MYSITE_SETTINGS_MODULE=/tmp/settings.py\n                        with the above the settings will be loaded from that\n                        file\n                        Dynaconf supports .py, .yml, .toml\n\n    DYNACONF_NAMESPACE = Namespace prefix for your envvars to become settings\n                        example:\n                            export MYSITE_SQL_PORT='@int 5445'\n\n                        with that exported to env you access using:\n                            app.config.SQL_PORT\n                            app.config.get('SQL_PORT')\n                            app.config.get('sql_port')\n                            # get is case insensitive\n                            app.config['SQL_PORT']\n\n                        Dynaconf uses `@int, @bool, @float, @json` to cast env\n                        vars\n\n    SETTINGS_MODULE_FOR_DYNACONF = The name of the module or file to use as\n                                default to load settings. If nothing is passed\n                                it will be `settings.py` or value found in\n                                `ENVVAR_FOR_DYNACONF`\n                                Dynaconf supports .py, .yml, .toml\n\n    YAML = If using YAML for settings module, you pass an extra yaml file here\n        It is general useful to have a different file to store secrets\n        example `.secrets.yml` and then values in that file will\n        override other values. And you can exclude the .secrets from your\n        public repositories.\n\n    --------------------------------------------------------------------------\n\n    ATTENTION: Take a look at `settings.yml` and `.secrets.yml` to know the\n            required settings format.\n\n    Settings load order in Dynaconf:\n    0) Load all defaults and Flask defaults\n    1) Load all passed variables when applying FlaskDynaconf\n    2) Update with data in SETTINGS_MODULE_FOR_DYNACONF\n    3) Update with data in YAML extra file if provided\n    4) Update with data in environmente vars `DYNACONF_NAMESPACE_`\n\n    YAML files are very useful to have `namespaced` settings, lets say,\n    `production` and `development`.\n\n    You can also achieve the same using multiple `.py` files naming as\n    `settings.py`, `production_settings.py` and `development_settings.py`\n    (see examples/validator)\n\n    Example::\n\n        app = Flask(__name__)\n        FlaskDynaconf(\n            app,\n            ENVVAR_FOR_DYNACONF=\"MYSITE_SETTINGS_MODULE\",\n            DYNACONF_NAMESPACE='MYSITE',\n            SETTINGS_MODULE_FOR_DYNACONF='settings.yml',\n            YAML='.secrets.yml',\n            EXTRA_VALUE='You can add aditional config vars here'\n        )\n\n    Take a look at examples/flask in Dynaconf repository\n\n    \"\"\"\n    def __init__(self, app=None, instance_relative_config=False,\n                 dynaconf_instance=None, **kwargs):\n        \"\"\"kwargs holds initial dynaconf configuration\"\"\"\n        if not flask_installed:\n            raise RuntimeError(\n                \"To use this extension Flask must be installed \"\n                \"install it with: pip install flask\"\n            )\n        self.kwargs = kwargs\n        if 'DYNACONF_NAMESPACE' not in kwargs:\n            kwargs['DYNACONF_NAMESPACE'] = 'FLASK'\n        self.dynaconf_instance = dynaconf_instance\n        self.instance_relative_config = instance_relative_config\n        if app:\n            self.init_app(app, **kwargs)\n\n    def init_app(self, app, **kwargs):\n        \"\"\"kwargs holds initial dynaconf configuration\"\"\"\n        self.kwargs.update(kwargs)\n        self.settings = self.dynaconf_instance or LazySettings(**self.kwargs)\n        app.config = self.make_config(app)\n        app.dynaconf = self.settings\n\n    def make_config(self, app):\n        root_path = app.root_path\n        if self.instance_relative_config:  # pragma: no cover\n            root_path = app.instance_path\n        if self.dynaconf_instance:\n            self.settings.update(self.kwargs)\n        return DynaconfConfig(\n            root_path=root_path,\n            defaults=app.config,\n            _settings=self.settings\n        )\n\n\nclass DynaconfConfig(Config):\n    \"\"\"\n    Settings load order in Dynaconf\n    0) Load all defaults and Flask defaults\n    1) Load all passed variables above\n    2) Update with data in SETTINGS_MODULE_FOR_DYNACONF\n    3) Update with data in YAML\n    4) Update with data in rnvironmente vars `DYNACONF_NAMESPACE_`\n    \"\"\"\n\n    def get(self, key, default=None):\n        \"\"\"Gets config from dynaconf variables\n        if variables does not exists in dynaconf try getting from\n        app.config to support runtime settings.\"\"\"\n        return self._settings.get(key, Config.get(self, key, default))\n\n    def __init__(self, _settings, *args, **kwargs):\n        \"\"\"perform the initial load\"\"\"\n        super(DynaconfConfig, self).__init__(*args, **kwargs)\n        Config.update(self, _settings.store)\n        self._settings = _settings\n\n    def __getitem__(self, key):\n        \"\"\"\n        First try to get value from dynaconf then from Flask\n        \"\"\"\n        return self.get(key)\n\n    def __getattr__(self, name):\n        \"\"\"\n        First try to get value from dynaconf then from Flask\n        \"\"\"\n        try:\n            return getattr(self._settings, name)\n        except AttributeError:\n            return self[name]\n\n    def __call__(self, name, *args, **kwargs):\n        return self.get(name, *args, **kwargs)\n", "path": "dynaconf/contrib/flask_dynaconf.py"}]}