cfitall.providers.filesystem.FilesystemProvider

class FilesystemProvider(path, prefix, provider_name='filesystem')

Bases: cfitall.providers.base.ConfigProviderBase

FilesystemProvider attempts to read json or yaml configuration files from disk.

Parameters
  • path (List[str]) – list of filesystem paths to search for config files

  • prefix (str) – base name of file to look for (e.g. f”{prefix}.yml”)

  • provider_name (str) – friendly name for the provider (“filesystem”)

Methods

update

Updates self._data from the contents of self.config_file.

Attributes

dict

Returns the configuration dictionary from self._data.

provider_name

each provider must provide a unique provider_name

path

list of filesystem locations to search for config files

prefix

namespace for locating files

property dict: dict

Returns the configuration dictionary from self._data.

Return type

dict

path: List[str]

list of filesystem locations to search for config files

prefix: str

namespace for locating files

update()

Updates self._data from the contents of self.config_file.

Return type

bool