--- id: fs version: "2.4.16" license: MIT license_treatment: permissive maintenance: aging --- # fs — Python's filesystem abstraction layer License: permissive · Maintenance: aging · Downloads: 3.8M/mo ## 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 above — verify before relying. Provides a unified filesystem abstraction layer that lets you work with local directories, zip files, FTP servers, and other storage backends through a single consistent API. 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 pip install fs uv add fs poetry add fs ## Installing fs 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 3.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags filesystem abstraction layer, unified file interface, work with zip ftp local files, abstract filesystem api, storage backend abstraction, filesystem-agnostic code, virtual filesystem interface, filesystem-abstraction, storage-agnostic, multi-backend [View on SkillFed](https://skillfed.io/packages/fs) · [View on PyPI](https://pypi.org/project/fs/)