Skip to content

1kbgz/fsspec-python

Repository files navigation

fsspec-python

Native python integration for fsspec backends

Build Status codecov License PyPI

Overview

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.py

Usage

In 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(fsspec: str, **fsspec_args: str): install an fsspec url/args as an importer
  • uninstall_importer(fsspec: str = ""): uninstall an fsspec url, or if nothing provided remove the last-installed one
  • install_open_hook(fsspec: str, **fsspec_args): monkeypatch Python's open builtin to run off an fsspec filesystem
  • uninstall_open_hook(): remove the monkeypatched open

Coming soon:

  • Monkey patching for os / os.path / pathlib

Note

This library was generated using copier from the Base Python Project Template repository.

About

Native python integration for fsspec backends

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •  

Languages