exonware-xwlazy 0.1.0.1__py3-none-any.whl → 0.1.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. exonware/xwlazy/__init__.py +0 -0
  2. exonware/xwlazy/version.py +2 -2
  3. exonware_xwlazy-0.1.0.8.dist-info/METADATA +0 -0
  4. exonware_xwlazy-0.1.0.8.dist-info/RECORD +6 -0
  5. exonware/__init__.py +0 -42
  6. exonware/xwlazy/common/__init__.py +0 -55
  7. exonware/xwlazy/common/base.py +0 -65
  8. exonware/xwlazy/common/cache.py +0 -504
  9. exonware/xwlazy/common/logger.py +0 -257
  10. exonware/xwlazy/common/services/__init__.py +0 -72
  11. exonware/xwlazy/common/services/dependency_mapper.py +0 -250
  12. exonware/xwlazy/common/services/install_async_utils.py +0 -170
  13. exonware/xwlazy/common/services/install_cache_utils.py +0 -245
  14. exonware/xwlazy/common/services/keyword_detection.py +0 -283
  15. exonware/xwlazy/common/services/spec_cache.py +0 -165
  16. exonware/xwlazy/common/services/state_manager.py +0 -84
  17. exonware/xwlazy/common/strategies/__init__.py +0 -28
  18. exonware/xwlazy/common/strategies/caching_dict.py +0 -44
  19. exonware/xwlazy/common/strategies/caching_installation.py +0 -88
  20. exonware/xwlazy/common/strategies/caching_lfu.py +0 -66
  21. exonware/xwlazy/common/strategies/caching_lru.py +0 -63
  22. exonware/xwlazy/common/strategies/caching_multitier.py +0 -59
  23. exonware/xwlazy/common/strategies/caching_ttl.py +0 -59
  24. exonware/xwlazy/common/utils.py +0 -142
  25. exonware/xwlazy/config.py +0 -193
  26. exonware/xwlazy/contracts.py +0 -1533
  27. exonware/xwlazy/defs.py +0 -378
  28. exonware/xwlazy/errors.py +0 -276
  29. exonware/xwlazy/facade.py +0 -1137
  30. exonware/xwlazy/host/__init__.py +0 -8
  31. exonware/xwlazy/host/conf.py +0 -16
  32. exonware/xwlazy/module/__init__.py +0 -18
  33. exonware/xwlazy/module/base.py +0 -643
  34. exonware/xwlazy/module/data.py +0 -17
  35. exonware/xwlazy/module/facade.py +0 -246
  36. exonware/xwlazy/module/importer_engine.py +0 -2964
  37. exonware/xwlazy/module/partial_module_detector.py +0 -275
  38. exonware/xwlazy/module/strategies/__init__.py +0 -22
  39. exonware/xwlazy/module/strategies/module_helper_lazy.py +0 -93
  40. exonware/xwlazy/module/strategies/module_helper_simple.py +0 -65
  41. exonware/xwlazy/module/strategies/module_manager_advanced.py +0 -111
  42. exonware/xwlazy/module/strategies/module_manager_simple.py +0 -95
  43. exonware/xwlazy/package/__init__.py +0 -18
  44. exonware/xwlazy/package/base.py +0 -877
  45. exonware/xwlazy/package/conf.py +0 -324
  46. exonware/xwlazy/package/data.py +0 -17
  47. exonware/xwlazy/package/facade.py +0 -480
  48. exonware/xwlazy/package/services/__init__.py +0 -84
  49. exonware/xwlazy/package/services/async_install_handle.py +0 -87
  50. exonware/xwlazy/package/services/config_manager.py +0 -249
  51. exonware/xwlazy/package/services/discovery.py +0 -435
  52. exonware/xwlazy/package/services/host_packages.py +0 -180
  53. exonware/xwlazy/package/services/install_async.py +0 -291
  54. exonware/xwlazy/package/services/install_cache.py +0 -145
  55. exonware/xwlazy/package/services/install_interactive.py +0 -59
  56. exonware/xwlazy/package/services/install_policy.py +0 -156
  57. exonware/xwlazy/package/services/install_registry.py +0 -54
  58. exonware/xwlazy/package/services/install_result.py +0 -17
  59. exonware/xwlazy/package/services/install_sbom.py +0 -153
  60. exonware/xwlazy/package/services/install_utils.py +0 -79
  61. exonware/xwlazy/package/services/installer_engine.py +0 -406
  62. exonware/xwlazy/package/services/lazy_installer.py +0 -803
  63. exonware/xwlazy/package/services/manifest.py +0 -503
  64. exonware/xwlazy/package/services/strategy_registry.py +0 -324
  65. exonware/xwlazy/package/strategies/__init__.py +0 -57
  66. exonware/xwlazy/package/strategies/package_discovery_file.py +0 -129
  67. exonware/xwlazy/package/strategies/package_discovery_hybrid.py +0 -84
  68. exonware/xwlazy/package/strategies/package_discovery_manifest.py +0 -101
  69. exonware/xwlazy/package/strategies/package_execution_async.py +0 -113
  70. exonware/xwlazy/package/strategies/package_execution_cached.py +0 -90
  71. exonware/xwlazy/package/strategies/package_execution_pip.py +0 -99
  72. exonware/xwlazy/package/strategies/package_execution_wheel.py +0 -106
  73. exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +0 -100
  74. exonware/xwlazy/package/strategies/package_mapping_hybrid.py +0 -105
  75. exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +0 -100
  76. exonware/xwlazy/package/strategies/package_policy_allow_list.py +0 -57
  77. exonware/xwlazy/package/strategies/package_policy_deny_list.py +0 -57
  78. exonware/xwlazy/package/strategies/package_policy_permissive.py +0 -46
  79. exonware/xwlazy/package/strategies/package_timing_clean.py +0 -67
  80. exonware/xwlazy/package/strategies/package_timing_full.py +0 -66
  81. exonware/xwlazy/package/strategies/package_timing_smart.py +0 -68
  82. exonware/xwlazy/package/strategies/package_timing_temporary.py +0 -66
  83. exonware/xwlazy/runtime/__init__.py +0 -18
  84. exonware/xwlazy/runtime/adaptive_learner.py +0 -129
  85. exonware/xwlazy/runtime/base.py +0 -274
  86. exonware/xwlazy/runtime/facade.py +0 -94
  87. exonware/xwlazy/runtime/intelligent_selector.py +0 -170
  88. exonware/xwlazy/runtime/metrics.py +0 -60
  89. exonware/xwlazy/runtime/performance.py +0 -37
  90. exonware_xwlazy-0.1.0.1.dist-info/METADATA +0 -454
  91. exonware_xwlazy-0.1.0.1.dist-info/RECORD +0 -93
  92. xwlazy/__init__.py +0 -14
  93. xwlazy/lazy.py +0 -30
  94. {exonware_xwlazy-0.1.0.1.dist-info → exonware_xwlazy-0.1.0.8.dist-info}/WHEEL +0 -0
  95. {exonware_xwlazy-0.1.0.1.dist-info → exonware_xwlazy-0.1.0.8.dist-info}/licenses/LICENSE +0 -0
@@ -1,454 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: exonware-xwlazy
3
- Version: 0.1.0.1
4
- Summary: Marker package that enables lazy install features across the eXonware suite.
5
- Project-URL: Homepage, https://exonware.com
6
- Project-URL: Repository, https://github.com/exonware/xwlazy
7
- Project-URL: Documentation, https://github.com/exonware/xwlazy#readme
8
- Project-URL: Subtree, https://github.com/Exonware/XWLazy.git
9
- Author-email: "Eng. Muhammad AlShehri" <connect@exonware.com>
10
- License: MIT
11
- License-File: LICENSE
12
- Keywords: exonware,lazy,xwlazy
13
- Classifier: Development Status :: 4 - Beta
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.12
21
- Requires-Dist: tomli>=2.0.1; python_version < '3.11'
22
- Description-Content-Type: text/markdown
23
-
24
- # xwlazy
25
-
26
- **Enterprise-grade lazy loading with automatic dependency installation—the only lazy import library that installs missing packages on-demand while maintaining per-package isolation and security.**
27
-
28
- [![Status](https://img.shields.io/badge/status-beta-blue.svg)](https://exonware.com)
29
- [![Python](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org)
30
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
31
-
32
- ## 🎯 Overview
33
-
34
- xwlazy is a production-ready lazy loading system that enables Python packages to automatically install missing dependencies when they're actually used. Unlike traditional dependency management, xwlazy installs dependencies **on-demand** at runtime, reducing initial installation size, avoiding conflicts, and enabling truly optional features.
35
-
36
- **Why xwlazy exists:** Traditional dependency management requires installing all dependencies upfront, even if they're never used. This leads to bloated installations, longer setup times, and potential conflicts. xwlazy solves this by installing dependencies only when code actually needs them, while maintaining full security and isolation between packages.
37
-
38
- ## ✨ Key Features
39
-
40
- ### 🚀 **Auto-Installation on Demand**
41
- Dependencies are automatically installed when code first uses them—no manual intervention required. Perfect for optional features that users may never need.
42
-
43
- **Why it matters:** Reduces initial installation size by 60-80% for packages with many optional dependencies, while maintaining zero overhead for successful imports.
44
-
45
- ### 🔒 **Per-Package Isolation**
46
- Each package (xwsystem, xwnode, xwdata, etc.) can independently enable lazy mode without affecting others. Complete isolation prevents conflicts and enables flexible deployment strategies.
47
-
48
- **Why it matters:** Allows mixing lazy and non-lazy packages in the same environment, giving developers full control over which packages use auto-installation.
49
-
50
- ### 🎯 **Keyword-Based Auto-Detection**
51
- Packages can opt-in to lazy loading by simply adding `"xwlazy-enabled"` to their `pyproject.toml` keywords—no code changes required.
52
-
53
- **Why it matters:** Zero-code integration for package maintainers. Just add a keyword and lazy loading works automatically.
54
-
55
- ### 🛡️ **Enterprise Security**
56
- - **Allow/Deny Lists:** Whitelist or blacklist specific packages
57
- - **SBOM Generation:** Software Bill of Materials for compliance
58
- - **Vulnerability Auditing:** Automatic security scanning with pip-audit
59
- - **Lockfile Management:** Track installed packages with versions
60
- - **PEP 668 Compliance:** Respects externally-managed environments
61
-
62
- **Why it matters:** Production environments require security controls. xwlazy provides enterprise-grade security without sacrificing usability.
63
-
64
- ### ⚡ **Two-Stage Lazy Loading**
65
- **Stage 1 (Import Time):** Missing imports are logged but don't raise errors—modules load successfully.
66
- **Stage 2 (Usage Time):** Dependencies are installed automatically when code first accesses them.
67
-
68
- **Why it matters:** Enables clean Python code with standard imports. No defensive `try/except ImportError` blocks needed.
69
-
70
- ### 📊 **Performance Monitoring**
71
- Built-in tracking of module load times, access counts, memory usage, and cache hit ratios. Comprehensive statistics API for optimization.
72
-
73
- **Why it matters:** Visibility into lazy loading performance helps identify bottlenecks and optimize import strategies.
74
-
75
- ### 🎨 **Two-Dimensional Mode System**
76
-
77
- xwlazy uses a powerful two-dimensional mode system that separates **loading behavior** from **installation behavior**, giving you precise control over how modules are loaded and when packages are installed.
78
-
79
- #### **Lazy Load Modes** (When modules load)
80
- - **NONE:** Standard imports (no lazy loading)
81
- - **AUTO:** Lazy loading enabled (deferred module loading)
82
- - **PRELOAD:** Preload all modules on start (parallel loading)
83
- - **BACKGROUND:** Load modules in background threads (non-blocking)
84
- - **CACHED:** Cache loaded modules but allow unloading
85
-
86
- #### **Lazy Install Modes** (When packages install)
87
- - **NONE:** No auto-installation
88
- - **SMART:** Install on first usage (on-demand)
89
- - **FULL:** Install all dependencies on start (parallel batch)
90
- - **CLEAN:** Install on usage + uninstall after completion
91
- - **TEMPORARY:** Always uninstall after use (aggressive cleanup)
92
- - **SIZE_AWARE:** Install small packages, skip large ones
93
- - **INTERACTIVE:** Ask user before installing
94
- - **WARN:** Log warning but don't install (monitoring mode)
95
- - **DISABLED:** Don't install anything (explicit)
96
- - **DRY_RUN:** Show what would be installed
97
-
98
- #### **Preset Modes** (Quick combinations)
99
- - **none:** NONE load + NONE install (standard imports)
100
- - **lite:** AUTO load + NONE install (lazy loading only)
101
- - **smart:** AUTO load + SMART install (on-demand installation)
102
- - **full:** AUTO load + FULL install (install all on start)
103
- - **clean:** AUTO load + CLEAN install (install + cleanup)
104
- - **temporary:** AUTO load + TEMPORARY install (aggressive cleanup)
105
- - **size_aware:** AUTO load + SIZE_AWARE install (smart sizing)
106
- - **auto:** AUTO load + SMART install + auto-uninstall large packages
107
-
108
- **Why it matters:** Different environments need different policies. Development might use `smart`, production might use `lite` or `warn`, CI/CD might use `clean` or `temporary`.
109
-
110
- ## 🏆 Performance Benchmarks
111
-
112
- xwlazy has been benchmarked against 8 competing lazy import libraries. **Results show xwlazy is competitive across all load scenarios** while providing significantly more features.
113
-
114
- ### Latest Benchmark Results (2025-11-17)
115
-
116
- | Load Type | xwlazy Time | Rank | vs. Winner | Features |
117
- |-----------|-------------|------|------------|----------|
118
- | **Light Load** (1 module) | 2.08 ms | 🥇 **1st** | 2.54x faster | 7 features |
119
- | **Medium Load** (8 modules) | 6.99 ms | 🥇 **1st** | 8.52x faster | 7 features |
120
- | **Heavy Load** (22 modules) | 21.13 ms | 🥇 **1st** | 25.75x faster | 7 features |
121
- | **Enterprise Load** (50+ modules) | 61.28 ms | 🥇 **1st** | 74.66x faster | 7 features |
122
-
123
- **Competitive Advantage:** While competitors offer 1-2 features (basic lazy loading), xwlazy provides **7 enterprise features** including auto-installation, security policies, SBOM generation, and per-package isolation.
124
-
125
- **See full benchmarks:** [benchmarks/competition_tests/output_log/](benchmarks/competition_tests/output_log/)
126
-
127
- ## 🚀 Quick Start
128
-
129
- ### Installation
130
-
131
- ```bash
132
- # Standard installation
133
- pip install exonware-xwlazy
134
-
135
- # Or install as xwlazy (alias package)
136
- pip install xwlazy
137
- ```
138
-
139
- ### Basic Usage
140
-
141
- **One-line setup** for per-package lazy loading:
142
-
143
- ```python
144
- # In your package's __init__.py
145
- from xwlazy.lazy import config_package_lazy_install_enabled
146
-
147
- # Auto-detects from pip install your-package[lazy]
148
- config_package_lazy_install_enabled("your-package")
149
- ```
150
-
151
- **That's it!** Now use standard imports—missing dependencies install automatically:
152
-
153
- ```python
154
- # your-package/serialization/avro.py
155
- import fastavro # Auto-installed if missing! ✨
156
-
157
- # User code
158
- from your-package.serialization.avro import AvroSerializer
159
- serializer = AvroSerializer() # Installs fastavro on first use
160
- ```
161
-
162
- ### Keyword-Based Detection (Zero Code)
163
-
164
- Add to your `pyproject.toml`:
165
-
166
- ```toml
167
- [project]
168
- name = "my-package"
169
- keywords = ["xwlazy-enabled"] # <-- Add this
170
- ```
171
-
172
- After `pip install -e .`, xwlazy automatically enables lazy loading for your package—no code changes needed!
173
-
174
- ## 📖 Documentation
175
-
176
- - **[Architecture Reference](docs/REF_ARCH.md)** - System design, patterns, and structure
177
- - **[Keyword Detection Guide](docs/KEYWORD_DETECTION.md)** - Zero-code integration
178
- - **[Competition Benchmarks](benchmarks/competition_tests/)** - Performance comparisons
179
- - **[Performance Analysis](benchmarks/competition_tests/PERFORMANCE_ANALYSIS.md)** - Optimization recommendations
180
-
181
- ## 💡 Use Cases
182
-
183
- ### 1. Optional Format Support
184
-
185
- ```python
186
- # xwsystem/serialization/avro.py
187
- import fastavro # Only installed if user needs Avro support
188
-
189
- class AvroSerializer:
190
- def serialize(self, data):
191
- return fastavro.schemaless_writer(...)
192
- ```
193
-
194
- **Benefit:** Users who never use Avro don't install fastavro, reducing installation size.
195
-
196
- ### 2. Development Tools
197
-
198
- ```python
199
- # xwnode/visualization/graphviz.py
200
- import graphviz # Only installed in development
201
-
202
- def visualize_graph(node):
203
- return graphviz.render(...)
204
- ```
205
-
206
- **Benefit:** Production deployments don't include development-only dependencies.
207
-
208
- ### 3. Platform-Specific Features
209
-
210
- ```python
211
- # xwdata/formats/excel.py
212
- try:
213
- import openpyxl # Windows/Linux
214
- except ImportError:
215
- import xlrd # macOS fallback
216
- ```
217
-
218
- **Benefit:** Platform-specific dependencies install automatically based on availability.
219
-
220
- ### 4. Security-Controlled Environments
221
-
222
- ```python
223
- from xwlazy.lazy import (
224
- config_package_lazy_install_enabled,
225
- set_package_allow_list,
226
- )
227
-
228
- # Only allow specific packages
229
- config_package_lazy_install_enabled("xwsystem")
230
- set_package_allow_list("xwsystem", ["fastavro", "protobuf", "msgpack"])
231
-
232
- # Attempts to install other packages are blocked
233
- import suspicious_package # ❌ Blocked by security policy
234
- ```
235
-
236
- **Benefit:** Enterprise environments can restrict auto-installation to approved packages only.
237
-
238
- ## 🔧 Advanced Configuration
239
-
240
- ### Two-Dimensional Mode Configuration
241
-
242
- #### Using Preset Modes (Recommended)
243
-
244
- ```python
245
- from xwlazy.lazy import config_package_lazy_install_enabled
246
-
247
- # Quick preset modes
248
- config_package_lazy_install_enabled("xwsystem", enabled=True, mode="smart") # On-demand install
249
- config_package_lazy_install_enabled("xwsystem", enabled=True, mode="full") # Install all on start
250
- config_package_lazy_install_enabled("xwsystem", enabled=True, mode="clean") # Install + cleanup
251
- config_package_lazy_install_enabled("xwsystem", enabled=True, mode="lite") # Lazy load only
252
- ```
253
-
254
- #### Using Explicit Mode Configuration
255
-
256
- ```python
257
- from xwlazy.lazy import (
258
- config_package_lazy_install_enabled,
259
- LazyLoadMode,
260
- LazyInstallMode,
261
- LazyModeConfig,
262
- )
263
-
264
- # Explicit two-dimensional configuration
265
- config_package_lazy_install_enabled(
266
- "xwsystem",
267
- enabled=True,
268
- load_mode=LazyLoadMode.PRELOAD, # Preload all modules
269
- install_mode=LazyInstallMode.SMART # Install on-demand
270
- )
271
-
272
- # Or use LazyModeConfig for full control
273
- config = LazyModeConfig(
274
- load_mode=LazyLoadMode.BACKGROUND,
275
- install_mode=LazyInstallMode.SIZE_AWARE,
276
- large_package_threshold_mb=100.0, # Skip packages > 100MB
277
- background_workers=4 # 4 background workers
278
- )
279
- config_package_lazy_install_enabled(
280
- "xwsystem",
281
- enabled=True,
282
- mode_config=config
283
- )
284
- ```
285
-
286
- #### Using exonware.conf (Global Configuration)
287
-
288
- ```python
289
- import exonware.conf as conf
290
-
291
- # Set global lazy mode for all packages
292
- conf.lazy = "smart" # or "lite", "full", "clean", "auto", etc.
293
- ```
294
-
295
- #### Special Purpose Modes
296
-
297
- ```python
298
- # Interactive mode: Ask user before installing
299
- config_package_lazy_install_enabled(
300
- "xwsystem",
301
- enabled=True,
302
- mode="interactive" # or LazyInstallMode.INTERACTIVE
303
- )
304
-
305
- # Warn mode: Log but don't install (monitoring)
306
- config_package_lazy_install_enabled(
307
- "xwsystem",
308
- enabled=True,
309
- mode="warn" # or LazyInstallMode.WARN
310
- )
311
- ```
312
-
313
- ### Security Policies
314
-
315
- ```python
316
- from xwlazy.lazy import (
317
- set_package_allow_list,
318
- set_package_deny_list,
319
- set_package_lockfile,
320
- )
321
-
322
- # Whitelist approach
323
- set_package_allow_list("xwsystem", ["fastavro", "protobuf"])
324
-
325
- # Blacklist approach
326
- set_package_deny_list("xwsystem", ["suspicious-package"])
327
-
328
- # Track installations
329
- set_package_lockfile("xwsystem", "xwsystem-lazy-lock.json")
330
- ```
331
-
332
- ### SBOM Generation
333
-
334
- ```python
335
- from xwlazy.lazy import generate_package_sbom
336
-
337
- # Generate Software Bill of Materials for compliance
338
- sbom = generate_package_sbom("xwsystem", "xwsystem-sbom.json")
339
- ```
340
-
341
- ### Statistics and Monitoring
342
-
343
- ```python
344
- from xwlazy.lazy import get_lazy_install_stats
345
-
346
- # Get installation statistics
347
- stats = get_lazy_install_stats("xwsystem")
348
- # {
349
- # 'enabled': True,
350
- # 'mode': 'auto',
351
- # 'installed_packages': ['fastavro', 'protobuf'],
352
- # 'failed_packages': [],
353
- # 'total_installed': 2
354
- # }
355
- ```
356
-
357
- ## 🎨 Design Patterns
358
-
359
- xwlazy implements 8 design patterns for maintainability and extensibility:
360
-
361
- 1. **Facade Pattern** - Unified API to complex subsystems
362
- 2. **Strategy Pattern** - Pluggable discovery/installation strategies
363
- 3. **Template Method** - Base classes define common workflows
364
- 4. **Singleton** - Global instances for system-wide state
365
- 5. **Registry** - Per-package isolation and management
366
- 6. **Observer** - Performance monitoring and tracking
367
- 7. **Proxy** - Deferred loading and lazy access
368
- 8. **Factory** - Creating appropriate handlers by context
369
-
370
- ## 🔒 Security Considerations
371
-
372
- ### PEP 668 Compliance
373
- xwlazy respects externally-managed Python environments and refuses to install in system Python, suggesting virtual environments instead.
374
-
375
- ### System Module Protection
376
- Built-in modules (stdlib) are never auto-installed, preventing accidental system modifications.
377
-
378
- ### Vulnerability Scanning
379
- Optional pip-audit integration scans packages after installation and logs security warnings.
380
-
381
- ### Custom PyPI Mirrors
382
- Support for internal PyPI servers with custom index URLs and trusted hosts.
383
-
384
- ## ⚡ Performance Characteristics
385
-
386
- - **Zero overhead** for successful imports (hooks only trigger on failures)
387
- - **Aggressive caching** with file modification time checks
388
- - **Lazy initialization** - everything loads only when needed
389
- - **Thread-safe** operations with proper locking
390
- - **Import overhead:** ~0.1ms for successful imports
391
- - **First failure:** ~50ms (discovery + policy check)
392
- - **Subsequent failures:** ~5ms (cached discovery)
393
-
394
- ## 🧪 Testing
395
-
396
- xwlazy includes comprehensive test suites:
397
-
398
- ```bash
399
- # Run all tests
400
- python tests/runner.py
401
-
402
- # Run specific test layers
403
- python tests/0.core/runner.py # Core tests (< 30s)
404
- python tests/1.unit/runner.py # Unit tests (< 5m)
405
- ```
406
-
407
- ## 📊 Comparison with Competitors
408
-
409
- | Feature | xwlazy | lazy-imports-lite | lazy-loader | lazy_import |
410
- |---------|--------|-------------------|-------------|-------------|
411
- | **Lazy Import** | ✅ | ✅ | ✅ | ✅ |
412
- | **Auto-Installation** | ✅ | ❌ | ❌ | ❌ |
413
- | **Keyword Detection** | ✅ | ✅ | ❌ | ❌ |
414
- | **Per-Package Isolation** | ✅ | ❌ | ❌ | ❌ |
415
- | **Security Policies** | ✅ | ❌ | ❌ | ❌ |
416
- | **SBOM Generation** | ✅ | ❌ | ❌ | ❌ |
417
- | **Performance Monitoring** | ✅ | ❌ | ❌ | ❌ |
418
- | **Two-Stage Loading** | ✅ | ❌ | ❌ | ❌ |
419
- | **Total Features** | **7** | **2** | **1** | **1** |
420
-
421
- ## 🤝 Contributing
422
-
423
- xwlazy is part of the eXonware ecosystem. For contributions, please follow:
424
-
425
- - [Development Guide](../../docs/guides/GUIDE_DEV.md) - Core development standards
426
- - [Testing Guide](../../docs/guides/GUIDE_TEST.md) - Testing standards
427
- - [Documentation Guide](../../docs/guides/GUIDE_DOCS.md) - Documentation standards
428
-
429
- ## 📄 License
430
-
431
- MIT License - see [LICENSE](LICENSE) for details.
432
-
433
- ## 🔗 Links
434
-
435
- - **Homepage:** https://exonware.com
436
- - **Repository:** https://github.com/exonware/xwlazy
437
- - **Email:** connect@exonware.com
438
- - **Author:** Eng. Muhammad AlShehri
439
-
440
- ## 🙏 Acknowledgments
441
-
442
- xwlazy is built with inspiration from the Python lazy import ecosystem, particularly:
443
- - `lazy-imports-lite` for keyword-based detection concept
444
- - `lazy-loader` for scientific Python patterns
445
- - The broader Python import system for hook mechanisms
446
-
447
- ---
448
-
449
- **Part of the eXonware ecosystem** - Enterprise-grade Python libraries for modern software development.
450
-
451
- *Last Updated: 17-Nov-2025*
452
-
453
- > **Note:** For the current version, use `from exonware.xwlazy import __version__` or `import exonware.xwlazy; print(exonware.xwlazy.__version__)`
454
-
@@ -1,93 +0,0 @@
1
- exonware/__init__.py,sha256=Z5ylo10dHQg7hAtnzQA3sVtXhE9zbvD-gZq_ZJjmf4Y,1534
2
- exonware/xwlazy/__init__.py,sha256=v7YYx3YqnzjWrlUM-5FHbTpoVWyytdRizq75txsaheY,10696
3
- exonware/xwlazy/config.py,sha256=v3nNIaKHXNjCJ-7XLJdThwQbMYUjjj7Trv2pC706c1k,6235
4
- exonware/xwlazy/contracts.py,sha256=5krfdlc5g6VUsGXDMh1AGzYEyL45r4_xMzZg2DiivJs,47817
5
- exonware/xwlazy/defs.py,sha256=dLQZ-pgmhg327hAGVj6cEVWZPHqgiY686xoKqXhHFYA,12271
6
- exonware/xwlazy/errors.py,sha256=2a-FMiQa4h-m7SCqo19a7h09zGiAHClnuZCGKgvYO0I,9188
7
- exonware/xwlazy/facade.py,sha256=n0RrP0x3PGws6fapXRvDBtPDvo08u-Kdb8M87b2DRRE,44277
8
- exonware/xwlazy/version.py,sha256=YdFh6cqPW4S9Czaf4u9T8Bav82_dnc8KzSISQa40Ok0,2349
9
- exonware/xwlazy/common/__init__.py,sha256=bHh5BIOzhFuHiaLUb6rMzWTrLyPBoe874ijEK-oZCnA,990
10
- exonware/xwlazy/common/base.py,sha256=ZFKttjXsLnXY8E4QWKv9cs1Efs6r3QFAAmc4kgzB4HY,1706
11
- exonware/xwlazy/common/cache.py,sha256=E7geqxgj8dCp1Op711R5n1k_TCsYG-oO0-Cf9vuDKww,17523
12
- exonware/xwlazy/common/logger.py,sha256=FChtilC2mopK7w42l8lcIY6mVsakyw9bWaFyaNNDh6w,8344
13
- exonware/xwlazy/common/utils.py,sha256=2kYDH2lMHivmIeLSDkKoeGvBwtUrbcmjqU9wf1Qccjw,4412
14
- exonware/xwlazy/common/services/__init__.py,sha256=LgoL5PdLdaanKKkw1WghiNirLIFpkSkExlXWBezGZdc,1774
15
- exonware/xwlazy/common/services/dependency_mapper.py,sha256=zMEX_BQfnv_TvxWefWuHDND5qEeLsQh2IOr4cRWzbKM,9487
16
- exonware/xwlazy/common/services/install_async_utils.py,sha256=nKdSXEU6aBsNmpcUeznhQtkGqp-QM2-UnQJG5ZG0BHU,5234
17
- exonware/xwlazy/common/services/install_cache_utils.py,sha256=IUVfjHazQcV549Je9XSMYY13ZPJL-LjRx-n0SSfZL5E,7583
18
- exonware/xwlazy/common/services/keyword_detection.py,sha256=B-Wo_KArhsZSUb_XNSnJjcoZob6l4BrBYyXf5ixk444,9776
19
- exonware/xwlazy/common/services/spec_cache.py,sha256=xhn-hPPfMkRfzmVR9xhyvFOr-Y6VOSm3LZzUJqcTutE,5311
20
- exonware/xwlazy/common/services/state_manager.py,sha256=mP1ojTduYdbPe3f_K_unWKYEMWseaMPslFfNTfnvfi0,3110
21
- exonware/xwlazy/common/strategies/__init__.py,sha256=4GERnc2Ktj_DiMHn0UUqdXcY5nGedbZer9vPhKQyf9I,633
22
- exonware/xwlazy/common/strategies/caching_dict.py,sha256=n3P8hGGFoc2Qun7ToJg44JBDE8xo4lq_mEPyWZXLc24,1120
23
- exonware/xwlazy/common/strategies/caching_installation.py,sha256=uamdlsXbbf_rkz3O5z9MlMlmTKYF2i_-G7ZiOP62Zyk,2523
24
- exonware/xwlazy/common/strategies/caching_lfu.py,sha256=u1Yg727EH4GSpgww7izf1wJtjEBXRIHLfiyivDqwR8o,1965
25
- exonware/xwlazy/common/strategies/caching_lru.py,sha256=5ibtwtmZSJsz9rlga3p8MIIdfAUTidhUCuSWHbFU4Jk,1832
26
- exonware/xwlazy/common/strategies/caching_multitier.py,sha256=HpFYjc-8-suosexfpwrw9NQyZSdKh0Nd3KT4E7MjC0Y,1910
27
- exonware/xwlazy/common/strategies/caching_ttl.py,sha256=8MN-LmFo_KlBKsChcncGJE7XcOJmDXtS60lDOzciqZM,1624
28
- exonware/xwlazy/host/__init__.py,sha256=E_yKdB9bTOcVdqoq9mAfroj59NruKQpQ_ZsMUD4GRuc,132
29
- exonware/xwlazy/host/conf.py,sha256=HA6n6fUTLoBf3_hmINZH0td87SFBFQkQ9CJAbStpiVk,390
30
- exonware/xwlazy/module/__init__.py,sha256=sL_G0RvpMfif0e3Yzo0CSj2xAPPF6phlQB367agzqfE,627
31
- exonware/xwlazy/module/base.py,sha256=qxxRBRxXVo6cG8UZXlV6Br-ypMdM8h9p6mBw4uOurKQ,21230
32
- exonware/xwlazy/module/data.py,sha256=Q3xNBQgHM_AlMvujkx_YmVT3H1Fr-6xUqryTlWClbp8,318
33
- exonware/xwlazy/module/facade.py,sha256=raLJ157QNE0MkNgBJCIFgErMqVwswjQkngAoreTBJE4,8083
34
- exonware/xwlazy/module/importer_engine.py,sha256=Ot05QVie8mWnEAqYAQjfoTICDX-UPvkfCrEtq3tuI0c,135417
35
- exonware/xwlazy/module/partial_module_detector.py,sha256=te5wngd5fyEBkLBd8F7-qlsez9hR61QDtCTGhOjOvvI,11986
36
- exonware/xwlazy/module/strategies/__init__.py,sha256=oV49bhWlErG197Y7yKcUzm4acDvfGnVm77lcNLgAu5I,467
37
- exonware/xwlazy/module/strategies/module_helper_lazy.py,sha256=yGx-rr9M5SNmnQpfg533QSSytEfAfwXA0qDC2Z-ZEGc,2673
38
- exonware/xwlazy/module/strategies/module_helper_simple.py,sha256=Hu3z5X_Fg24jZuumUmV8mk1bFyrNu85gUgSR-YHHUZI,1683
39
- exonware/xwlazy/module/strategies/module_manager_advanced.py,sha256=lMkfFZlExpGUTDKpZAmxAXX5Cely4qy5l3yPl0rD0Hs,3293
40
- exonware/xwlazy/module/strategies/module_manager_simple.py,sha256=zKkWSZXpz0gZAftkaQZVfjdh3zpHvdLhHik5iOLZGXc,2442
41
- exonware/xwlazy/package/__init__.py,sha256=UI7xwTbFDURAt7kCr3yRhZzZtFrWRDwhJXakSyJwSCU,640
42
- exonware/xwlazy/package/base.py,sha256=BhYIV8FCABlgyVhPIQCVzxQxojEN1A1vN91QjLfFADw,29472
43
- exonware/xwlazy/package/conf.py,sha256=2_AuyQOruVCUVVd4DBh0bWqdXdsncqiyf8638s5J7H4,14090
44
- exonware/xwlazy/package/data.py,sha256=3TFb_Qr6HJfQSCBG4Kg9-dIbyrt76zpMnAFoD0ZdTEA,323
45
- exonware/xwlazy/package/facade.py,sha256=r5hW0ve2FQ6oqspCPts3ZHFA-cvNQcsCBZVjfClpVkw,18743
46
- exonware/xwlazy/package/services/__init__.py,sha256=ydB2kRzx6I3Kpm-bYyecTwHdkE_544X0CAXHZh7AyZY,2240
47
- exonware/xwlazy/package/services/async_install_handle.py,sha256=TN7iYUOPiTGG-xXtPjdFTIZ7-_IEn0vYeWK-EuEhlNU,2803
48
- exonware/xwlazy/package/services/config_manager.py,sha256=QpZSPdLaZgyU_M4P5socG9Oq6hK2_GDOM9__aSE__aU,10737
49
- exonware/xwlazy/package/services/discovery.py,sha256=H4b4emTKAgNkhPWM3IL051RnE7Prrb_7qA0n-8ldJtU,16717
50
- exonware/xwlazy/package/services/host_packages.py,sha256=GrD02dj9A81aXI8dc1q7yTbbCvxcbvYIdzqcyej2Lwk,6984
51
- exonware/xwlazy/package/services/install_async.py,sha256=pegNvdS60BAojWUXTVXLHLZvYBx9T3IP8dcstHU2Wzw,13822
52
- exonware/xwlazy/package/services/install_cache.py,sha256=grG_N4gFYYXVrU1CtRdlXGdg0-NitM0OJCYxbeUjtXM,5968
53
- exonware/xwlazy/package/services/install_interactive.py,sha256=5tvVeogm9wIVG6u8jiSSpmXiPt1wXMtdTAETjsZ3QBE,2155
54
- exonware/xwlazy/package/services/install_policy.py,sha256=xhZYSuj46Gh0JV0cYy8N6wWYR2LzOtEy4SjBaFe7zLg,5852
55
- exonware/xwlazy/package/services/install_registry.py,sha256=lv-j6Q2bd7LWTM-CSx0y2EiRwa02-iZN2l_5fdW8A0k,1498
56
- exonware/xwlazy/package/services/install_result.py,sha256=MeXi-B9QBO1uZlyUbCBDNu_LBoYYQiInWoIDLQ0BVCs,346
57
- exonware/xwlazy/package/services/install_sbom.py,sha256=81DBX8okE7f5EHtkKOSPOkGKozYYagFFq_ZsVYh2f3U,5566
58
- exonware/xwlazy/package/services/install_utils.py,sha256=T1KeU3fbyNFYdYjeBWUIfWwTSQ6WHASVl-zSDDvxrvI,2371
59
- exonware/xwlazy/package/services/installer_engine.py,sha256=pG3FZbiDs2Ipr_-3VNxBbiAu_yjvO7peo_G4_DCyATM,15346
60
- exonware/xwlazy/package/services/lazy_installer.py,sha256=F-GBqQThekwAkfAtT51lt3SLLGvbCGSryDi7agsq4vA,37120
61
- exonware/xwlazy/package/services/manifest.py,sha256=jRaTBkLN0lj910G7bfewREZANZOcU4GQn8myFVpifcs,19482
62
- exonware/xwlazy/package/services/strategy_registry.py,sha256=Yp2SFlwFqQ2E76AOhqNMlmhdVIaXoXnYtVGVhFP30Xc,11898
63
- exonware/xwlazy/package/strategies/__init__.py,sha256=r_gpreZ6kcsWfHkGABYlZVx69JdvbMwlftitAKEwbrA,1626
64
- exonware/xwlazy/package/strategies/package_discovery_file.py,sha256=BJpQ6sHpxt7YGFp4qwntZT3owKfQ6vjgXFhtDzk0-lE,4388
65
- exonware/xwlazy/package/strategies/package_discovery_hybrid.py,sha256=P3Xt3Q20sU64nLkz4iM9GJ6Y7HgSXgSYTGNndSl5yKw,2648
66
- exonware/xwlazy/package/strategies/package_discovery_manifest.py,sha256=cvbA5Wjs9FHNhyWOL1aRjrMpCsLVTzd1Fezz8Gzj8OY,3362
67
- exonware/xwlazy/package/strategies/package_execution_async.py,sha256=0Xmw4azF_VkNXyqqkWVPbUJndGMGJT7aBdudaLIbl6A,3638
68
- exonware/xwlazy/package/strategies/package_execution_cached.py,sha256=X_eWz6YHe35FKOlXhbrKpwB8WZ2JNxVJPn2eV0BRrpE,2674
69
- exonware/xwlazy/package/strategies/package_execution_pip.py,sha256=Gd91NdUC32Bad47XnXB_969DdMOw6B8DLWVoaDvuRF4,2957
70
- exonware/xwlazy/package/strategies/package_execution_wheel.py,sha256=c5ggH0Wo71Ed-9YiFTKH1gCIPpjiiAByytCDecE7M6A,3203
71
- exonware/xwlazy/package/strategies/package_mapping_discovery_first.py,sha256=QN4cK8r6h_vOHLn23NCh3NDcTGaodOgAQck_4a0QvJQ,3273
72
- exonware/xwlazy/package/strategies/package_mapping_hybrid.py,sha256=GC7qB4El9NteyGrkl0IrwLiRtm6i_ylLH59vHk0U3ug,3393
73
- exonware/xwlazy/package/strategies/package_mapping_manifest_first.py,sha256=QLBPlZd_O31TmXPRW7Ef99XLd__lO-hF1zrIMc9z8ZE,3298
74
- exonware/xwlazy/package/strategies/package_policy_allow_list.py,sha256=70lcCngXHsrj_As54XcLtUvHWamRM6hMbVD2Tyn1Osk,1539
75
- exonware/xwlazy/package/strategies/package_policy_deny_list.py,sha256=mwdzAwsoIl5P0oB6jJgMXbK1zatBApbSF8WeTqG-ss8,1499
76
- exonware/xwlazy/package/strategies/package_policy_permissive.py,sha256=Ufy1AAzjGtw3JGE2sOTj3aBzW_egqCXoSVqdeT9vO2U,1115
77
- exonware/xwlazy/package/strategies/package_timing_clean.py,sha256=uO9FySvZhPBm0qL3QMxZwz7G7J-otBoQEwaZrF8tqbk,1820
78
- exonware/xwlazy/package/strategies/package_timing_full.py,sha256=zsC59K9Yduu3hinBYXrUN9QbFVkCCrKjgyf_leHhNj4,1730
79
- exonware/xwlazy/package/strategies/package_timing_smart.py,sha256=Jx2vl15z25_-kVU2-52_AmU8s2hHLnWick1DvD1kCDo,1829
80
- exonware/xwlazy/package/strategies/package_timing_temporary.py,sha256=qCaQIvcXWoSW-cbhK2cWeV1dcwnmf3re9YZf4iVFK_o,1789
81
- exonware/xwlazy/runtime/__init__.py,sha256=jbIzemqwtWvKu2LxhYU7pIcihNakQHCON8xZW0orqZA,636
82
- exonware/xwlazy/runtime/adaptive_learner.py,sha256=XABWIYeqV2y-kDlKglbtdTfVhQmR9mhcEWiLdiA6-EE,5237
83
- exonware/xwlazy/runtime/base.py,sha256=s4sJMYXItsK3H5gVJ3DdyVQ2IOYdOeGN-CftqlHHKjM,10000
84
- exonware/xwlazy/runtime/facade.py,sha256=wqWYegq1ZEKSXXrE0u7q9dK4wcHqDbQFbgGf_WENqR4,3396
85
- exonware/xwlazy/runtime/intelligent_selector.py,sha256=jJrYWhB4zQYnubvthHFapCYmX-YVSZEaB9nnZt2AXXw,6518
86
- exonware/xwlazy/runtime/metrics.py,sha256=QXJfNk_QMqMlRWly59Nc6trsi_kx6HFoLAWx22KfEfY,1975
87
- exonware/xwlazy/runtime/performance.py,sha256=LJ_9SQAu9pPWeLGS-Ez0mZ9zpQ8kTPwrSqHACeNcdv0,1192
88
- xwlazy/__init__.py,sha256=JJzHnerhs7VlR3RPRWokZ7J7rfucXzsyozu48IAePpE,340
89
- xwlazy/lazy.py,sha256=Seg1vQCVmFiag0nKduSqAxkGjc3BBjC-Ph2Fuof2r8s,696
90
- exonware_xwlazy-0.1.0.1.dist-info/METADATA,sha256=zNBXe3d93r3OMCczm7YUW-C6Vxqe3KJRe6jKLr0lnGU,16657
91
- exonware_xwlazy-0.1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
92
- exonware_xwlazy-0.1.0.1.dist-info/licenses/LICENSE,sha256=w42ohoEUfhyT0NgiivAL4fWg2AMRLGnfXPMAR4EO-MU,1094
93
- exonware_xwlazy-0.1.0.1.dist-info/RECORD,,
xwlazy/__init__.py DELETED
@@ -1,14 +0,0 @@
1
- """
2
- Compatibility package for xwlazy imports.
3
-
4
- This package provides backward compatibility for packages that import
5
- from xwlazy instead of exonware.xwlazy.
6
-
7
- Company: eXonware.com
8
- Author: Eng. Muhammad AlShehri
9
- Email: connect@exonware.com
10
- """
11
-
12
- # Re-export everything from the main package
13
- from exonware.xwlazy import * # noqa: F401, F403
14
-
xwlazy/lazy.py DELETED
@@ -1,30 +0,0 @@
1
- """
2
- Compatibility module for xwlazy.lazy imports.
3
-
4
- This module provides backward compatibility for packages that import
5
- from xwlazy.lazy instead of exonware.xwlazy.
6
-
7
- Company: eXonware.com
8
- Author: Eng. Muhammad AlShehri
9
- Email: connect@exonware.com
10
- """
11
-
12
- # Re-export commonly used functions from the main package
13
- from exonware.xwlazy import (
14
- xwimport,
15
- config_package_lazy_install_enabled,
16
- config_module_lazy_load_enabled,
17
- enable_lazy_mode,
18
- disable_lazy_mode,
19
- is_lazy_mode_enabled,
20
- )
21
-
22
- __all__ = [
23
- 'xwimport',
24
- 'config_package_lazy_install_enabled',
25
- 'config_module_lazy_load_enabled',
26
- 'enable_lazy_mode',
27
- 'disable_lazy_mode',
28
- 'is_lazy_mode_enabled',
29
- ]
30
-