pathlib
Object-oriented filesystem paths
Decision gist · record as of 2026-08-14
No. For Python 3.4+, use the built-in pathlib from the standard library. For Python 2.7 or 3.2–3.3, the description explicitly recommends pathlib2 instead, which is maintained. This backport is abandoned and receives no updates or security attention.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- This is a backport for Python 2.6, 2.7, and Python 3.2–3.3.
- For Python 3.4+, use the built-in pathlib from the standard library instead.
- Low install friction with no runtime dependencies.
License · maintenance · safety
MIT License (permissive) — MIT License (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
last release 2014-09-03 (4363 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,510,315 downloads/mo, #1,896 on PyPI
Alternatives
Verify before relying
from pathlib import Path
p = Path('/etc')
q = p / 'init.d' / 'reboot'
print(q.exists())
print(q.is_dir())- Whether this backport remains compatible with modern Python tooling and dependency resolvers despite its abandoned status.
- Whether pathlib2 is a drop-in replacement or requires code changes for projects currently using this package.
What it is and what it does
This package provides an object-oriented interface to filesystem paths, wrapping the cumbersome os and os.path functions into a cleaner API. It offers Path and PurePath classes that support operators (like `/` for path joining), method calls (like `.exists()`, `.is_dir()`, `.glob()`), and platform-aware semantics (e.g., case-insensitive path comparison on Windows). The package was originally a backport of Python 3.4's standard library pathlib module, designed to make path handling available on Python 2.6, 2.7, and early Python 3 versions.
Since Python 3.4, pathlib is built into the standard library, making this backport obsolete for any modern Python environment. The package is no longer maintained and has not been updated since 2014. The description itself recommends pathlib2 as the maintained alternative for users on older Python versions who need an actively supported backport.
Use it for
- Handling filesystem paths in Python 2.7 or 3.2–3.3 codebases that predate standard library pathlib.
- Replacing string-based path manipulation (os.path.join, os.path.exists) with a cleaner object-oriented API in legacy projects.
- Cross-platform path operations where Windows and POSIX semantics differ (e.g., case sensitivity, slash direction).
- Globbing and directory traversal using methods like .glob() and .rglob() instead of os.walk().
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
For Python 3.4+, use the built-in pathlib from the standard library. For Python 2.7 or 3.2–3.3, the description explicitly recommends pathlib2 instead, which is maintained. This backport is abandoned and receives no updates or security attention.
Install
pathlib on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned and has not been maintained since 2014. For Python 3.4 and later, pathlib is built into the standard library; for earlier versions, the description recommends pathlib2 as the maintained alternative.
This is a backport for Python 2.6, 2.7, and Python 3.2–3.3. For Python 3.4+, use the built-in pathlib from the standard library instead.
License in practice
MIT License (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from pathlib import Path
p = Path('/etc')
q = p / 'init.d' / 'reboot'
print(q.exists())
print(q.is_dir())
Verify before relying
- Whether this backport remains compatible with modern Python tooling and dependency resolvers despite its abandoned status.
- Whether pathlib2 is a drop-in replacement or requires code changes for projects currently using this package.
Package facts
| License | MIT License permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 4,363 days since the last release |
| First released | |
| Downloads | 6,510,315 / month, #1,896 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Topic :: Software Development :: LibrariesTopic :: System :: Filesystems |
Evidence: pathlib-1.0.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “path manipulation”
- pathlibProvides object-oriented filesystem path handling as a backport for…
- pathlib-mateExtends Python's pathlib.Path with convenience attributes and methods…
- path.pyProvides Path objects that wrap filesystem operations as methods,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pathlib-abc · pathlib2 · py · path.py · Unipath · path · artifactory · pathlib3x · zipp · pathtools