project_config.tree module
File system tree API.
- project_config.tree.cache_file(fpath: str, serializers: Optional[list[str]] = None, forbid_serializers: Optional[Iterable[str]] = None, ignore_serialization_errors: bool = False) None [source]
Cache the file content and its serialized version.
If the file is local, the cache key is the file path, its last modification time and root directory name. If the file is remote, the cache key is the file URL.
- Parameters:
fpath (str) – The file path or URL.
serializers (Iterable[str], optional) – The serializers to use.
forbid_serializers (Iterable[str], optional) – The serializers to forbid. Only makes sense for serializers guessed for the file.
ignore_serialization_errors (bool, optional) – If True, ignore serialization errors.
- project_config.tree.cached_local_file(fpath: str, serializer: Optional[str] = None) Any [source]
Get the cached file content.