--- id: path-py version: "12.5.0" license: unclear license_treatment: permissive maintenance: active --- # path.py — A module wrapper for os.path License: permissive · Maintenance: active · Downloads: 429.3K/mo ## What it is and what it does path.py wraps filesystem operations into a Path object that inherits from str, letting you call methods like chmod(), walk(), and glob() directly on path instances. Unlike pathlib, Path objects are strings themselves, so they pass directly to APIs that expect text paths without casting. The package provides convenience methods like rmtree() and remove_p() (remove if exists), plus properties like .permissions, all while maintaining a single unified Path class that works across operating systems. The package has been in active development since 2003 and aims to be a drop-in replacement for pathlib.Path where possible, while remaining faster to iterate than the standard library. It's suitable for scripts, system tools, and applications that need readable, object-oriented path manipulation without the friction of converting to strings for legacy APIs. Use it for: - Writing cleanup or file-management scripts where you want readable path operations and direct method calls like f.chmod(0o755). - Building tools that work with filesystem hierarchies and need to pass paths to APIs that don't support PEP 519 PathLike objects. - Creating subclasses of Path to add custom filesystem behavior without managing OS-specific variants. - Migrating from os.path code to an object-oriented style while keeping paths compatible with existing string-based APIs. - Temporary directory and file operations using TempDir and context managers for cleaner resource management. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Path objects that wrap filesystem operations as methods, letting you call chmod, walk, and glob directly on path instances rather than using os.path functions. Yes. path.py is stable, actively maintained, has no known vulnerabilities, and installs with minimal friction. It's worth installing if you prefer object-oriented path operations and need paths to work as strings in legacy APIs—a genuine advantage over pathlib. If you're already using pathlib and it meets your needs, there's no urgent reason to switch, but path.py is a solid alternative for new projects or codebases that value readability and string compatibility. ## Install pip install path-py uv add path-py poetry add path-py ## Installing path.py Before you install: Low friction: pure Python wheel, single lightweight dependency (path itself). Actively maintained with recent commits; marked Production/Stable since early releases. License in practice: MIT license (permissive): you may use, modify, and distribute freely with minimal restrictions, making it suitable for both open-source and proprietary projects. Quickstart: from path import Path d = Path("/home/user/bin") for f in d.files("*.py"): f.chmod(0o755) with Path("somewhere"): # working directory is now `somewhere` pass Requires Python 3.5 or later. Verify before relying: - Whether path.Path objects remain fully compatible with modern pathlib.Path APIs across all use cases. - Performance characteristics when handling large directory trees compared to pathlib or os.path. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 429.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags object-oriented filesystem paths, path manipulation library, file operations on path objects, os.path wrapper, pathlib alternative, chmod and glob on paths, filesystem path abstraction, filesystem-abstraction, path-manipulation [View on SkillFed](https://skillfed.io/packages/path-py) · [View on PyPI](https://pypi.org/project/path-py/)