Skip to main content
Latest PyPI version Travis CI AppVeyor CI Supported Python versions License

Ever wanted to release a cool new app but found it difficult to add its location to PATH for users? Me too! This tool does that for you on all major operating systems and does not require elevated privileges!

Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at!

Installation

adduserpath is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 2.6-2.7/3.3+ and PyPy.

$ pip install adduserpath

Commands

Only 3!

$ 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
Example run

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 both

at your option.

Release files for adduserpath 0.4.0

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

Source distribution (sdist)

Source distribution for adduserpath 0.4.0
File Size Uploaded
adduserpath-0.4.0.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adduserpath 0.4.0
File Interpreter ABI Platform
adduserpath-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 17.5 kB

Release files / adduserpath-0.4.0.tar.gz

Download URL adduserpath-0.4.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d12612a529028a2bda79f5111eab6ba4b787625b3fd8958f47ac9371ea9a76dc
BLAKE2b-256 checksum
How to use checksums
adcb50f2be266f19130308cd705a3556f1d06220a5ca60a446c496a485b12726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / adduserpath-0.4.0-py2.py3-none-any.whl

Download URL adduserpath-0.4.0-py2.py3-none-any.whl
Size 8.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3494c0a58b8792c05feccfc3a4d3aee6b02ce469dab33798b4eae7622f631d7d
BLAKE2b-256 checksum
How to use checksums
e8533035ff330183156e93295f5e83735ae1626ad38e215fdf837fe20ba0fab0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

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