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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibcpy 3.10–3.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.fixEnsure `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.fixVerify 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.fixPin `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.