Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pippity-1.2.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pippity-1.2.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for pippity-1.2.1.tar.gz
Algorithm Hash digest
SHA256 5c51875d7ffa7b04ee8004ccf3a087f2a4925745b693f4074a9cde1b258fb5be
MD5 190f28d9ca81dd73b050903edf65c2d9
BLAKE2b-256 22cfb5f682777279eb96a3cf14b37ee89f04a6d37911cf956ebd7398fd94d882

See more details on using hashes here.

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

Hashes for pippity-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f6df04bb5eb3100218b0757392bab3a2ece1d4dc6cb2feee108b3c90179e87
MD5 f073fc4583f6af82f0a6c8e11314093f
BLAKE2b-256 daaa4800fe29edf5b24c30329a38eb80968bc8330e9f265d0c2d6e1dc6c499cc

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