深度阅读

python导入模塊smart_imports

作者
作者
2023年08月22日
更新时间
6.74 分钟
阅读时间
0
阅读量

pip install smart_imports


Automatically discovers & imports entities, used in the current module.
https://pypi.org/project/smart_imports/

lazy-import模塊

簡而言之只在使用時候纔會用到模塊。


pip install lazy-import


lazy_import provides a set of functions that load modules, and related attributes, in a lazy fashion. This allows deferring of ImportErrors to actual module use-time. Likewise, actual module initialization only takes place at use-time. This is useful when using optional dependencies with heavy loading times and/or footprints, since that cost is only paid if the module is actually used.

https://pypi.org/project/lazy-import/

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。