Skip to main content

safe-pip

safe-pip is a wrapper around the standard pip command that checks the health score of a package from Snyk Advisor before installation. It informs you about the package's health and asks for confirmation before proceeding.

Installation

Install safe-pip using pip:

pip install safe-pip

Usage

Use safe-pip just like you would use pip:

safe-pip install package_name

Replacing pip with safe-pip

If you want to replace the pip command with safe-pip, you can create an alias or a symbolic link.

Use this one-liner to add the following line to your shell's configuration file (e.g., .bashrc, .zshrc):

Zsh

echo "alias pip3='safe-pip'" >> ~/.zshrc
source ~/.zshrc

Bash

echo "alias pip3='safe-pip'" >> ~/.bashrc
source ~/.bashrc

Fish

alias -s pip3 "safe-pip"

The original pip could still be used by running:

python3 -m pip3

Requirements

  • Python 3.x
  • The following Python packages (will be installed automatically):
    • requests
    • colorama

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Metadata

Release files for safe-pip 1.0.1

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

Source distribution (sdist)

Source distribution for safe-pip 1.0.1
File Size Uploaded
safe-pip-1.0.1.tar.gz 3.7 kB Details

Release files / safe-pip-1.0.1.tar.gz

Download URL safe-pip-1.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9388f63a06d83ffd37ee6762dfff82243f918cb5d1d1bccb3b60b6ba6b141962
BLAKE2b-256 checksum
How to use checksums
68b33227d440d6529a1f93632e6e85056a9610fbfc66a1136f8a20cb00eb46b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

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