🎯 Available Demo Module

A special lazy_demo package is included in this demo. It contains submodules that print messages when imported, making it easy to see when lazy imports are reified:

  • lazy_demo - Main package (prints "πŸ“¦ lazy_demo package loaded!")
  • lazy_demo.heavy - Heavy computation module (prints "βš™οΈ lazy_demo.heavy loaded!")
  • lazy_demo.utils - Utility functions (prints "πŸ”§ lazy_demo.utils loaded!")
  • lazy_demo.data - Data module (prints "πŸ“Š lazy_demo.data loaded!")
  • lazy_demo.broken - Demonstrates deferred error handling: imports successfully but has a function that triggers a lazy import of a failing module

πŸ’‘ Try: lazy import lazy_demo.heavy then access lazy_demo.heavy.compute() to see the lazy import in action!

πŸ’‘ Test deferred errors: import lazy_demo.broken (succeeds), then call lazy_demo.broken.bar() (fails when lazy import triggers).