Python import utilities
Project description
Python utility for keeping track of packages that were imported and isolating imports.
Install
pip install pylibimp
Example
Normal Import Hook to save an imports dependent modules
import pylibimp
with pylibimp.SaveBuiltinsImportHook() as imp:
import pylibimp
import urllib3
modules = imp.get_modules()
assert 'pylibimp' in modules
assert 'urllib3' in modules
Import a module but keep the original system
import sys
import pylibimp
modules = sys.modules.copy()
with pylibimp.original_system():
import urllib3
assert 'urllib3' not in modules
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 Distribution
pylibimp-1.0.1.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pylibimp-1.0.1-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file pylibimp-1.0.1.tar.gz.
File metadata
- Download URL: pylibimp-1.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b24562b1c055bf364caf5c3b71f03b693b05ebc1e57cf0e3c791bd0fc4e183a6
|
|
| MD5 |
687c31dc6beb16013a9aff17b4fc0927
|
|
| BLAKE2b-256 |
2e18b69751d8ba4e1f4da5c2e51824c7d963f3703ad3666a1061e485b4c12b64
|
File details
Details for the file pylibimp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pylibimp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90207071c65f966f96d06b7bf5a8ca37b42856bc7736774a888e508e876d888b
|
|
| MD5 |
8c1ff2b59bf18e6b1e79b9897b7e559d
|
|
| BLAKE2b-256 |
f158a67a4e0394410ec014eabf591c2e45946c9120eb5468bc0ea02709e2622c
|