userpath
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
userpath is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 2.7/3.6+ and PyPy.
$ pip install userpath
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
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.
History
Important changes are emphasized.
1.4.0
Fix duplicating system paths on Windows
Prevent adding paths multiple times on macOS/Linux
Send CLI errors to stderr instead of stdout
1.3.0
Only require the dependency distro on Linux
Ship tests with source distributions
1.2.0
Added support for shell auto-detection and selection
1.1.0
First public stable release
View all history
Metadata
Release files for userpath 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| userpath-1.4.1.tar.gz | 19.9 kB | Without provenance | Details for userpath-1.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| userpath-1.4.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for userpath-1.4.1-py2.py3-none-any.whl |
Total release size: 34.7 kB
Release files / userpath-1.4.1.tar.gz
| Download URL | userpath-1.4.1.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
211544ea02d8715fdc06f429cf66cd18c9877a31751d966d6de11b24faaed255
|
|
BLAKE2b-256 checksum How to use checksums |
862b0a443e7978ea0f6bc1baece1de35545fa12f6d9fc5451aa90529db41db70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.5
|
Release files / userpath-1.4.1-py2.py3-none-any.whl
| Download URL | userpath-1.4.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
801bbfed9c9de8bf33e615a2017031280bd5c85436d27a061801c594bbe99f63
|
|
BLAKE2b-256 checksum How to use checksums |
fbf1faca8a3cc86bd2223aaf72edd222bc31d6ae2eea5feaf17a144634a92e6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.5
|
Security for userpath 1.4.1
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.