Pathlib defines an API which has many implementation. The official “standard” one is the one in the standard library, but many other implementations exists which add s3
, gcs
, zipfile
, git
,…
Like:
- GitHub - fsspec/universal_pathlib: pathlib api extended to use fsspec backends
- zipfile — Work with ZIP archives — Python 3.12.6 documentation
- Pathlib-like API — etils
- …
To maintain consistency across those libraries, it’s important pathlib API supports the use-cases of those implementations.
Also see: https://discuss.python.org/t/make-pathlib-extensible