Install your PyPi packages without access to pip. Install packages, straight from inside your script.
Project description
pippity
Install your PyPi packages without access to pip. Install packages, straight from inside your script.
Installation
To install pippity, just run the following command in a shell with access to python/pip:
pip install pippity
Documentation
Using pippity to install packages from PyPi is really easy!
import pippity
result = pippity.install("numpy")
# Returns an InstallResult object.
print(result.ok) # Boolean value, whether it installed correctly or not.
print(result.stdout) # pip's stdout
print(result.stderr) # pip's stderr
Or, if you want to install multiple packages:
import pippity
result = pippity.install(["flask", "uvicorn"])
print(result.ok)
print(result.stdout)
print(result.stderr)
You can use this at the start of a script, for example:
import pippity
import sys
try:
import package1
import package2
import package3
except ImportError:
print("Packages not detected. Installing now...")
result = pippity.install(["package1", "package2", "package3"])
if result.ok:
print("Packages installed successfully!")
import package1
import package2
import package3
else:
print("Packages failed to install. STDERR:")
print(result.stderr)
sys.exit(1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pippity-1.2.1.tar.gz.
File metadata
- Download URL: pippity-1.2.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c51875d7ffa7b04ee8004ccf3a087f2a4925745b693f4074a9cde1b258fb5be
|
|
| MD5 |
190f28d9ca81dd73b050903edf65c2d9
|
|
| BLAKE2b-256 |
22cfb5f682777279eb96a3cf14b37ee89f04a6d37911cf956ebd7398fd94d882
|
File details
Details for the file pippity-1.2.1-py3-none-any.whl.
File metadata
- Download URL: pippity-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1f6df04bb5eb3100218b0757392bab3a2ece1d4dc6cb2feee108b3c90179e87
|
|
| MD5 |
f073fc4583f6af82f0a6c8e11314093f
|
|
| BLAKE2b-256 |
daaa4800fe29edf5b24c30329a38eb80968bc8330e9f265d0c2d6e1dc6c499cc
|