fs
Python's filesystem abstraction layer
Decision gist · record as of 2026-08-14
Yes, if you need to write storage-agnostic code or work with multiple filesystem backends. The API is well-established and the package is stable (Production/Stable classifier). However, note that maintenance is aging—the last release was 2022-05-02—so if you rely on active development or rapid bug fixes, evaluate whether that matters for your use case. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel.
- Maintenance is aging—last release was 2022-05-02 and the repository has not been updated since 2025-05-17, though it remains unarchived and carries 2105 stars.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, including in commercial projects.
last release 2022-05-02 (1565 days) · last repo commit 2025-05-17 · 2,105 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,815,225 downloads/mo, #2,491 on PyPI
Alternatives
Verify before relying
from fs import open_fs
# Open a local directory
local_fs = open_fs('~/projects')
# Or open a zip file with the same API
zip_fs = open_fs('zip://archive.zip')
# List files
for path in local_fs.walk.files():
print(path)- Whether the aging maintenance status (last release May 2022) affects stability or compatibility with current Python versions.
- Whether the six and enum34 backport dependencies are still necessary or if they can be dropped for modern Python targets.
What it is and what it does
PyFilesystem2 is a filesystem abstraction layer that treats entire filesystems the way Python's file objects treat individual files. Instead of writing code that works only with the OS filesystem using os.walk and open, you write code against an FS object that can transparently work with local directories, zip archives, FTP servers, or other storage backends without any changes to your logic.
The package provides a consistent API across all backends—you open an FS object with a URI-like string (e.g., 'zip://archive.zip' or 'ftp://server/path'), then use methods like walk.files(), open(), and listdir() the same way regardless of where the files actually live. This decouples your application code from storage implementation details and makes it easy to swap backends or test with mock filesystems.
Use it for
- Write file-processing code once and run it against local directories, zip files, or remote FTP servers without rewriting the logic.
- Build tools that need to work with multiple storage backends (e.g., a deployment tool that can read from local, S3, or SFTP).
- Simplify testing by using in-memory or temporary filesystems instead of touching disk during unit tests.
- Recursively walk and process files across different storage types using a single walk API.
- Create filesystem-agnostic libraries or plugins that users can point at any backend they support.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to write storage-agnostic code or work with multiple filesystem backends.
The API is well-established and the package is stable (Production/Stable classifier). However, note that maintenance is aging—the last release was 2022-05-02—so if you rely on active development or rapid bug fixes, evaluate whether that matters for your use case. No known vulnerabilities.
Install
fs on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance is aging—last release was 2022-05-02 and the repository has not been updated since 2025-05-17, though it remains unarchived and carries 2105 stars.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, including in commercial projects.
Quickstart
from fs import open_fs
# Open a local directory
local_fs = open_fs('~/projects')
# Or open a zip file with the same API
zip_fs = open_fs('zip://archive.zip')
# List files
for path in local_fs.walk.files():
print(path)
Verify before relying
- Whether the aging maintenance status (last release May 2022) affects stability or compatibility with current Python versions.
- Whether the six and enum34 backport dependencies are still necessary or if they can be dropped for modern Python targets.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesappdirssetuptoolssixbackports.osenum34typing |
| Maintenance | Aging 1,565 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,815,225 / month, #2,491 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.10Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: System :: FilesystemsTyping :: Typed |
Evidence: fs-2.4.16-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “filesystem abstraction layer”
- fsProvides a unified filesystem abstraction layer that lets you work…
- dvc-objectsProvides filesystem and object-database abstractions for working with…
- iopathiopath provides a unified interface for reading and writing data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Filesystems packages
Watches file system changes and triggers callbacks or process restarts when files are modified, with both synchronous and asynchronous APIs.
Install it if you need file system monitoring for development or production workflows.
Watchdog monitors file system events across Linux, macOS, Windows, and BSD, providing a Python API and command-line utilities to detect file and directory changes in real time.
Install it if you need to monitor file system events; the medium install friction is a one-time cost for reliable, platform-native behavior.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
Infers file type and MIME type by examining magic number signatures in files or byte buffers, with no external dependencies.
However, the last release was 2022-11-02 with no recent commits, so it may not support the newest file formats or receive bug fixes promptly.
Sanitize and validate filenames and file paths by removing or replacing invalid characters, reserved names, and unprintable characters across multiple platforms (Linux, Windows, macOS, POSIX, and universal).
Install it if you need reliable filename or path validation across platforms; the low friction and clear API make it a straightforward addition to any project…
Provides object-oriented filesystem path handling as a backport for Python versions before 3.4, when pathlib became part of the standard library.
See also fs.sshfs · iopath · littlefs-python · python-fsutil · fs-s3fs · morefs · universal-pathlib · gdrive-fsspec · sshfs · fusepy