Closed spacebuoy closed 6 years ago
Hi, and thanks for remarking the glaring oversight of forgetting to actually put the code on PyPi!! I'll get to this ASAP, because I'm also quite interested in your usage feedback.
There, fixed a couple more things and it is now on PyPi. Feedback appreciated!
Further note: besides not being on PyPi (it is now) the docs were outdated and directed you to install lazy_module
, when the correct name is lazy_import
. Updated a shiny new release to PyPi just to fix this doc mismatch...
Not available yesterday but installed successfully today, I guess after PyPi made it available. Thanks for the quick response and fix. I'll let you know how it goes.
I've tested lazy_module with numpy, numpy.core, secrets, secrets.base64 at command prompt and in class and child class in other module and passed dict in parent to child with numpy.core function calls in child. It works flawlessly and exactly per docs.
Using lazy_module with system imported modules like os e.g. has no effect. The module is always imported. This makes sense since they are already loaded, yes?
lazy_import docs are the most thorough and easy to fallow of all the lazy importers I've looked at.
Great that it's working out for you! I'm curious what bug #2 will be...
And indeed as you guessed, if the module is already imported then lazy_import.lazy_module
will return the real module. I'll clarify this in the docs.
This lazy import looks like the best match for our needs but returns an error when installing. Running on python 3.6.4 or 3.5.2.
pip install lazy_module Collecting lazy_module Could not find a version that satisfies the requirement lazy_module (from versions: ) No matching distribution found for lazy_module