Skip to main content

A safer pip that checks package health before installation.

Project description

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.

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

safe-pip-1.0.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file safe-pip-1.0.1.tar.gz.

File metadata

  • Download URL: safe-pip-1.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for safe-pip-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9388f63a06d83ffd37ee6762dfff82243f918cb5d1d1bccb3b60b6ba6b141962
MD5 feda50fb911993299947a5328074e4a5
BLAKE2b-256 68b33227d440d6529a1f93632e6e85056a9610fbfc66a1136f8a20cb00eb46b4

See more details on using hashes here.

Supported by

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