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.0.tar.gz
(4.9 kB
view details)
Built Distribution
pylibimp-1.0.0-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file pylibimp-1.0.0.tar.gz
.
File metadata
- Download URL: pylibimp-1.0.0.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 | e1fc768d893184d67f4c7179d7d6cda4b3abc2d7242edc3aab78a66873f85c72 |
|
MD5 | b1fd7db6c1480376a45b62b20c28b6e4 |
|
BLAKE2b-256 | 16f73f061641d425e7cba714ce27c468234425e5c718ba26cd2dcbea08366bd9 |
File details
Details for the file pylibimp-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pylibimp-1.0.0-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 | 63b41820600f485ee4c82ac947ba39384c7066d5c2bc294272b572982d162051 |
|
MD5 | 6d3492b78681ccc806ba9beb14828122 |
|
BLAKE2b-256 | 7041481f6d276c1e494d2ebc2c008840750029b9bea1ab413d81450bab31e6a0 |