We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Allow core_loaders to be case insensitive.
**Describe the bug**

When using the `core_loaders` attribute with the value `["yaml"]` Dynaconf fails reading settings from the respective YML configuration file.

**To Reproduce**

1. Go into an empty dir.

2. Setup environment.

  * Python 3.9
  * `pip install dynaconf[yaml]` or `poetry add "dynaconf[yaml]"`
  * dynaconf 3.1.2
  * ruaml.yml 0.16.2

3. Create `settings.yml`

```yml
test: hallo
logging:
  json: true
```
4. Create `test.py` and execute it. It will succeed.

```python
from dynaconf import Dynaconf

settings = Dynaconf(
    merge_enabled=True,
    settings_files=["settings.yml"],
)

print(settings.TEST)
print(settings.LOGGING.JSON)
```

5. Add attribute `core_loaders` as recommended in the Dynaconf doc. Execute. This will fail.

```python
from dynaconf import Dynaconf

settings = Dynaconf(
    merge_enabled=True,
    core_loaders=["yaml"],
    settings_files=["settings.yml"],
)

print(settings.TEST)
print(settings.LOGGING.JSON)
```


--- 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/loaders/__init__.py`
Content:
```
1 import os
2 
3 from dynaconf import constants as ct
4 from dynaconf import default_settings
5 from dynaconf.loaders import ini_loader
6 from dynaconf.loaders import json_loader
7 from dynaconf.loaders import py_loader
8 from dynaconf.loaders import toml_loader
9 from dynaconf.loaders import yaml_loader
10 from dynaconf.utils import deduplicate
11 from dynaconf.utils import ensure_a_list
12 from dynaconf.utils.boxing import DynaBox
13 from dynaconf.utils.files import get_local_filename
14 from dynaconf.utils.parse_conf import false_values
15 
16 
17 def default_loader(obj, defaults=None):
18     """Loads default settings and check if there are overridings
19     exported as environment variables"""
20     defaults = defaults or {}
21     default_settings_values = {
22         key: value
23         for key, value in default_settings.__dict__.items()  # noqa
24         if key.isupper()
25     }
26 
27     all_keys = deduplicate(
28         list(defaults.keys()) + list(default_settings_values.keys())
29     )
30 
31     for key in all_keys:
32         if not obj.exists(key):
33             value = defaults.get(key, default_settings_values.get(key))
34             obj.set(key, value)
35 
36     # start dotenv to get default env vars from there
37     # check overrides in env vars
38     if obj.get("load_dotenv") is True:
39         default_settings.start_dotenv(obj)
40 
41     # Deal with cases where a custom ENV_SWITCHER_IS_PROVIDED
42     # Example: Flask and Django Extensions
43     env_switcher = defaults.get(
44         "ENV_SWITCHER_FOR_DYNACONF", "ENV_FOR_DYNACONF"
45     )
46 
47     for key in all_keys:
48         if key not in default_settings_values.keys():
49             continue
50 
51         env_value = obj.get_environ(
52             env_switcher if key == "ENV_FOR_DYNACONF" else key,
53             default="_not_found",
54         )
55 
56         if env_value != "_not_found":
57             obj.set(key, env_value, tomlfy=True)
58 
59 
60 def settings_loader(
61     obj, settings_module=None, env=None, silent=True, key=None, filename=None
62 ):
63     """Loads from defined settings module
64 
65     :param obj: A dynaconf instance
66     :param settings_module: A path or a list of paths e.g settings.toml
67     :param env: Env to look for data defaults: development
68     :param silent: Boolean to raise loading errors
69     :param key: Load a single key if provided
70     :param filename: optional filename to override the settings_module
71     """
72     if filename is None:
73         settings_module = settings_module or obj.settings_module
74         if not settings_module:  # pragma: no cover
75             return
76         files = ensure_a_list(settings_module)
77     else:
78         files = ensure_a_list(filename)
79 
80     files.extend(ensure_a_list(obj.get("SECRETS_FOR_DYNACONF", None)))
81 
82     found_files = []
83     modules_names = []
84     for item in files:
85         item = str(item)  # Ensure str in case of LocalPath/Path is passed.
86         if item.endswith(ct.ALL_EXTENSIONS + (".py",)):
87             p_root = obj._root_path or (
88                 os.path.dirname(found_files[0]) if found_files else None
89             )
90             found = obj.find_file(item, project_root=p_root)
91             if found:
92                 found_files.append(found)
93         else:
94             # a bare python module name w/o extension
95             modules_names.append(item)
96 
97     enabled_core_loaders = obj.get("CORE_LOADERS_FOR_DYNACONF")
98 
99     # add `.local.` to found_files list to search for local files.
100     found_files.extend(
101         [
102             get_local_filename(item)
103             for item in found_files
104             if ".local." not in str(item)
105         ]
106     )
107 
108     for mod_file in modules_names + found_files:
109         # can be set to multiple files settings.py,settings.yaml,...
110 
111         # Cascade all loaders
112         loaders = [
113             {"ext": ct.YAML_EXTENSIONS, "name": "YAML", "loader": yaml_loader},
114             {"ext": ct.TOML_EXTENSIONS, "name": "TOML", "loader": toml_loader},
115             {"ext": ct.INI_EXTENSIONS, "name": "INI", "loader": ini_loader},
116             {"ext": ct.JSON_EXTENSIONS, "name": "JSON", "loader": json_loader},
117         ]
118 
119         for loader in loaders:
120             if loader["name"] not in enabled_core_loaders:
121                 continue
122 
123             if mod_file.endswith(loader["ext"]):
124                 loader["loader"].load(
125                     obj, filename=mod_file, env=env, silent=silent, key=key
126                 )
127                 continue
128 
129         if mod_file.endswith(ct.ALL_EXTENSIONS):
130             continue
131 
132         if "PY" not in enabled_core_loaders:
133             # pyloader is disabled
134             continue
135 
136         # must be Python file or module
137         # load from default defined module settings.py or .secrets.py if exists
138         py_loader.load(obj, mod_file, key=key)
139 
140         # load from the current env e.g: development_settings.py
141         env = env or obj.current_env
142         if mod_file.endswith(".py"):
143             if ".secrets.py" == mod_file:
144                 tmpl = ".{0}_{1}{2}"
145                 mod_file = "secrets.py"
146             else:
147                 tmpl = "{0}_{1}{2}"
148 
149             dirname = os.path.dirname(mod_file)
150             filename, extension = os.path.splitext(os.path.basename(mod_file))
151             new_filename = tmpl.format(env.lower(), filename, extension)
152             env_mod_file = os.path.join(dirname, new_filename)
153             global_filename = tmpl.format("global", filename, extension)
154             global_mod_file = os.path.join(dirname, global_filename)
155         else:
156             env_mod_file = f"{env.lower()}_{mod_file}"
157             global_mod_file = f"global_{mod_file}"
158 
159         py_loader.load(
160             obj,
161             env_mod_file,
162             identifier=f"py_{env.upper()}",
163             silent=True,
164             key=key,
165         )
166 
167         # load from global_settings.py
168         py_loader.load(
169             obj, global_mod_file, identifier="py_global", silent=True, key=key
170         )
171 
172 
173 def enable_external_loaders(obj):
174     """Enable external service loaders like `VAULT_` and `REDIS_`
175     looks forenv variables like `REDIS_ENABLED_FOR_DYNACONF`
176     """
177     for name, loader in ct.EXTERNAL_LOADERS.items():
178         enabled = getattr(obj, f"{name.upper()}_ENABLED_FOR_DYNACONF", False)
179         if (
180             enabled
181             and enabled not in false_values
182             and loader not in obj.LOADERS_FOR_DYNACONF
183         ):  # noqa
184             obj.LOADERS_FOR_DYNACONF.insert(0, loader)
185 
186 
187 def write(filename, data, env=None):
188     """Writes `data` to `filename` infers format by file extension."""
189     loader_name = f"{filename.rpartition('.')[-1]}_loader"
190     loader = globals().get(loader_name)
191     if not loader:
192         raise IOError(f"{loader_name} cannot be found.")
193 
194     data = DynaBox(data, box_settings={}).to_dict()
195     if loader is not py_loader and env and env not in data:
196         data = {env: data}
197 
198     loader.write(filename, data, merge=False)
199
```
--- 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/loaders/__init__.py b/dynaconf/loaders/__init__.py
--- a/dynaconf/loaders/__init__.py
+++ b/dynaconf/loaders/__init__.py
@@ -94,7 +94,9 @@
             # a bare python module name w/o extension
             modules_names.append(item)
 
-    enabled_core_loaders = obj.get("CORE_LOADERS_FOR_DYNACONF")
+    enabled_core_loaders = [
+        item.upper() for item in obj.get("CORE_LOADERS_FOR_DYNACONF") or []
+    ]
 
     # add `.local.` to found_files list to search for local files.
     found_files.extend(

{"golden_diff": "diff --git a/dynaconf/loaders/__init__.py b/dynaconf/loaders/__init__.py\n--- a/dynaconf/loaders/__init__.py\n+++ b/dynaconf/loaders/__init__.py\n@@ -94,7 +94,9 @@\n             # a bare python module name w/o extension\n             modules_names.append(item)\n \n-    enabled_core_loaders = obj.get(\"CORE_LOADERS_FOR_DYNACONF\")\n+    enabled_core_loaders = [\n+        item.upper() for item in obj.get(\"CORE_LOADERS_FOR_DYNACONF\") or []\n+    ]\n \n     # add `.local.` to found_files list to search for local files.\n     found_files.extend(\n", "issue": "Allow core_loaders to be case insensitive.\n**Describe the bug**\r\n\r\nWhen using the `core_loaders` attribute with the value `[\"yaml\"]` Dynaconf fails reading settings from the respective YML configuration file.\r\n\r\n**To Reproduce**\r\n\r\n1. Go into an empty dir.\r\n\r\n2. Setup environment.\r\n\r\n  * Python 3.9\r\n  * `pip install dynaconf[yaml]` or `poetry add \"dynaconf[yaml]\"`\r\n  * dynaconf 3.1.2\r\n  * ruaml.yml 0.16.2\r\n\r\n3. Create `settings.yml`\r\n\r\n```yml\r\ntest: hallo\r\nlogging:\r\n  json: true\r\n```\r\n4. Create `test.py` and execute it. It will succeed.\r\n\r\n```python\r\nfrom dynaconf import Dynaconf\r\n\r\nsettings = Dynaconf(\r\n    merge_enabled=True,\r\n    settings_files=[\"settings.yml\"],\r\n)\r\n\r\nprint(settings.TEST)\r\nprint(settings.LOGGING.JSON)\r\n```\r\n\r\n5. Add attribute `core_loaders` as recommended in the Dynaconf doc. Execute. This will fail.\r\n\r\n```python\r\nfrom dynaconf import Dynaconf\r\n\r\nsettings = Dynaconf(\r\n    merge_enabled=True,\r\n    core_loaders=[\"yaml\"],\r\n    settings_files=[\"settings.yml\"],\r\n)\r\n\r\nprint(settings.TEST)\r\nprint(settings.LOGGING.JSON)\r\n```\r\n\n", "before_files": [{"content": "import os\n\nfrom dynaconf import constants as ct\nfrom dynaconf import default_settings\nfrom dynaconf.loaders import ini_loader\nfrom dynaconf.loaders import json_loader\nfrom dynaconf.loaders import py_loader\nfrom dynaconf.loaders import toml_loader\nfrom dynaconf.loaders import yaml_loader\nfrom dynaconf.utils import deduplicate\nfrom dynaconf.utils import ensure_a_list\nfrom dynaconf.utils.boxing import DynaBox\nfrom dynaconf.utils.files import get_local_filename\nfrom dynaconf.utils.parse_conf import false_values\n\n\ndef default_loader(obj, defaults=None):\n    \"\"\"Loads default settings and check if there are overridings\n    exported as environment variables\"\"\"\n    defaults = defaults or {}\n    default_settings_values = {\n        key: value\n        for key, value in default_settings.__dict__.items()  # noqa\n        if key.isupper()\n    }\n\n    all_keys = deduplicate(\n        list(defaults.keys()) + list(default_settings_values.keys())\n    )\n\n    for key in all_keys:\n        if not obj.exists(key):\n            value = defaults.get(key, default_settings_values.get(key))\n            obj.set(key, value)\n\n    # start dotenv to get default env vars from there\n    # check overrides in env vars\n    if obj.get(\"load_dotenv\") is True:\n        default_settings.start_dotenv(obj)\n\n    # Deal with cases where a custom ENV_SWITCHER_IS_PROVIDED\n    # Example: Flask and Django Extensions\n    env_switcher = defaults.get(\n        \"ENV_SWITCHER_FOR_DYNACONF\", \"ENV_FOR_DYNACONF\"\n    )\n\n    for key in all_keys:\n        if key not in default_settings_values.keys():\n            continue\n\n        env_value = obj.get_environ(\n            env_switcher if key == \"ENV_FOR_DYNACONF\" else key,\n            default=\"_not_found\",\n        )\n\n        if env_value != \"_not_found\":\n            obj.set(key, env_value, tomlfy=True)\n\n\ndef settings_loader(\n    obj, settings_module=None, env=None, silent=True, key=None, filename=None\n):\n    \"\"\"Loads from defined settings module\n\n    :param obj: A dynaconf instance\n    :param settings_module: A path or a list of paths e.g settings.toml\n    :param env: Env to look for data defaults: development\n    :param silent: Boolean to raise loading errors\n    :param key: Load a single key if provided\n    :param filename: optional filename to override the settings_module\n    \"\"\"\n    if filename is None:\n        settings_module = settings_module or obj.settings_module\n        if not settings_module:  # pragma: no cover\n            return\n        files = ensure_a_list(settings_module)\n    else:\n        files = ensure_a_list(filename)\n\n    files.extend(ensure_a_list(obj.get(\"SECRETS_FOR_DYNACONF\", None)))\n\n    found_files = []\n    modules_names = []\n    for item in files:\n        item = str(item)  # Ensure str in case of LocalPath/Path is passed.\n        if item.endswith(ct.ALL_EXTENSIONS + (\".py\",)):\n            p_root = obj._root_path or (\n                os.path.dirname(found_files[0]) if found_files else None\n            )\n            found = obj.find_file(item, project_root=p_root)\n            if found:\n                found_files.append(found)\n        else:\n            # a bare python module name w/o extension\n            modules_names.append(item)\n\n    enabled_core_loaders = obj.get(\"CORE_LOADERS_FOR_DYNACONF\")\n\n    # add `.local.` to found_files list to search for local files.\n    found_files.extend(\n        [\n            get_local_filename(item)\n            for item in found_files\n            if \".local.\" not in str(item)\n        ]\n    )\n\n    for mod_file in modules_names + found_files:\n        # can be set to multiple files settings.py,settings.yaml,...\n\n        # Cascade all loaders\n        loaders = [\n            {\"ext\": ct.YAML_EXTENSIONS, \"name\": \"YAML\", \"loader\": yaml_loader},\n            {\"ext\": ct.TOML_EXTENSIONS, \"name\": \"TOML\", \"loader\": toml_loader},\n            {\"ext\": ct.INI_EXTENSIONS, \"name\": \"INI\", \"loader\": ini_loader},\n            {\"ext\": ct.JSON_EXTENSIONS, \"name\": \"JSON\", \"loader\": json_loader},\n        ]\n\n        for loader in loaders:\n            if loader[\"name\"] not in enabled_core_loaders:\n                continue\n\n            if mod_file.endswith(loader[\"ext\"]):\n                loader[\"loader\"].load(\n                    obj, filename=mod_file, env=env, silent=silent, key=key\n                )\n                continue\n\n        if mod_file.endswith(ct.ALL_EXTENSIONS):\n            continue\n\n        if \"PY\" not in enabled_core_loaders:\n            # pyloader is disabled\n            continue\n\n        # must be Python file or module\n        # load from default defined module settings.py or .secrets.py if exists\n        py_loader.load(obj, mod_file, key=key)\n\n        # load from the current env e.g: development_settings.py\n        env = env or obj.current_env\n        if mod_file.endswith(\".py\"):\n            if \".secrets.py\" == mod_file:\n                tmpl = \".{0}_{1}{2}\"\n                mod_file = \"secrets.py\"\n            else:\n                tmpl = \"{0}_{1}{2}\"\n\n            dirname = os.path.dirname(mod_file)\n            filename, extension = os.path.splitext(os.path.basename(mod_file))\n            new_filename = tmpl.format(env.lower(), filename, extension)\n            env_mod_file = os.path.join(dirname, new_filename)\n            global_filename = tmpl.format(\"global\", filename, extension)\n            global_mod_file = os.path.join(dirname, global_filename)\n        else:\n            env_mod_file = f\"{env.lower()}_{mod_file}\"\n            global_mod_file = f\"global_{mod_file}\"\n\n        py_loader.load(\n            obj,\n            env_mod_file,\n            identifier=f\"py_{env.upper()}\",\n            silent=True,\n            key=key,\n        )\n\n        # load from global_settings.py\n        py_loader.load(\n            obj, global_mod_file, identifier=\"py_global\", silent=True, key=key\n        )\n\n\ndef enable_external_loaders(obj):\n    \"\"\"Enable external service loaders like `VAULT_` and `REDIS_`\n    looks forenv variables like `REDIS_ENABLED_FOR_DYNACONF`\n    \"\"\"\n    for name, loader in ct.EXTERNAL_LOADERS.items():\n        enabled = getattr(obj, f\"{name.upper()}_ENABLED_FOR_DYNACONF\", False)\n        if (\n            enabled\n            and enabled not in false_values\n            and loader not in obj.LOADERS_FOR_DYNACONF\n        ):  # noqa\n            obj.LOADERS_FOR_DYNACONF.insert(0, loader)\n\n\ndef write(filename, data, env=None):\n    \"\"\"Writes `data` to `filename` infers format by file extension.\"\"\"\n    loader_name = f\"{filename.rpartition('.')[-1]}_loader\"\n    loader = globals().get(loader_name)\n    if not loader:\n        raise IOError(f\"{loader_name} cannot be found.\")\n\n    data = DynaBox(data, box_settings={}).to_dict()\n    if loader is not py_loader and env and env not in data:\n        data = {env: data}\n\n    loader.write(filename, data, merge=False)\n", "path": "dynaconf/loaders/__init__.py"}], "after_files": [{"content": "import os\n\nfrom dynaconf import constants as ct\nfrom dynaconf import default_settings\nfrom dynaconf.loaders import ini_loader\nfrom dynaconf.loaders import json_loader\nfrom dynaconf.loaders import py_loader\nfrom dynaconf.loaders import toml_loader\nfrom dynaconf.loaders import yaml_loader\nfrom dynaconf.utils import deduplicate\nfrom dynaconf.utils import ensure_a_list\nfrom dynaconf.utils.boxing import DynaBox\nfrom dynaconf.utils.files import get_local_filename\nfrom dynaconf.utils.parse_conf import false_values\n\n\ndef default_loader(obj, defaults=None):\n    \"\"\"Loads default settings and check if there are overridings\n    exported as environment variables\"\"\"\n    defaults = defaults or {}\n    default_settings_values = {\n        key: value\n        for key, value in default_settings.__dict__.items()  # noqa\n        if key.isupper()\n    }\n\n    all_keys = deduplicate(\n        list(defaults.keys()) + list(default_settings_values.keys())\n    )\n\n    for key in all_keys:\n        if not obj.exists(key):\n            value = defaults.get(key, default_settings_values.get(key))\n            obj.set(key, value)\n\n    # start dotenv to get default env vars from there\n    # check overrides in env vars\n    if obj.get(\"load_dotenv\") is True:\n        default_settings.start_dotenv(obj)\n\n    # Deal with cases where a custom ENV_SWITCHER_IS_PROVIDED\n    # Example: Flask and Django Extensions\n    env_switcher = defaults.get(\n        \"ENV_SWITCHER_FOR_DYNACONF\", \"ENV_FOR_DYNACONF\"\n    )\n\n    for key in all_keys:\n        if key not in default_settings_values.keys():\n            continue\n\n        env_value = obj.get_environ(\n            env_switcher if key == \"ENV_FOR_DYNACONF\" else key,\n            default=\"_not_found\",\n        )\n\n        if env_value != \"_not_found\":\n            obj.set(key, env_value, tomlfy=True)\n\n\ndef settings_loader(\n    obj, settings_module=None, env=None, silent=True, key=None, filename=None\n):\n    \"\"\"Loads from defined settings module\n\n    :param obj: A dynaconf instance\n    :param settings_module: A path or a list of paths e.g settings.toml\n    :param env: Env to look for data defaults: development\n    :param silent: Boolean to raise loading errors\n    :param key: Load a single key if provided\n    :param filename: optional filename to override the settings_module\n    \"\"\"\n    if filename is None:\n        settings_module = settings_module or obj.settings_module\n        if not settings_module:  # pragma: no cover\n            return\n        files = ensure_a_list(settings_module)\n    else:\n        files = ensure_a_list(filename)\n\n    files.extend(ensure_a_list(obj.get(\"SECRETS_FOR_DYNACONF\", None)))\n\n    found_files = []\n    modules_names = []\n    for item in files:\n        item = str(item)  # Ensure str in case of LocalPath/Path is passed.\n        if item.endswith(ct.ALL_EXTENSIONS + (\".py\",)):\n            p_root = obj._root_path or (\n                os.path.dirname(found_files[0]) if found_files else None\n            )\n            found = obj.find_file(item, project_root=p_root)\n            if found:\n                found_files.append(found)\n        else:\n            # a bare python module name w/o extension\n            modules_names.append(item)\n\n    enabled_core_loaders = [\n        item.upper() for item in obj.get(\"CORE_LOADERS_FOR_DYNACONF\") or []\n    ]\n\n    # add `.local.` to found_files list to search for local files.\n    found_files.extend(\n        [\n            get_local_filename(item)\n            for item in found_files\n            if \".local.\" not in str(item)\n        ]\n    )\n\n    for mod_file in modules_names + found_files:\n        # can be set to multiple files settings.py,settings.yaml,...\n\n        # Cascade all loaders\n        loaders = [\n            {\"ext\": ct.YAML_EXTENSIONS, \"name\": \"YAML\", \"loader\": yaml_loader},\n            {\"ext\": ct.TOML_EXTENSIONS, \"name\": \"TOML\", \"loader\": toml_loader},\n            {\"ext\": ct.INI_EXTENSIONS, \"name\": \"INI\", \"loader\": ini_loader},\n            {\"ext\": ct.JSON_EXTENSIONS, \"name\": \"JSON\", \"loader\": json_loader},\n        ]\n\n        for loader in loaders:\n            if loader[\"name\"] not in enabled_core_loaders:\n                continue\n\n            if mod_file.endswith(loader[\"ext\"]):\n                loader[\"loader\"].load(\n                    obj, filename=mod_file, env=env, silent=silent, key=key\n                )\n                continue\n\n        if mod_file.endswith(ct.ALL_EXTENSIONS):\n            continue\n\n        if \"PY\" not in enabled_core_loaders:\n            # pyloader is disabled\n            continue\n\n        # must be Python file or module\n        # load from default defined module settings.py or .secrets.py if exists\n        py_loader.load(obj, mod_file, key=key)\n\n        # load from the current env e.g: development_settings.py\n        env = env or obj.current_env\n        if mod_file.endswith(\".py\"):\n            if \".secrets.py\" == mod_file:\n                tmpl = \".{0}_{1}{2}\"\n                mod_file = \"secrets.py\"\n            else:\n                tmpl = \"{0}_{1}{2}\"\n\n            dirname = os.path.dirname(mod_file)\n            filename, extension = os.path.splitext(os.path.basename(mod_file))\n            new_filename = tmpl.format(env.lower(), filename, extension)\n            env_mod_file = os.path.join(dirname, new_filename)\n            global_filename = tmpl.format(\"global\", filename, extension)\n            global_mod_file = os.path.join(dirname, global_filename)\n        else:\n            env_mod_file = f\"{env.lower()}_{mod_file}\"\n            global_mod_file = f\"global_{mod_file}\"\n\n        py_loader.load(\n            obj,\n            env_mod_file,\n            identifier=f\"py_{env.upper()}\",\n            silent=True,\n            key=key,\n        )\n\n        # load from global_settings.py\n        py_loader.load(\n            obj, global_mod_file, identifier=\"py_global\", silent=True, key=key\n        )\n\n\ndef enable_external_loaders(obj):\n    \"\"\"Enable external service loaders like `VAULT_` and `REDIS_`\n    looks forenv variables like `REDIS_ENABLED_FOR_DYNACONF`\n    \"\"\"\n    for name, loader in ct.EXTERNAL_LOADERS.items():\n        enabled = getattr(obj, f\"{name.upper()}_ENABLED_FOR_DYNACONF\", False)\n        if (\n            enabled\n            and enabled not in false_values\n            and loader not in obj.LOADERS_FOR_DYNACONF\n        ):  # noqa\n            obj.LOADERS_FOR_DYNACONF.insert(0, loader)\n\n\ndef write(filename, data, env=None):\n    \"\"\"Writes `data` to `filename` infers format by file extension.\"\"\"\n    loader_name = f\"{filename.rpartition('.')[-1]}_loader\"\n    loader = globals().get(loader_name)\n    if not loader:\n        raise IOError(f\"{loader_name} cannot be found.\")\n\n    data = DynaBox(data, box_settings={}).to_dict()\n    if loader is not py_loader and env and env not in data:\n        data = {env: data}\n\n    loader.write(filename, data, merge=False)\n", "path": "dynaconf/loaders/__init__.py"}]}