Native python integration for fsspec backends
This library wraps an fsspec filesystem so that files and folders inside it can be imported in Python.
from fsspec import open
open(f"python::s3://my-python-bucket")
import my_bucket_lib # s3://my-python-bucket/my_bucket_lib.pyIn addition to the python:: chained protocol url, this library exposes a handful of functions and monkey patches for connecting Python internal mechanisms to an fsspec-based filesystem.
- install_importer: install an
install_importer(fs: Union[str, AbstractFileSystem], **kwargs): install an fsspec url/args or filesystem instance as an importeruninstall_importer(fs: Union[str, AbstractFileSystem] = ""): uninstall an fsspec url or filesystem instance, or if nothing provided remove the last-installed oneinstall_open_hook(fsspec: str, **fsspec_args): monkeypatch Python'sopenbuiltin to run off anfsspecfilesystemuninstall_open_hook(): remove the monkeypatchedopen
Coming soon:
- Monkey patching for
os/os.path/pathlib
Note
This library was generated using copier from the Base Python Project Template repository.