Skip to main content

pypathutil project by Mark Veltzer

description: command line utilities to help you work with paths

project website: https://veltzer.github.io/pypathutil

author: Mark Veltzer

version: 0.0.18

github

License

build

build

pypi

PyPI - Status PyPI - Python Version PyPI - License PyPI - Package Name PyPI - Format

pypi download

PyPI - Downloads PyPI - Downloads PyPI - Downloads

What is it for ?

have you even done calculations of paths in shells of the form:

$ export PATH=$PATH:$HOME/bin

And did you get upset when the path came out wrong? either repeated elements, extra colons, wrong order and the like?

This is the end of your troubles.

Examples

$ export PATH=$(pypathutil add $PATH /usr/games/bin)

This is the same as adding:

$ export PATH=$(pypathutil add --head $PATH /usr/games/bin)

Which means adding to the head of the path.

If you want to add to the tail of the path just use:

$ export PATH=$(pypathutil add --tail $PATH /usr/games/bin)

If you are on windows and want a different separator

$ export PATH=$(pypathutil add --separator \; $PATH /usr/games/bin)

But default pypathutil will remove duplicate entries, remove non absolute paths, and remove folders which do not exist. All of these can be controlled with appropriate flags.

Installing

$ pip3 install pypathutil --user

to install in your home directory or

$ sudo -H pip3 install pypathutil

to install for all users on the system.

If you don't have pip3 then you can probably get it using:

$ sudo apt install python3-pip

Performance

After doing a little performance work it dawned on me that writing bash code to do the same will be much faster. And I actually wrote bash functions to implement all of this but this package is still my best suggestion for people who want a solid foundation (bash can not be called solid).

Using pypathutil API

You can, of course, use pypathutil for it's API as a python module. It's quite intuitive.

contact me

mark.veltzer@gmail.com

Mark Veltzer, Copyright © 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026

Metadata

Release files for pypathutil 0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypathutil 0.0.18
File Size Uploaded Provenance Actions
pypathutil-0.0.18.tar.gz 7.1 kB Without provenance Details for pypathutil-0.0.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pypathutil 0.0.18
File Interpreter ABI Platform Actions
pypathutil-0.0.18-py3-none-any.whl Python 3 none any Details for pypathutil-0.0.18-py3-none-any.whl

Total release size: 13.3 kB

Release files / pypathutil-0.0.18.tar.gz

Download URL pypathutil-0.0.18.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f0fd85609fcfcd73e2798cc4238bd4b3b908a2c6e63d4e8d5f92886b8546ae79
BLAKE2b-256 checksum
How to use checksums
bb20496e6aeec438da594767881acb1fe3d124b818496dd59823bb9b393eaff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pypathutil-0.0.18-py3-none-any.whl

Download URL pypathutil-0.0.18-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
254759738843c53af37af8c27ca379886c5efb1e089bbe3ad4d7bb601e3f41ac
BLAKE2b-256 checksum
How to use checksums
dc3a48c6715db62bdc606ad87abc67b511de5dfb9dbc6b6d4ad6f5a15e13df75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pypathutil 0.0.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page