scaffold.data.fs ================ .. py:module:: scaffold.data.fs Functions --------- .. autoapisummary:: scaffold.data.fs.get_fs_from_url scaffold.data.fs.get_protocol Module Contents --------------- .. py:function:: get_fs_from_url(url: scaffold.data.constants.URL, **storage_options) -> scaffold.data.constants.FILESYSTEM Get filesystem suitable for a url. Only the protocol part of the url is used, thus there is no need to call this method several times for different stores accessed with the same protocol. Should be called outside of store initialization to allow buffering from the same container among different stores or shards. The protocol can be overriden via the `storage_options`. This is important if people want to use the fsspec caching functionality, which requires the protocol to be, e.g., `simplecache`. .. py:function:: get_protocol(url: str) -> str Get the protocol from a url, return empty string if local