exonware-xwlazy 0.1.0.19__py3-none-any.whl → 0.1.0.20__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.
- exonware/__init__.py +6 -2
- exonware/xwlazy/__init__.py +0 -1
- exonware/xwlazy/common/__init__.py +1 -1
- exonware/xwlazy/common/base.py +1 -3
- exonware/xwlazy/common/cache.py +1 -3
- exonware/xwlazy/common/logger.py +1 -12
- exonware/xwlazy/common/services/dependency_mapper.py +0 -2
- exonware/xwlazy/common/services/install_async_utils.py +1 -5
- exonware/xwlazy/common/services/install_cache_utils.py +1 -13
- exonware/xwlazy/common/services/keyword_detection.py +0 -9
- exonware/xwlazy/common/services/spec_cache.py +1 -9
- exonware/xwlazy/common/services/state_manager.py +0 -2
- exonware/xwlazy/common/strategies/__init__.py +1 -1
- exonware/xwlazy/common/strategies/caching_dict.py +1 -2
- exonware/xwlazy/common/strategies/caching_installation.py +1 -2
- exonware/xwlazy/common/strategies/caching_lfu.py +1 -2
- exonware/xwlazy/common/strategies/caching_lru.py +1 -2
- exonware/xwlazy/common/strategies/caching_multitier.py +1 -2
- exonware/xwlazy/common/strategies/caching_ttl.py +1 -2
- exonware/xwlazy/config.py +1 -3
- exonware/xwlazy/contracts.py +1 -15
- exonware/xwlazy/defs.py +0 -19
- exonware/xwlazy/errors.py +1 -9
- exonware/xwlazy/facade.py +1 -59
- exonware/xwlazy/module/base.py +1 -5
- exonware/xwlazy/module/data.py +1 -1
- exonware/xwlazy/module/facade.py +0 -1
- exonware/xwlazy/module/importer_engine.py +1 -45
- exonware/xwlazy/module/strategies/__init__.py +1 -1
- exonware/xwlazy/module/strategies/module_helper_lazy.py +1 -2
- exonware/xwlazy/module/strategies/module_helper_simple.py +1 -2
- exonware/xwlazy/module/strategies/module_manager_advanced.py +1 -2
- exonware/xwlazy/module/strategies/module_manager_simple.py +1 -2
- exonware/xwlazy/package/base.py +1 -10
- exonware/xwlazy/package/conf.py +1 -8
- exonware/xwlazy/package/data.py +1 -1
- exonware/xwlazy/package/facade.py +0 -1
- exonware/xwlazy/package/services/async_install_handle.py +1 -3
- exonware/xwlazy/package/services/config_manager.py +0 -1
- exonware/xwlazy/package/services/discovery.py +1 -5
- exonware/xwlazy/package/services/host_packages.py +0 -4
- exonware/xwlazy/package/services/install_async.py +1 -2
- exonware/xwlazy/package/services/install_cache.py +1 -2
- exonware/xwlazy/package/services/install_interactive.py +1 -2
- exonware/xwlazy/package/services/install_policy.py +1 -3
- exonware/xwlazy/package/services/install_registry.py +1 -3
- exonware/xwlazy/package/services/install_result.py +1 -1
- exonware/xwlazy/package/services/install_sbom.py +1 -2
- exonware/xwlazy/package/services/install_utils.py +1 -5
- exonware/xwlazy/package/services/installer_engine.py +1 -3
- exonware/xwlazy/package/services/lazy_installer.py +1 -3
- exonware/xwlazy/package/services/manifest.py +0 -10
- exonware/xwlazy/package/services/strategy_registry.py +1 -3
- exonware/xwlazy/package/strategies/package_discovery_file.py +1 -2
- exonware/xwlazy/package/strategies/package_discovery_hybrid.py +1 -2
- exonware/xwlazy/package/strategies/package_discovery_manifest.py +1 -2
- exonware/xwlazy/package/strategies/package_execution_async.py +1 -2
- exonware/xwlazy/package/strategies/package_execution_cached.py +1 -2
- exonware/xwlazy/package/strategies/package_execution_pip.py +1 -2
- exonware/xwlazy/package/strategies/package_execution_wheel.py +1 -2
- exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +1 -2
- exonware/xwlazy/package/strategies/package_mapping_hybrid.py +1 -2
- exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +1 -2
- exonware/xwlazy/package/strategies/package_policy_allow_list.py +1 -2
- exonware/xwlazy/package/strategies/package_policy_deny_list.py +1 -2
- exonware/xwlazy/package/strategies/package_policy_permissive.py +1 -2
- exonware/xwlazy/package/strategies/package_timing_clean.py +1 -2
- exonware/xwlazy/package/strategies/package_timing_full.py +1 -2
- exonware/xwlazy/package/strategies/package_timing_smart.py +1 -2
- exonware/xwlazy/package/strategies/package_timing_temporary.py +1 -2
- exonware/xwlazy/runtime/adaptive_learner.py +1 -3
- exonware/xwlazy/runtime/base.py +1 -3
- exonware/xwlazy/runtime/facade.py +0 -1
- exonware/xwlazy/runtime/intelligent_selector.py +1 -4
- exonware/xwlazy/runtime/metrics.py +0 -4
- exonware/xwlazy/runtime/performance.py +0 -2
- exonware/xwlazy/version.py +2 -2
- {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/METADATA +4 -2
- exonware_xwlazy-0.1.0.20.dist-info/RECORD +87 -0
- exonware_xwlazy-0.1.0.19.dist-info/RECORD +0 -87
- {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/WHEEL +0 -0
- {exonware_xwlazy-0.1.0.19.dist-info → exonware_xwlazy-0.1.0.20.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,7 +4,7 @@ Interactive Installation Mixin
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Mixin for interactive user prompts during installation.
|
|
@@ -15,7 +15,6 @@ from typing import TYPE_CHECKING
|
|
|
15
15
|
if TYPE_CHECKING:
|
|
16
16
|
from .lazy_installer import LazyInstaller
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
class InteractiveInstallMixin:
|
|
20
19
|
"""Mixin for interactive user prompts during installation."""
|
|
21
20
|
|
|
@@ -4,7 +4,7 @@ Install Policy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Security and policy configuration for lazy installation.
|
|
@@ -21,7 +21,6 @@ def _get_log_event():
|
|
|
21
21
|
|
|
22
22
|
_log = None # Will be initialized on first use
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
class LazyInstallPolicy:
|
|
26
25
|
"""
|
|
27
26
|
Security and policy configuration for lazy installation.
|
|
@@ -153,6 +152,5 @@ class LazyInstallPolicy:
|
|
|
153
152
|
with cls._lock:
|
|
154
153
|
return cls._lockfile_paths.get(package_name)
|
|
155
154
|
|
|
156
|
-
|
|
157
155
|
__all__ = ['LazyInstallPolicy']
|
|
158
156
|
|
|
@@ -4,7 +4,7 @@ Installer Registry
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Registry to manage separate lazy installer instances per package.
|
|
@@ -16,7 +16,6 @@ from typing import Dict, TYPE_CHECKING
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from .lazy_installer import LazyInstaller
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
class LazyInstallerRegistry:
|
|
21
20
|
"""Registry to manage separate lazy installer instances per package."""
|
|
22
21
|
_instances: Dict[str, 'LazyInstaller'] = {}
|
|
@@ -51,6 +50,5 @@ class LazyInstallerRegistry:
|
|
|
51
50
|
with cls._lock:
|
|
52
51
|
return cls._instances.copy()
|
|
53
52
|
|
|
54
|
-
|
|
55
53
|
__all__ = ['LazyInstallerRegistry']
|
|
56
54
|
|
|
@@ -4,7 +4,7 @@ SBOM and Audit Mixin
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Mixin for SBOM generation and vulnerability auditing.
|
|
@@ -41,7 +41,6 @@ def _ensure_logging_initialized():
|
|
|
41
41
|
if _log is None:
|
|
42
42
|
_log = _get_log_event()
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
class SBOMAuditMixin:
|
|
46
45
|
"""Mixin for SBOM generation and vulnerability auditing."""
|
|
47
46
|
|
|
@@ -4,7 +4,7 @@ Installation Utilities
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Utility functions for installation operations.
|
|
@@ -17,7 +17,6 @@ import subprocess
|
|
|
17
17
|
from pathlib import Path
|
|
18
18
|
from typing import Optional
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
def get_trigger_file() -> Optional[str]:
|
|
22
21
|
"""
|
|
23
22
|
Get the file that triggered the import (from call stack).
|
|
@@ -48,7 +47,6 @@ def get_trigger_file() -> Optional[str]:
|
|
|
48
47
|
pass
|
|
49
48
|
return None
|
|
50
49
|
|
|
51
|
-
|
|
52
50
|
def is_externally_managed() -> bool:
|
|
53
51
|
"""
|
|
54
52
|
Check if Python environment is externally managed (PEP 668).
|
|
@@ -59,7 +57,6 @@ def is_externally_managed() -> bool:
|
|
|
59
57
|
marker_file = Path(sys.prefix) / "EXTERNALLY-MANAGED"
|
|
60
58
|
return marker_file.exists()
|
|
61
59
|
|
|
62
|
-
|
|
63
60
|
def check_pip_audit_available() -> bool:
|
|
64
61
|
"""
|
|
65
62
|
Check if pip-audit is available for vulnerability scanning.
|
|
@@ -78,6 +75,5 @@ def check_pip_audit_available() -> bool:
|
|
|
78
75
|
except Exception:
|
|
79
76
|
return False
|
|
80
77
|
|
|
81
|
-
|
|
82
78
|
__all__ = ['get_trigger_file', 'is_externally_managed', 'check_pip_audit_available']
|
|
83
79
|
|
|
@@ -4,7 +4,7 @@ Installer Engine
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Unified async execution engine for install operations.
|
|
@@ -31,7 +31,6 @@ def _get_logger():
|
|
|
31
31
|
|
|
32
32
|
logger = None # Will be initialized on first use
|
|
33
33
|
|
|
34
|
-
|
|
35
34
|
class InstallerEngine:
|
|
36
35
|
"""
|
|
37
36
|
Unified async execution engine for install operations.
|
|
@@ -403,6 +402,5 @@ class InstallerEngine:
|
|
|
403
402
|
"""Get current installation mode."""
|
|
404
403
|
return self._mode
|
|
405
404
|
|
|
406
|
-
|
|
407
405
|
__all__ = ['InstallerEngine']
|
|
408
406
|
|
|
@@ -4,7 +4,7 @@ Lazy Installer
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Lazy installer that automatically installs missing packages on import failure.
|
|
@@ -115,7 +115,6 @@ def _ensure_logging_initialized():
|
|
|
115
115
|
if _spec_cache_clear is None:
|
|
116
116
|
_spec_cache_clear = _get_spec_cache_clear()
|
|
117
117
|
|
|
118
|
-
|
|
119
118
|
class LazyInstaller(
|
|
120
119
|
APackageHelper,
|
|
121
120
|
InteractiveInstallMixin,
|
|
@@ -715,6 +714,5 @@ class LazyInstaller(
|
|
|
715
714
|
"""Check if cache entry is still valid."""
|
|
716
715
|
return self._is_cache_valid()
|
|
717
716
|
|
|
718
|
-
|
|
719
717
|
__all__ = ['LazyInstaller']
|
|
720
718
|
|
|
@@ -42,11 +42,9 @@ DEFAULT_MANIFEST_FILENAMES: Tuple[str, ...] = (
|
|
|
42
42
|
|
|
43
43
|
ENV_MANIFEST_PATH = "XWLAZY_MANIFEST_PATH"
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
def _normalize_package_name(package_name: Optional[str]) -> str:
|
|
47
46
|
return (package_name or "global").strip().lower()
|
|
48
47
|
|
|
49
|
-
|
|
50
48
|
def _normalize_prefix(prefix: str) -> str:
|
|
51
49
|
prefix = prefix.strip()
|
|
52
50
|
if not prefix:
|
|
@@ -55,7 +53,6 @@ def _normalize_prefix(prefix: str) -> str:
|
|
|
55
53
|
prefix = f"{prefix}."
|
|
56
54
|
return prefix
|
|
57
55
|
|
|
58
|
-
|
|
59
56
|
def _normalize_wrap_hints(values: Iterable[Any]) -> List[str]:
|
|
60
57
|
hints: List[str] = []
|
|
61
58
|
for value in values:
|
|
@@ -66,11 +63,9 @@ def _normalize_wrap_hints(values: Iterable[Any]) -> List[str]:
|
|
|
66
63
|
hints.append(hint)
|
|
67
64
|
return hints
|
|
68
65
|
|
|
69
|
-
|
|
70
66
|
# PackageManifest moved to defs.py - import it from there
|
|
71
67
|
from ...defs import PackageManifest
|
|
72
68
|
|
|
73
|
-
|
|
74
69
|
class LazyManifestLoader:
|
|
75
70
|
"""
|
|
76
71
|
Loads and caches manifest data per package.
|
|
@@ -456,11 +451,9 @@ class LazyManifestLoader:
|
|
|
456
451
|
"wrap_class_prefixes": ordered_wrap_hints,
|
|
457
452
|
}
|
|
458
453
|
|
|
459
|
-
|
|
460
454
|
_manifest_loader: Optional[LazyManifestLoader] = None
|
|
461
455
|
_manifest_loader_lock = RLock()
|
|
462
456
|
|
|
463
|
-
|
|
464
457
|
def get_manifest_loader() -> LazyManifestLoader:
|
|
465
458
|
"""
|
|
466
459
|
Return the process-wide manifest loader instance.
|
|
@@ -475,13 +468,11 @@ def get_manifest_loader() -> LazyManifestLoader:
|
|
|
475
468
|
_manifest_loader = LazyManifestLoader()
|
|
476
469
|
return _manifest_loader
|
|
477
470
|
|
|
478
|
-
|
|
479
471
|
def refresh_manifest_cache() -> None:
|
|
480
472
|
"""Forcefully clear the shared manifest loader cache."""
|
|
481
473
|
loader = get_manifest_loader()
|
|
482
474
|
loader.clear_cache()
|
|
483
475
|
|
|
484
|
-
|
|
485
476
|
def sync_manifest_configuration(package_name: str) -> None:
|
|
486
477
|
"""
|
|
487
478
|
Sync configuration from manifest for a specific package.
|
|
@@ -495,7 +486,6 @@ def sync_manifest_configuration(package_name: str) -> None:
|
|
|
495
486
|
loader = get_manifest_loader()
|
|
496
487
|
loader.sync_manifest_configuration(package_name)
|
|
497
488
|
|
|
498
|
-
|
|
499
489
|
__all__ = [
|
|
500
490
|
"PackageManifest",
|
|
501
491
|
"LazyManifestLoader",
|
|
@@ -4,7 +4,7 @@ Strategy Registry
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Registry to store custom strategies per package for both package and module operations.
|
|
@@ -25,7 +25,6 @@ if TYPE_CHECKING:
|
|
|
25
25
|
ICachingStrategy,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
class StrategyRegistry:
|
|
30
29
|
"""Registry to store custom strategies per package."""
|
|
31
30
|
|
|
@@ -183,6 +182,5 @@ class StrategyRegistry:
|
|
|
183
182
|
cls.clear_package_strategies(package_name)
|
|
184
183
|
cls.clear_module_strategies(package_name)
|
|
185
184
|
|
|
186
|
-
|
|
187
185
|
__all__ = ['StrategyRegistry']
|
|
188
186
|
|
|
@@ -4,7 +4,7 @@ File-Based Discovery Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
File-based discovery - discovers dependencies from project files.
|
|
@@ -14,7 +14,6 @@ from pathlib import Path
|
|
|
14
14
|
from typing import Dict, Optional, Any
|
|
15
15
|
from ...package.base import ADiscoveryStrategy
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class FileBasedDiscovery(ADiscoveryStrategy):
|
|
19
18
|
"""
|
|
20
19
|
File-based discovery strategy - discovers dependencies from project files.
|
|
@@ -4,7 +4,7 @@ Hybrid Discovery Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Hybrid discovery - combines file-based and manifest-based discovery.
|
|
@@ -16,7 +16,6 @@ from ...package.base import ADiscoveryStrategy
|
|
|
16
16
|
from .package_discovery_file import FileBasedDiscovery
|
|
17
17
|
from .package_discovery_manifest import ManifestBasedDiscovery
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
class HybridDiscovery(ADiscoveryStrategy):
|
|
21
20
|
"""
|
|
22
21
|
Hybrid discovery strategy - combines file-based and manifest-based discovery.
|
|
@@ -4,7 +4,7 @@ Manifest-Based Discovery Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Manifest-based discovery - discovers dependencies from manifest files.
|
|
@@ -14,7 +14,6 @@ from pathlib import Path
|
|
|
14
14
|
from typing import Dict, Optional, Any
|
|
15
15
|
from ...package.base import ADiscoveryStrategy
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class ManifestBasedDiscovery(ADiscoveryStrategy):
|
|
19
18
|
"""
|
|
20
19
|
Manifest-based discovery strategy - discovers dependencies from manifest files.
|
|
@@ -4,7 +4,7 @@ Async Execution Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Async execution strategy - async pip install using asyncio.
|
|
@@ -19,7 +19,6 @@ from ...package.base import AInstallExecutionStrategy
|
|
|
19
19
|
from ...package.services.install_result import InstallResult, InstallStatus
|
|
20
20
|
from ...common.services.install_async_utils import async_install_package
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
class AsyncExecution(AInstallExecutionStrategy):
|
|
24
23
|
"""
|
|
25
24
|
Async execution strategy - installs packages asynchronously using asyncio.
|
|
@@ -4,7 +4,7 @@ Cached Execution Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Cached execution strategy - install from cached tree.
|
|
@@ -22,7 +22,6 @@ from ...common.services.install_cache_utils import (
|
|
|
22
22
|
install_from_cached_tree,
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
|
|
26
25
|
class CachedExecution(AInstallExecutionStrategy):
|
|
27
26
|
"""
|
|
28
27
|
Cached execution strategy - installs packages from cached installation tree.
|
|
@@ -4,7 +4,7 @@ Pip Execution Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Pip execution strategy - direct pip install.
|
|
@@ -16,7 +16,6 @@ from typing import List, Any
|
|
|
16
16
|
from ...package.base import AInstallExecutionStrategy
|
|
17
17
|
from ...package.services.install_result import InstallResult, InstallStatus
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
class PipExecution(AInstallExecutionStrategy):
|
|
21
20
|
"""
|
|
22
21
|
Pip execution strategy - installs packages directly using pip.
|
|
@@ -4,7 +4,7 @@ Wheel Execution Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Wheel execution strategy - install from wheel files.
|
|
@@ -23,7 +23,6 @@ from ...common.services.install_cache_utils import (
|
|
|
23
23
|
pip_install_from_path,
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
class WheelExecution(AInstallExecutionStrategy):
|
|
28
27
|
"""
|
|
29
28
|
Wheel execution strategy - installs packages from wheel files.
|
|
@@ -4,7 +4,7 @@ Discovery-First Mapping Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Discovery-first mapping strategy - discovery takes precedence over manifest.
|
|
@@ -14,7 +14,6 @@ from typing import Optional, List
|
|
|
14
14
|
from ...package.base import AMappingStrategy
|
|
15
15
|
from ...package.services.manifest import get_manifest_loader
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class DiscoveryFirstMapping(AMappingStrategy):
|
|
19
18
|
"""
|
|
20
19
|
Discovery-first mapping strategy.
|
|
@@ -4,7 +4,7 @@ Hybrid Mapping Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Hybrid mapping strategy - tries both manifest and discovery, uses best match.
|
|
@@ -14,7 +14,6 @@ from typing import Optional, List
|
|
|
14
14
|
from ...package.base import AMappingStrategy
|
|
15
15
|
from ...package.services.manifest import get_manifest_loader
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class HybridMapping(AMappingStrategy):
|
|
19
18
|
"""
|
|
20
19
|
Hybrid mapping strategy.
|
|
@@ -4,7 +4,7 @@ Manifest-First Mapping Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Manifest-first mapping strategy - manifest takes precedence over discovery.
|
|
@@ -14,7 +14,6 @@ from typing import Optional, List
|
|
|
14
14
|
from ...package.base import AMappingStrategy
|
|
15
15
|
from ...package.services.manifest import get_manifest_loader
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class ManifestFirstMapping(AMappingStrategy):
|
|
19
18
|
"""
|
|
20
19
|
Manifest-first mapping strategy.
|
|
@@ -4,7 +4,7 @@ Allow List Policy Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Allow list policy - only allows packages in the allow list.
|
|
@@ -13,7 +13,6 @@ Allow list policy - only allows packages in the allow list.
|
|
|
13
13
|
from typing import Tuple, List, Set
|
|
14
14
|
from ...package.base import APolicyStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class AllowListPolicy(APolicyStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Allow list policy strategy - only allows packages in the allow list.
|
|
@@ -4,7 +4,7 @@ Deny List Policy Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Deny list policy - blocks packages in the deny list.
|
|
@@ -13,7 +13,6 @@ Deny list policy - blocks packages in the deny list.
|
|
|
13
13
|
from typing import Tuple, List, Set
|
|
14
14
|
from ...package.base import APolicyStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class DenyListPolicy(APolicyStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Deny list policy strategy - blocks packages in the deny list.
|
|
@@ -4,7 +4,7 @@ Permissive Policy Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Permissive policy - allows all packages (default).
|
|
@@ -13,7 +13,6 @@ Permissive policy - allows all packages (default).
|
|
|
13
13
|
from typing import Tuple, List
|
|
14
14
|
from ...package.base import APolicyStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class PermissivePolicy(APolicyStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Permissive policy strategy - allows all packages.
|
|
@@ -4,7 +4,7 @@ Clean Timing Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Clean timing - install on usage + uninstall after completion.
|
|
@@ -13,7 +13,6 @@ Clean timing - install on usage + uninstall after completion.
|
|
|
13
13
|
from typing import List, Any
|
|
14
14
|
from ...package.base import AInstallTimingStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class CleanTiming(AInstallTimingStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Clean timing strategy - installs on usage + uninstalls after completion (LazyInstallMode.CLEAN).
|
|
@@ -4,7 +4,7 @@ Full Timing Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Full timing - install all dependencies upfront.
|
|
@@ -13,7 +13,6 @@ Full timing - install all dependencies upfront.
|
|
|
13
13
|
from typing import List, Any
|
|
14
14
|
from ...package.base import AInstallTimingStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class FullTiming(AInstallTimingStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Full timing strategy - installs all packages upfront (LazyInstallMode.FULL).
|
|
@@ -4,7 +4,7 @@ Smart Timing Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Smart timing - install on first usage (on-demand).
|
|
@@ -14,7 +14,6 @@ from typing import List, Any
|
|
|
14
14
|
from ...package.base import AInstallTimingStrategy
|
|
15
15
|
from ...defs import LazyInstallMode
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
class SmartTiming(AInstallTimingStrategy):
|
|
19
18
|
"""
|
|
20
19
|
Smart timing strategy - installs packages on-demand (LazyInstallMode.SMART).
|
|
@@ -4,7 +4,7 @@ Temporary Timing Strategy
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 15-Nov-2025
|
|
9
9
|
|
|
10
10
|
Temporary timing - always uninstall after use (more aggressive than CLEAN).
|
|
@@ -13,7 +13,6 @@ Temporary timing - always uninstall after use (more aggressive than CLEAN).
|
|
|
13
13
|
from typing import List, Any
|
|
14
14
|
from ...package.base import AInstallTimingStrategy
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
class TemporaryTiming(AInstallTimingStrategy):
|
|
18
17
|
"""
|
|
19
18
|
Temporary timing strategy - always uninstalls after use (LazyInstallMode.TEMPORARY).
|
|
@@ -6,7 +6,7 @@ Adaptive learning utilities for pattern-based optimization.
|
|
|
6
6
|
Company: eXonware.com
|
|
7
7
|
Author: Eng. Muhammad AlShehri
|
|
8
8
|
Email: connect@exonware.com
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
Generation Date: 19-Nov-2025
|
|
11
11
|
|
|
12
12
|
This module provides adaptive learning for ADAPTIVE mode.
|
|
@@ -19,7 +19,6 @@ from collections import defaultdict, deque
|
|
|
19
19
|
|
|
20
20
|
# Logger not used in this module, removed to avoid circular dependency
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
class AdaptiveLearner:
|
|
24
23
|
"""Learns import patterns and optimizes loading strategy."""
|
|
25
24
|
|
|
@@ -126,6 +125,5 @@ class AdaptiveLearner:
|
|
|
126
125
|
'top_modules': self.get_priority_modules(5),
|
|
127
126
|
}
|
|
128
127
|
|
|
129
|
-
|
|
130
128
|
__all__ = ['AdaptiveLearner']
|
|
131
129
|
|
exonware/xwlazy/runtime/base.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
Generation Date: 10-Oct-2025
|
|
9
9
|
|
|
10
10
|
Abstract Base Class for Runtime Services
|
|
@@ -20,7 +20,6 @@ from ..contracts import (
|
|
|
20
20
|
IRuntime,
|
|
21
21
|
)
|
|
22
22
|
|
|
23
|
-
|
|
24
23
|
# =============================================================================
|
|
25
24
|
# ABSTRACT RUNTIME (Unified - Merges all runtime services)
|
|
26
25
|
# =============================================================================
|
|
@@ -265,7 +264,6 @@ class ARuntimeHelper(IRuntime, ABC):
|
|
|
265
264
|
with self._lock:
|
|
266
265
|
return key in self._registry
|
|
267
266
|
|
|
268
|
-
|
|
269
267
|
# =============================================================================
|
|
270
268
|
# EXPORT ALL
|
|
271
269
|
# =============================================================================
|
|
@@ -6,7 +6,7 @@ Intelligent mode utilities for automatic mode switching.
|
|
|
6
6
|
Company: eXonware.com
|
|
7
7
|
Author: Eng. Muhammad AlShehri
|
|
8
8
|
Email: connect@exonware.com
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
Generation Date: 19-Nov-2025
|
|
11
11
|
|
|
12
12
|
This module provides intelligent mode switching based on load level.
|
|
@@ -27,7 +27,6 @@ def _get_logger():
|
|
|
27
27
|
logger = get_logger("xwlazy.loading.intelligent")
|
|
28
28
|
return logger
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
# Optimal mode mappings based on benchmark results (updated from consistency test)
|
|
32
31
|
# Format: {LoadLevel: (LazyLoadMode, LazyInstallMode)}
|
|
33
32
|
# Updated: 2025-11-19 - Based on 20-iteration consistency test averages
|
|
@@ -40,7 +39,6 @@ INTELLIGENT_MODE_MAP: Dict[LoadLevel, Tuple[LazyLoadMode, LazyInstallMode]] = {
|
|
|
40
39
|
LoadLevel.ENTERPRISE: (LazyLoadMode.PRELOAD, LazyInstallMode.FULL), # Winner: 44.742ms avg (±1.5% CV)
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
44
42
|
class IntelligentModeSelector:
|
|
45
43
|
"""Selects optimal mode based on current load characteristics."""
|
|
46
44
|
|
|
@@ -168,6 +166,5 @@ class IntelligentModeSelector:
|
|
|
168
166
|
}
|
|
169
167
|
}
|
|
170
168
|
|
|
171
|
-
|
|
172
169
|
__all__ = ['LoadLevel', 'INTELLIGENT_MODE_MAP', 'IntelligentModeSelector']
|
|
173
170
|
|