skillfed

pathy

pathlib.Path subclasses for local and cloud bucket storage

pathy v0.14.2 2.0M downloads/30d#3,359 on PyPI176
Permissive license Apache-2.0 Active released

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 pathy

uv

uv add pathy

poetry

poetry add pathy

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

cloud storage path interfaces3 pathlib wrappergcs bucket file operationsunified cloud filesystem apiazure blob storage pathscloud agnostic file handlingbucket path abstraction
cloud-storagepathlib-compatiblemulti-provider

More Software Development packages