def _root_path(self):
        """ROOT_PATH_FOR_DYNACONF or the path of first loaded file or '.'"""

        if self.ROOT_PATH_FOR_DYNACONF is not None:
            return self.ROOT_PATH_FOR_DYNACONF

        if self._loaded_files:  # called once
            root_path = os.path.dirname(self._loaded_files[0])
            self.set(
                "ROOT_PATH_FOR_DYNACONF",
                root_path,
                loader_identifier="_root_path",
            )
            return root_path
ROOT_PATH_FOR_DYNACONF or the path of first loaded file or '.'
dynaconf/base.py