Python LazyModule to replace python import statement for fast import
Project description
LazyModule
Install
pip install --upgrade pip && pip install lazy_module
#or
pip install git+https://github.com/anhvth/lazy_module
How to use
import time
start = time.time()
import pandas as pd
print('Import time:', time.time()-start)
Import time: 0.30898594856262207
Lazy import
from lazy_module.core import *
start = time.time()
pd = LazyModule('pandas')
print('Import time:', time.time()-start)
# Ipython tabcomplition should work normally
Import time: 5.507469177246094e-05
Issue
- Class import is not suported yet, assertion error will occor at runtime when the object is being called
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
lazy_module-0.0.2.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for lazy_module-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4633f10f9541236b378614126fa271e94787786d24e0379b4da11fbf2ec5328 |
|
MD5 | 93fcf6aa77d3f18587b58ca9a99c14d3 |
|
BLAKE2b-256 | 2fd27b4c77c9b1f39d21d9dd7bbf5c14e82aa57056b49d19c8cef8682d946606 |