PyFilesystem2
lastmod 2026-11-10created 2025-04-252 edits
PyFilesystem2 (package name fs) is a file system abstraction layer for Python that handles many kinds of storage through the same interface. Local disk, memory, ZIP and TAR archives, FTP, and, through extension packages, cloud storage such as S3 can all be opened as FS objects and manipulated with the same open, listdir, and copy methods, so code doesn't need to change when the storage location changes. It is also used in tests to replace disk access with an in-memory file system.
Python's Filesystem abstraction layer
See also
- python
- smart_open - Utils for streaming large files (S3, HDFS, gzip, bz2...)