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

  • 2025-07-28 Add support for variadic arguments
  • 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"])
    

    Or simply use variadic arguments without the parentheses ([list]) of the list

    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.1.tar.gz (3.7 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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pkgman-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pkgman-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ccebc8e9d7f1103424937260d1152b8032fe42752d25bca3793f9f4d7f16d21
MD5 787e86345d136724f4687eff35b95731
BLAKE2b-256 2b7ca0c1f13698514054a250c7932029f27999dff2160657ba5ad5887e9dca99

See more details on using hashes here.

Provenance

The following attestation bundles were made for pkgman-0.1.1.tar.gz:

Publisher: python-publish.yml on reycn/pkgman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: pkgman-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pkgman-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0da6817e9409bf9741cde31661a5448cb8626067e69d73ca9fb5285d328d71d7
MD5 1d210dc94245efd034320cbea5f3a26d
BLAKE2b-256 c404e086382181d7d20a0423c1673964522101da299070b9c20b8a1605d8b0ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pkgman-0.1.1-py3-none-any.whl:

Publisher: python-publish.yml on reycn/pkgman

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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