Skip to main content

Cross-platform tool for adding locations to the user PATH

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

userpath-1.8.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

userpath-1.8.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file userpath-1.8.0.tar.gz.

File metadata

  • Download URL: userpath-1.8.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for userpath-1.8.0.tar.gz
Algorithm Hash digest
SHA256 04233d2fcfe5cff911c1e4fb7189755640e1524ff87a4b82ab9d6b875fee5787
MD5 067115106b47bde4a4414c8f0ff75541
BLAKE2b-256 85ee820c8e5f0a5b4b27fdbf6f40d6c216b6919166780128b6714adf3c201644

See more details on using hashes here.

File details

Details for the file userpath-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: userpath-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for userpath-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f133b534a8c0b73511fc6fa40be68f070d9474de1b5aada9cded58cdf23fb557
MD5 f9476019ea006b60ac816b18d73d815c
BLAKE2b-256 4572e8cf3e440a4719253cf114c091ae84e7a07394dbb44983f3a561f40f80b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page