Ejemplo n.º 1
0
    def __init__(self, uri, config_type, source=None, version=None, local=True, extra_sys_path=None):
        self.uri = uri
        self.version = version
        self.path = uris.to_fs_path(uri)
        self.filename = os.path.basename(self.path)

        self._local = local
        self._source = source
        self._extra_sys_path = extra_sys_path or []
        self._config_simple = {}
        self._config_roundtrip = {}
        self._last_config_simple = {}
        self._last_config_roundtrip = {}
        self._loader_roundtrip = YamlRoundtrip()
        self._loader_simple = YamlInterface()
        self.config_type = config_type
Ejemplo n.º 2
0
    def init(cls):
        """Initialise file interfaces."""
        cls.file_interfaces[".yaml"] = YamlInterface()
        cls.file_interfaces[".bin"] = PickleInterface()

        FileManager.initialized = True