Skip to main content

Preimport python modules to accelerate running speed.

Project description

English | 简体中文

preimport

Build Status Coverage Status Platform:win|osx|linux PyPI

preimport python modules to accelerate running speed and avoid "hang" when invoke module.

Installation

pip install preimport

Usage

from preimport import preimport

preimport('numpy', 'PyQt5')
preimport(['sys', 'os'])

It will be like following when using preimport in cli.

>>> # examples
>>> preimport('numpy')
>>> Preimporting 'numpy'       ...   successfully in 0.202s.
>>>
>>> # if module imported
>>> preimport('os')
>>> Preimporting 'os'        ...   [Note]:os already imported.
>>>
>>> # if module not installed
>>> preimport('PyQt5')
>>> Preimporting 'PyQt5'   ...   [Failed]:ModuleNotFound.
>>>
>>> # error module name
>>> preimport(1)
>>> [Error]: preimport error, moduleName must be str or Iterable.

Project details


Download files

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

Files for preimport, version 1.1.6
Filename, size File type Python version Upload date Hashes
Filename, size preimport-1.1.6-py2.py3-none-any.whl (12.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page