--- id: pathlib3x version: "2.0.3" license: MIT license_treatment: permissive maintenance: active --- # pathlib3x — backport of pathlib 3.10 to python 3.6, 3.7, 3.8, 3.9 with a few extensions License: permissive · Maintenance: active · Downloads: 105.1K/mo ## What it is and what it does pathlib3x is a backport of Python 3.11's pathlib module to Python 3.8, 3.9, and 3.10, allowing you to use newer pathlib features (like the missing_ok parameter on unlink) on older Python versions without try-except boilerplate. It also adds convenience wrappers around shutil functions (copy, copy2, copyfile, rmtree, copytree) as methods on Path objects, and introduces new methods like append_suffix and replace_parts for path manipulation. The package is fully typed (PEP 561) and actively maintained. It depends on click and cli-exit-tools at runtime. Use it when you need to support older Python versions but want to write modern pathlib code, or when you want shutil operations available as Path methods for cleaner syntax. Use it for: - Use modern pathlib features (missing_ok, etc.) in codebases that must support Python 3.8–3.10. - Copy or move files using Path.copy() and Path.copy2() instead of importing shutil separately. - Manipulate path strings with append_suffix() to add extensions without replacing existing ones. - Replace path components with replace_parts() when copying directory trees to new locations. - Check if an object is a Path instance across mixed pathlib and pathlib3x code using is_path_instance(). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Backport of Python 3.11 pathlib to Python 3.8+ with extensions like shutil wrappers (copy, rmtree, copytree) and new methods (append_suffix, replace_parts). Yes. Low install friction, permissive license, no known vulnerabilities, and active maintenance make it a safe choice. Install if you need modern pathlib on Python 3.8–3.10 or want shutil operations as Path methods; skip if you target only Python 3.11+. ## Install pip install pathlib3x uv add pathlib3x poetry add pathlib3x ## Installing pathlib3x Before you install: Low install friction with only two runtime dependencies (click, cli-exit-tools). Actively maintained as of 2026-07-21 with production-stable status. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install pathlib3x import pathlib3x as pathlib my_file = pathlib.Path('/etc/hosts') my_file.unlink(missing_ok=True) # works on Python 3.8+ to_file = pathlib.Path('/tmp/backup') my_file.copy(to_file) Requires Python 3.8.0 or newer; package is a backport and does not add features to Python 3.11+. Verify before relying: - Whether the package's own extensions (append_suffix, replace_parts, shutil wrappers) are tested to the same coverage standard as the backported pathlib methods. - Performance characteristics compared to standard pathlib on Python 3.11+ where both are available. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 105.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pathlib backport older python, path manipulation 3.8 3.9 3.10, file operations pathlib extensions, shutil wrapper path methods, cross-version pathlib compatibility, path copy move delete, pathlib missing_ok unlink, backport, file-operations, pathlib-extensions [View on SkillFed](https://skillfed.io/packages/pathlib3x) · [View on PyPI](https://pypi.org/project/pathlib3x/)