Skip to main content

Install and import all packages in two lines.

Project description

English | 简体中文 img

Package Man

The easiest way of auto installing and importing many libraries in Python. Inspired by pacman in R

Features

  • 🤖 Auto-detection if a pip library is not installed
  • 🚀 A faster way than manual detection and installation
  • 👶 Ease-of-use at the baby level

Recent updates

  • 2024-11-27 Initialized, supporting installing a single package and a list of packages

Installation

pip install pkgman

Usage

Install and import a bunch of libraries using two lines:

  • A single module

    from pkgman import include
    include("numpy")
    
  • Many modules

    from pkgman import include
    include(["numpy", "pandas"])
    

Then, all of them will be imported; and if not installed, installed and imported.

Example 1. Import multiple modules that may not be installed

For example, if we want to import numpy and pandas but the package may not be installed, see multiple.modules.py

And the outputs will be:

[pkgman] Installing and importing ['numpy', 'pandas']...
[pkgman] 2 packages have been imported.

Now we check if they are properly imported:

Empty DataFrame
Columns: []
Index: [] 5.4

Yes!

Example 2. Import a single modeul

You can also use it for only one module:

from pkgman import include
include("numpy")

License

MIT License

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

pkgman-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

pkgman-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file pkgman-0.1.0.tar.gz.

File metadata

  • Download URL: pkgman-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for pkgman-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f787b9df2ff5fe99173af63c19407e18a233295fe07c6767fc0316b05eb95811
MD5 e77158b65e13880e5648abddae2ecf76
BLAKE2b-256 726cb8d64c52a9f619d74f312c26c846e1e6cbd6e0e8c0814ae8739836dd96b1

See more details on using hashes here.

File details

Details for the file pkgman-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pkgman-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for pkgman-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62b1961ac20f0c3f32339c48823ac1e40db6189cd1080e85a755d403bf2aa2b4
MD5 b2f3a443b4af6fa65d3abbd97f5c7ad9
BLAKE2b-256 e19ae002dc53e10280f7990a43e53e2f0c8fe2ac9621b35bd7ae19c5b4a5452d

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