pathy
pathlib.Path subclasses for local and cloud bucket storage
What it is and what it does
Pathy is a pathlib subclass that lets you treat cloud buckets (Google Cloud Storage, S3, Azure) as if they were local filesystems. Instead of learning separate APIs for each cloud provider, you write code using familiar Path operations like `.exists()`, `.write_text()`, `.glob()`, and `.mkdir()`, and Pathy translates them to the underlying bucket API.
The package is designed for developers who want to prototype locally using the filesystem, then deploy to cloud storage without rewriting code. It handles credential setup per provider, supports both local and cloud paths through a fluid interface, and includes a CLI tool. Since it's built on pathlib-abc and smart-open, it integrates cleanly with Python's standard path ecosystem.
Use it for:
- Develop machine learning pipelines locally with filesystem paths, deploy to S3 or GCS without code changes
- Build data processing scripts that work uniformly across local, S3, GCS, and Azure blob storage
- Migrate legacy code from local file I/O to cloud storage by swapping path prefixes
- Write cloud-agnostic tools that users can point at any supported bucket provider
- Simplify blob enumeration and metadata queries with glob patterns and stat operations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pathy provides a pathlib-compatible interface for working with cloud bucket storage (Google Cloud Storage, Amazon S3, Azure) and local filesystems through a unified Path-like API.
Yes. Pathy is actively maintained, has no known vulnerabilities, and solves a real friction point—unifying cloud storage APIs under a familiar interface. Install it if you work across multiple cloud providers or want to defer cloud decisions during development. The Apache-2.0 license is unrestrictive. Only caveat: pre-v1.0 status means minor version bumps can break the API, so pin your version range if stability is critical.
Install
pathy on PyPI
pip
pip install pathyuv
uv add pathypoetry
poetry add pathyInstalling pathy
Before you install
Low friction installation with a pure-Python wheel. Maintenance is active with recent releases and no known vulnerabilities. Runtime dependencies are minimal (pathlib-abc and smart-open), both lightweight utilities.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use in commercial and private projects with minimal restrictions—just retain the license notice.
Quickstart
# Install for Google Cloud Storage
pip install pathy[gcs]
from pathy import Pathy, use_fs
# Use local filesystem during development
use_fs()
# Create and write to a cloud path
greeting = Pathy("gs://my_bucket/greeting.txt")
greeting.write_text("Hello World!")
assert greeting.exists()
Requires Python 3.10 or later. Cloud operations require appropriate credentials (JSON file for GCS/S3, connection string for Azure) configured via set_client_params().
Verify before relying
- Performance characteristics when working with large numbers of blobs or very large files
- Caching behavior details and cache invalidation strategy
- Exact feature parity with pathlib.Path across all methods
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pathlib-abc, smart-open |
| Maintenance | actively maintained — 125 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,018,352/month — #3,359 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pathy-0.14.2-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cloudpathlibProvides pathlib-style classes for reading,…
permissive · top 1,000 on PyPI
blobfileProvides a unified Python file interface for…
permissive · top 5,000 on PyPI
pathlib-abcProvides abstract base classes for implementing…
permissive · top 1,000 on PyPI
provide-dirCreates a directory and all its parent…
permissive · top 15,000 on PyPI
s3fss3fs provides a Python filesystem interface to…
permissive · top 100 on PyPI
s3pathlibs3pathlib provides a pathlib-like…
permissive · top 5,000 on PyPI
minioProvides high-level Python APIs to connect to…
permissive · top 5,000 on PyPI
s3pathS3Path provides a pathlib-like interface for…
permissive · top 5,000 on PyPI
path.pyProvides Path objects that wrap filesystem…
permissive · top 15,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI