# PyFilesystem/pyfilesystem2

Python's Filesystem abstraction layer

Repository: https://github.com/PyFilesystem/pyfilesystem2
Canonical: https://ross.abutalabs.com/products/pyfilesystem2
Homepage: https://www.pyfilesystem.org
Language: Python
License: MIT
License Family: permissive
Topics: filesystem, pyfilesystem, pyfilesystem2, python, ftp, tar, zip, filesystem-library
Last push: 2025-05-17T13:45:45+00:00

## Health v2 (maintenance only)
Score: 33/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 22, release rhythm 8, longevity 100
- inputs: {"age_days": 3610, "days_push": 473, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2107, forks 187 (observed 2026-08-28T04:06:13.982994+00:00)

## What it is
PyFilesystem2 is a Python library providing a unified abstraction layer over filesystems, letting code work identically on OS directories, zip archives, FTP servers, and more via FS objects. It offers a consistent API for walking, opening, copying, and manipulating files regardless of the underlying storage.

## Use cases
- write code that works on local files, zip archives, and ftp servers without changes
- count lines of python code recursively in a directory
- copy files between a local folder and a zip archive
- abstract filesystem access behind a single interface
- walk and filter files across different storage backends
- open a filesystem from a url like zip:// or ftp://

## When to choose
- you need storage-agnostic file operations in python
- your code must work across local disks, archives, and remote servers with one api
- you want a clean, well-documented filesystem abstraction layer

## When to avoid
- you only need simple local file io covered by pathlib or os
- you need async filesystem operations
- you need exotic backends not covered by pyfilesystem's openers or extensions

## Facets
- artifact type: library
- maturity: stable
- function: file-system
- domain: developer-tools, files
- platform: python, cross-platform
- tags: filesystem-abstraction, zip, ftp, tar, virtual-filesystem

## Member repositories
- PyFilesystem/pyfilesystem2 (main) score 33

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:13.982994+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:53:54.360680+00:00, confidence not recorded.
  - readme: https://github.com/PyFilesystem/pyfilesystem2 (fetched 2026-08-28T04:06:13.982994+00:00, sha a0da1062284d)
  - homepage: https://www.pyfilesystem.org (fetched 2026-08-29T10:34:06.164759+00:00, sha 44136fa355b3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
