userpath 1.9.2


pip install userpath

  Latest version

Released: Feb 29, 2024


Meta
Author: Ofek Lev
Requires Python: >=3.7

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • OS Independent

Programming Language
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

userpath

CI/CD CI - Test CD - Build
Package PyPI - Version PyPI - Python Version
Meta License - MIT GitHub Sponsors

This is a tool for modifying a user's PATH.

Table of Contents

Installation

pip install userpath

CLI

$ userpath -h
Usage: userpath [OPTIONS] COMMAND [ARGS]...

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  append   Appends to the user PATH
  prepend  Prepends to the user PATH
  verify   Checks if locations are in the user PATH

API

>>> import userpath
>>> location = r'C:\Users\Ofek\Desktop\test'
>>>
>>> userpath.in_current_path(location)
False
>>> userpath.in_new_path(location)
False
>>> userpath.append(location)
True
>>> userpath.in_new_path(location)
True
>>> userpath.need_shell_restart(location)
True

License

userpath is distributed under the terms of the MIT license.

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
click