path

Object-oriented file system path manipulation

https://github.com/jaraco/path

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords from Contributors

closember gtk qt spec-0 repl notebook unit-testing ipython tk pallets
Last synced: 9 months ago · JSON representation

Repository

Object-oriented file system path manipulation

Basic Info
  • Host: GitHub
  • Owner: jaraco
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.3 MB
Statistics
  • Stars: 1,117
  • Watchers: 37
  • Forks: 145
  • Open Issues: 1
  • Releases: 30
Created about 14 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Funding Security

README.rst

.. image:: https://img.shields.io/pypi/v/path.svg
   :target: https://pypi.org/project/path

.. image:: https://img.shields.io/pypi/pyversions/path.svg

.. image:: https://github.com/jaraco/path/actions/workflows/main.yml/badge.svg
   :target: https://github.com/jaraco/path/actions?query=workflow%3A%22tests%22
   :alt: tests

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
    :target: https://github.com/astral-sh/ruff
    :alt: Ruff

.. image:: https://readthedocs.org/projects/path/badge/?version=latest
   :target: https://path.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/skeleton-2025-informational
   :target: https://blog.jaraco.com/skeleton

.. image:: https://tidelift.com/badges/package/pypi/path
   :target: https://tidelift.com/subscription/pkg/pypi-path?utm_source=pypi-path&utm_medium=readme


``path`` (aka path pie, formerly ``path.py``) implements path
objects as first-class entities, allowing common operations on
files to be invoked on those path objects directly. For example:

.. code-block:: python

    from path import Path

    d = Path("/home/guido/bin")
    for f in d.files("*.py"):
        f.chmod(0o755)

    # Globbing
    for f in d.files("*.py"):
        f.chmod("u+rwx")

    # Changing the working directory:
    with Path("somewhere"):
        # cwd in now `somewhere`
        ...

    # Concatenate paths with /
    foo_txt = Path("bar") / "foo.txt"

Path pie is `hosted at Github `_.

Find `the documentation here `_.

Guides and Testimonials
=======================

Yasoob wrote the Python 101 `Writing a Cleanup Script
`_
based on ``path``.

Advantages
==========

Path pie provides a superior experience to similar offerings.

Python 3.4 introduced
`pathlib `_,
which shares many characteristics with ``path``. In particular,
it provides an object encapsulation for representing filesystem paths.
One may have imagined ``pathlib`` would supersede ``path``.

But the implementation and the usage quickly diverge, and ``path``
has several advantages over ``pathlib``:

- ``path`` implements ``Path`` objects as a subclass of ``str``, and as a
  result these ``Path`` objects may be passed directly to other APIs that
  expect simple text representations of paths, whereas with ``pathlib``, one
  must first cast values to strings before passing them to APIs that do
  not honor `PEP 519 `_
  ``PathLike`` interface.
- ``path`` give quality of life features beyond exposing basic functionality
  of a path. ``path`` provides methods like ``rmtree`` (from shlib) and
  ``remove_p`` (remove a file if it exists), properties like ``.permissions``,
  and sophisticated ``walk``, ``TempDir``, and ``chmod`` behaviors.
- As a PyPI-hosted package, ``path`` is free to iterate
  faster than a stdlib package. Contributions are welcome
  and encouraged.
- ``path`` provides superior portability using a uniform abstraction
  over its single Path object,
  freeing the implementer to subclass it readily. One cannot
  subclass a ``pathlib.Path`` to add functionality, but must
  subclass ``Path``, ``PosixPath``, and ``WindowsPath``, even
  to do something as simple as to add a ``__dict__`` to the subclass
  instances.  ``path`` instead allows the ``Path.module``
  object to be overridden by subclasses, defaulting to the
  ``os.path``. Even advanced uses of ``path.Path`` that
  subclass the model do not need to be concerned with
  OS-specific nuances. ``path.Path`` objects are inherently "pure",
  not requiring the author to distinguish between pure and non-pure
  variants.

This path project has the explicit aim to provide compatibility
with ``pathlib`` objects where possible, such that a ``path.Path``
object is a drop-in replacement for ``pathlib.Path*`` objects.
This project welcomes contributions to improve that compatibility
where it's lacking.


Origins
=======

The ``path.py`` project was initially released in 2003 by Jason Orendorff
and has been continuously developed and supported by several maintainers
over the years.


For Enterprise
==============

Available as part of the Tidelift Subscription.

This 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.

`Learn more `_.

Owner

  • Name: Jason R. Coombs
  • Login: jaraco
  • Kind: user
  • Location: Pittsburgh, PA, USA

GitHub Events

Total
  • Create event: 2
  • Release event: 2
  • Issues event: 8
  • Watch event: 25
  • Issue comment event: 21
  • Push event: 12
  • Pull request event: 7
  • Fork event: 4
Last Year
  • Create event: 2
  • Release event: 2
  • Issues event: 8
  • Watch event: 25
  • Issue comment event: 21
  • Push event: 12
  • Pull request event: 7
  • Fork event: 4

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 1,220
  • Total Committers: 55
  • Avg Commits per committer: 22.182
  • Development Distribution Score (DDS): 0.161
Past Year
  • Commits: 88
  • Committers: 6
  • Avg Commits per committer: 14.667
  • Development Distribution Score (DDS): 0.489
Top Committers
Name Email Commits
Jason R. Coombs j****o@j****m 1,023
Seth Morton s****n@g****m 33
Mikhail Gusarov d****g@d****t 22
Marc Abramowitz m****c@m****m 13
Dimitri Papadopoulos Orfanos 3****s 9
Avasam s****6@h****m 8
Anderson Bravalheri a****i@g****m 7
simleo s****o@c****t 7
Sviatoslav Sydorenko w****b@s****a 6
Joseph Martinot-Lagarde j****e@o****r 6
Alex Morega a****x@g****o 6
sametmax l****x@g****m 5
Dimitri Merejkowsky d****j@g****m 5
Hugo van Kemenade h****k 4
unknown j****o@.****m 4
Jesse Zwaan j****s@J****l 4
dassh t****x@f****m 3
Bartosz Sławecki g****7@p****m 3
cedricsuet c****t@l****t 3
Nils Maier m****n@w****e 3
Jason Chu j****u@x****t 3
5j9 5****9 3
Zearin z****n@g****t 2
Vojislav Stojkovic v****c@s****m 2
Frank Sachsenheim f****e 2
hallaj h****s@g****m 2
Lucio Torre l****e@g****m 2
Thomas Kluyver t****l@g****m 2
Christian Clauss c****s@m****m 2
layday 3****y 1
and 25 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 78
  • Total pull requests: 49
  • Average time to close issues: 3 months
  • Average time to close pull requests: 29 days
  • Total issue authors: 41
  • Total pull request authors: 19
  • Average comments per issue: 2.96
  • Average comments per pull request: 1.29
  • Merged pull requests: 36
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 3
  • Average time to close issues: 19 minutes
  • Average time to close pull requests: 1 day
  • Issue authors: 3
  • Pull request authors: 2
  • Average comments per issue: 1.0
  • Average comments per pull request: 3.33
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jaraco (17)
  • SethMMorton (9)
  • kloczek (5)
  • 5j9 (3)
  • scarabeusiv (3)
  • nehaljwani (2)
  • felixonmars (2)
  • floriandeboissieu (2)
  • sametmax (2)
  • char101 (2)
  • talktoshishir (1)
  • lixxu (1)
  • buemi (1)
  • sthabinod (1)
  • nieder (1)
Pull Request Authors
  • jaraco (29)
  • SethMMorton (5)
  • dmerejkowsky (3)
  • abravalheri (2)
  • aniederl (2)
  • aploium (2)
  • Avasam (2)
  • nmaier (1)
  • thombashi (1)
  • havocesp (1)
  • ssbarnea (1)
  • cajopa (1)
  • Nodd (1)
  • timgates42 (1)
  • GandaG (1)
Top Labels
Issue Labels
help wanted (9) enhancement (4) invalid (4) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 21
  • Total downloads:
    • pypi 1,504,046 last-month
  • Total docker downloads: 781,619,815
  • Total dependent packages: 172
    (may contain duplicates)
  • Total dependent repositories: 12,868
    (may contain duplicates)
  • Total versions: 200
  • Total maintainers: 6
pypi.org: path

A module wrapper for os.path

  • Versions: 35
  • Dependent Packages: 82
  • Dependent Repositories: 1,915
  • Downloads: 1,223,559 Last month
  • Docker Downloads: 780,539,384
Rankings
Docker downloads count: 0.1%
Downloads: 0.3%
Dependent repos count: 0.3%
Dependent packages count: 0.3%
Average: 1.2%
Stargazers count: 2.0%
Forks count: 4.1%
Maintainers (1)
Last synced: 9 months ago
pypi.org: path.py

A module wrapper for os.path

  • Versions: 73
  • Dependent Packages: 76
  • Dependent Repositories: 10,811
  • Downloads: 280,487 Last month
  • Docker Downloads: 1,080,431
Rankings
Dependent repos count: 0.1%
Dependent packages count: 0.3%
Downloads: 0.6%
Docker downloads count: 0.6%
Average: 1.3%
Stargazers count: 2.0%
Forks count: 4.1%
Last synced: 10 months ago
alpine-v3.18: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.2%
Stargazers count: 7.7%
Forks count: 9.3%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.18: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.2%
Stargazers count: 7.7%
Forks count: 9.3%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.15: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 5.4%
Average: 5.8%
Forks count: 6.9%
Dependent packages count: 10.9%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.17: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 6.5%
Stargazers count: 7.3%
Forks count: 8.9%
Dependent packages count: 9.9%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.16: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 5.8%
Forks count: 7.2%
Average: 7.9%
Dependent packages count: 18.7%
Maintainers (1)
Last synced: 10 months ago
proxy.golang.org: github.com/jaraco/path
  • Versions: 41
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 10 months ago
alpine-v3.14: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 5.0%
Forks count: 6.6%
Average: 8.3%
Dependent packages count: 21.7%
Maintainers (1)
Last synced: 10 months ago
alpine-edge: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 8.4%
Stargazers count: 9.3%
Forks count: 10.7%
Dependent packages count: 13.4%
Maintainers (1)
Last synced: 10 months ago
alpine-edge: py3-path

Module wrapper for os.path

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 8.5%
Stargazers count: 8.9%
Forks count: 10.3%
Dependent packages count: 14.6%
Maintainers (1)
Last synced: 10 months ago
conda-forge.org: path

path implements a path objects as first-class entities, allowing common operations on files to be invoked on those path objects directly.

  • Versions: 14
  • Dependent Packages: 7
  • Dependent Repositories: 71
Rankings
Dependent repos count: 4.1%
Dependent packages count: 8.0%
Average: 10.0%
Stargazers count: 12.4%
Forks count: 15.5%
Last synced: 10 months ago
anaconda.org: path

path implements a path objects as first-class entities, allowing common operations on files to be invoked on those path objects directly.

  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 71
Rankings
Dependent repos count: 21.2%
Stargazers count: 23.3%
Forks count: 27.7%
Average: 30.9%
Dependent packages count: 51.2%
Last synced: 10 months ago
alpine-v3.20: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.19: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 10 months ago
alpine-v3.21: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.22: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.22: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.20: py3-path-pyc

Precompiled Python bytecode for py3-path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.21: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 10 months ago
alpine-v3.19: py3-path

Module wrapper for os.path

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 10 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • re-actors/alls-green release/v1 composite
Dockerfile docker
  • ubuntu bionic build