https://github.com/1kbgz/fsspec-python
Native python integration for fsspec backends
https://github.com/1kbgz/fsspec-python
filesystem fsspec python
Last synced: 15 days ago
JSON representation
Native python integration for fsspec backends
- Host: GitHub
- URL: https://github.com/1kbgz/fsspec-python
- Owner: 1kbgz
- License: apache-2.0
- Created: 2025-10-05T18:40:16.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T18:15:17.000Z (about 2 months ago)
- Last Synced: 2026-04-19T20:22:08.410Z (about 2 months ago)
- Topics: filesystem, fsspec, python
- Language: Python
- Homepage:
- Size: 69.3 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# fsspec-python
Native python integration for fsspec backends
[](https://github.com/1kbgz/fsspec-python/actions/workflows/build.yaml)
[](https://codecov.io/gh/1kbgz/fsspec-python)
[](https://github.com/1kbgz/fsspec-python)
[](https://pypi.python.org/pypi/fsspec-python)
## Overview
This library wraps an [fsspec filesystem](https://github.com/fsspec/filesystem_spec) so that files and folders inside it can be imported in Python.
```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](https://filesystem-spec.readthedocs.io/en/latest/features.html#url-chaining) 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 importer
- `uninstall_importer(fs: Union[str, AbstractFileSystem] = "")`: uninstall an fsspec url or filesystem instance, 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](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).