fleche.config ============= .. py:module:: fleche.config .. autoapi-nested-parse:: Configuration system for fleche. Example cache.toml: [default] cache = "mycache" metadata = ["Runtime", "CallInfo"] [mycache] values.type = "Memory" calls.type = "Memory" [transient] values.type = "CloudpickleFile" values.root = ".fleche/values" calls.type = "CloudpickleFile" calls.root = ".fleche/calls" [global] values.type = "BagOfHoldingH5File" values.root = "~/.fleche/values" calls.type = "CloudpickleFile" calls.root = "~/.fleche/calls" Attributes ---------- .. autoapisummary:: fleche.config.logger fleche.config._live_caches Functions --------- .. autoapisummary:: fleche.config._load_config fleche.config._get_config_path fleche.config.load_default_metadata fleche.config._get_storage fleche.config._create_cache fleche.config.load_cache_config Module Contents --------------- .. py:data:: logger .. py:data:: _live_caches :type: dict[str, fleche.caches.Cache] .. py:function:: _load_config(path: pathlib.Path) -> dict[str, Any] .. py:function:: _get_config_path() -> pathlib.Path | None .. py:function:: load_default_metadata() Load the default metadata from the configuration file. .. py:function:: _get_storage(config: dict[str, Any]) -> fleche.storage.Storage .. py:function:: _create_cache(cache_config: dict[str, Any]) -> fleche.caches.Cache .. py:function:: load_cache_config(name: str | None = None) -> fleche.caches.Cache Load a cache from the configuration file. If name is None, the default cache is loaded. The names 'memory' and 'void' are special-cased to return a transient in-memory cache and a no-op cache respectively. Note: The `Tags` metadata cannot be configured from the config file.