Registry / data / morefs

morefs

JSON →
library0.2.2pypypi✓ verified 22d ago

morefs is a Python library offering a collection of self-contained filesystems built on top of `fsspec`. It currently provides `AsyncLocalFileSystem`, `DictFileSystem`, and `OverlayFileSystem` to extend `fsspec`'s capabilities for asynchronous local operations, in-memory dictionary-backed storage, and layered filesystem views, respectively. The library is actively maintained, with the current version being 0.2.2, and releases occur as needed to address compatibility or introduce new features.

pip install morefs
INSTALL
IMPORT
SIG · MOREFS
M
morefs
datapythonv0.2.2
Install
1.8s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncLocalFileSystem
from morefs import AsyncLocalFileSystem
from morefs import AsyncLocalFileSystem
DictFileSystem
from morefs import DictFileSystem
OverlayFileSystem
from morefs import OverlayFileSystem

Demonstrates the initialization and basic usage of `AsyncLocalFileSystem`, `DictFileSystem`, and `OverlayFileSystem`, including listing directories and reading file content.

from fsspec import filesystem from morefs.asyn_local import AsyncLocalFileSystem from morefs.dict import DictFileSystem from morefs.overlay import OverlayFileSystem import asyncio # AsyncLocalFileSystem async def run_asynclocal_example(): fs = filesystem("asynclocal") # or AsyncLocalFileSystem() # Using AsyncLocalFileSystem requires an async context print(f"AsyncLocalFileSystem ls '/': {await fs.ls('/')}") # DictFileSystem dict_fs = DictFileSystem({"foo": b"bar", "baz/qux": b"quux"}) print(f"DictFileSystem ls '/': {dict_fs.ls('/')}") print(f"DictFileSystem read 'foo': {dict_fs.read_bytes('foo')}") # OverlayFileSystem lower_fs = DictFileSystem({"foo": b"bar_lower", "common": b"lower_val"}) upper_fs = DictFileSystem({"baz": b"qux_upper", "common": b"upper_val"}) overlay_fs = OverlayFileSystem(lower_fs=lower_fs, upper_fs=upper_fs) print(f"OverlayFileSystem ls '/': {overlay_fs.ls('/')}") print(f"OverlayFileSystem read 'foo': {overlay_fs.read_bytes('foo')}") print(f"OverlayFileSystem read 'baz': {overlay_fs.read_bytes('baz')}") print(f"OverlayFileSystem read 'common' (upper overrides): {overlay_fs.read_bytes('common')}") # Run the async example asyncio.run(run_asynclocal_example())
Debug
Known issues
breakingVersions of morefs 0.2.1 and later require `fsspec>=2024.5.0` due to API changes in `fsspec`. Using an older version of `fsspec` may lead to runtime errors or unexpected behavior.
fix
Ensure `fsspec` is updated to version `2024.5.0` or newer: `pip install --upgrade fsspec`.
affects: 0.2.1+
gotchaThe `AsyncLocalFileSystem` underwent a significant internal refactor in version 0.1.0 to wrap `fsspec.LocalFileSystem`. While the public API aimed for compatibility, users relying on specific prior internal behaviors or direct imports from the pre-0.1.0 `asyncfs` module (now `asyn_local`) might experience subtle changes or broken imports.
fix
Verify that existing code using `AsyncLocalFileSystem` works as expected after upgrading to 0.1.0 or later. Update any direct `from morefs.asyncfs import ...` imports to `from morefs.asyn_local import ...`.
affects: <0.1.0 to 0.1.0+
gotchaAs `morefs` is currently in its 0.x.x version series, its API is still considered somewhat experimental and may undergo non-backward-compatible changes in minor releases. Users should pin exact versions in production environments.
fix
Pin `morefs` to an exact version in your `requirements.txt` or `pyproject.toml` (e.g., `morefs==0.2.2`) and thoroughly review changelogs before upgrading.
affects: All 0.x.x versions
Upgrade
Version history
0.2.2latest on PyPI · released Jul 8, 2024
Audit
Dependencies
fsspecrequiredCore dependency providing the filesystem abstraction, required for all filesystems.
aiohttprequiredRequired by `AsyncLocalFileSystem` for its asynchronous operations.
Agent activity
16 hits · last 30 days
node
14
Resources
morefs — pip install morefs · libregistry