{"id":13502485,"url":"https://github.com/jaraco/path","last_synced_at":"2025-12-11T21:04:03.515Z","repository":{"id":3070315,"uuid":"4093296","full_name":"jaraco/path","owner":"jaraco","description":"Object-oriented file system path manipulation","archived":false,"fork":false,"pushed_at":"2024-06-11T14:35:33.000Z","size":1422,"stargazers_count":1088,"open_issues_count":7,"forks_count":146,"subscribers_count":38,"default_branch":"main","last_synced_at":"2024-06-13T08:47:06.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaraco.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"tidelift":"pypi/path"}},"created_at":"2012-04-21T02:59:29.000Z","updated_at":"2024-06-13T08:47:13.620Z","dependencies_parsed_at":"2023-07-05T20:02:34.199Z","dependency_job_id":"1de656c9-9472-4e7d-8dfd-6e0c4a88f151","html_url":"https://github.com/jaraco/path","commit_stats":{"total_commits":1050,"total_committers":54,"mean_commits":"19.444444444444443","dds":"0.13428571428571423","last_synced_commit":"d45c4bb4dc9c97b77bbd53b487ad9bf42f5df1e6"},"previous_names":["jaraco/path.py"],"tags_count":103,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaraco%2Fpath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaraco%2Fpath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaraco%2Fpath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaraco%2Fpath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaraco","download_url":"https://codeload.github.com/jaraco/path/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393547,"owners_count":20931811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:02:15.523Z","updated_at":"2025-12-11T21:04:03.509Z","avatar_url":"https://github.com/jaraco.png","language":"Python","readme":".. image:: https://img.shields.io/pypi/v/path.svg\n   :target: https://pypi.org/project/path\n\n.. image:: https://img.shields.io/pypi/pyversions/path.svg\n\n.. image:: https://github.com/jaraco/path/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/jaraco/path/actions?query=workflow%3A%22tests%22\n   :alt: tests\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff\n\n.. image:: https://readthedocs.org/projects/path/badge/?version=latest\n   :target: https://path.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/badge/skeleton-2025-informational\n   :target: https://blog.jaraco.com/skeleton\n\n.. image:: https://tidelift.com/badges/package/pypi/path\n   :target: https://tidelift.com/subscription/pkg/pypi-path?utm_source=pypi-path\u0026utm_medium=readme\n\n\n``path`` (aka path pie, formerly ``path.py``) implements path\nobjects as first-class entities, allowing common operations on\nfiles to be invoked on those path objects directly. For example:\n\n.. code-block:: python\n\n    from path import Path\n\n    d = Path(\"/home/guido/bin\")\n    for f in d.files(\"*.py\"):\n        f.chmod(0o755)\n\n    # Globbing\n    for f in d.files(\"*.py\"):\n        f.chmod(\"u+rwx\")\n\n    # Changing the working directory:\n    with Path(\"somewhere\"):\n        # cwd in now `somewhere`\n        ...\n\n    # Concatenate paths with /\n    foo_txt = Path(\"bar\") / \"foo.txt\"\n\nPath pie is `hosted at Github \u003chttps://github.com/jaraco/path\u003e`_.\n\nFind `the documentation here \u003chttps://path.readthedocs.io\u003e`_.\n\nGuides and Testimonials\n=======================\n\nYasoob wrote the Python 101 `Writing a Cleanup Script\n\u003chttp://freepythontips.wordpress.com/2014/01/23/python-101-writing-a-cleanup-script/\u003e`_\nbased on ``path``.\n\nAdvantages\n==========\n\nPath pie provides a superior experience to similar offerings.\n\nPython 3.4 introduced\n`pathlib \u003chttps://docs.python.org/3/library/pathlib.html\u003e`_,\nwhich shares many characteristics with ``path``. In particular,\nit provides an object encapsulation for representing filesystem paths.\nOne may have imagined ``pathlib`` would supersede ``path``.\n\nBut the implementation and the usage quickly diverge, and ``path``\nhas several advantages over ``pathlib``:\n\n- ``path`` implements ``Path`` objects as a subclass of ``str``, and as a\n  result these ``Path`` objects may be passed directly to other APIs that\n  expect simple text representations of paths, whereas with ``pathlib``, one\n  must first cast values to strings before passing them to APIs that do\n  not honor `PEP 519 \u003chttps://www.python.org/dev/peps/pep-0519/\u003e`_\n  ``PathLike`` interface.\n- ``path`` give quality of life features beyond exposing basic functionality\n  of a path. ``path`` provides methods like ``rmtree`` (from shlib) and\n  ``remove_p`` (remove a file if it exists), properties like ``.permissions``,\n  and sophisticated ``walk``, ``TempDir``, and ``chmod`` behaviors.\n- As a PyPI-hosted package, ``path`` is free to iterate\n  faster than a stdlib package. Contributions are welcome\n  and encouraged.\n- ``path`` provides superior portability using a uniform abstraction\n  over its single Path object,\n  freeing the implementer to subclass it readily. One cannot\n  subclass a ``pathlib.Path`` to add functionality, but must\n  subclass ``Path``, ``PosixPath``, and ``WindowsPath``, even\n  to do something as simple as to add a ``__dict__`` to the subclass\n  instances.  ``path`` instead allows the ``Path.module``\n  object to be overridden by subclasses, defaulting to the\n  ``os.path``. Even advanced uses of ``path.Path`` that\n  subclass the model do not need to be concerned with\n  OS-specific nuances. ``path.Path`` objects are inherently \"pure\",\n  not requiring the author to distinguish between pure and non-pure\n  variants.\n\nThis path project has the explicit aim to provide compatibility\nwith ``pathlib`` objects where possible, such that a ``path.Path``\nobject is a drop-in replacement for ``pathlib.Path*`` objects.\nThis project welcomes contributions to improve that compatibility\nwhere it's lacking.\n\n\nOrigins\n=======\n\nThe ``path.py`` project was initially released in 2003 by Jason Orendorff\nand has been continuously developed and supported by several maintainers\nover the years.\n\n\nFor Enterprise\n==============\n\nAvailable as part of the Tidelift Subscription.\n\nThis project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.\n\n`Learn more \u003chttps://tidelift.com/subscription/pkg/pypi-path?utm_source=pypi-path\u0026utm_medium=referral\u0026utm_campaign=github\u003e`_.\n","funding_links":["https://tidelift.com/funding/github/pypi/path","https://tidelift.com/badges/package/pypi/path","https://tidelift.com/subscription/pkg/pypi-path?utm_source=pypi-path\u0026utm_medium=readme","https://tidelift.com/subscription/pkg/pypi-path?utm_source=pypi-path\u0026utm_medium=referral\u0026utm_campaign=github"],"categories":["Python","Data Format \u0026 I/O","Files","文件","File \u0026 Path Utilities"],"sub_categories":["For Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaraco%2Fpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaraco%2Fpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaraco%2Fpath/lists"}