Preimport python modules to accelerate running speed.
Project description
English | 简体中文
preimport
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file preimport-1.1.6-py2.py3-none-any.whl
.
File metadata
- Download URL: preimport-1.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 036c182dd90958570882ed2dd445c6c114fd2921563b9e676407ae8bb6e6ac49 |
|
MD5 | be3f43ba3038ff59eeca765124378d6d |
|
BLAKE2b-256 | 8c690866fbfaacb2232df38bc39f78a4c761191ac89529ecbb7b3cddb1893e62 |