exonware-xwlazy 0.1.0.22__py3-none-any.whl → 1.0.1.2__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 (90) hide show
  1. exonware/__init__.py +86 -16
  2. exonware/xwlazy/version.py +5 -5
  3. exonware/xwlazy.py +2546 -0
  4. exonware/xwlazy_external_libs.toml +716 -0
  5. {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/METADATA +6 -6
  6. exonware_xwlazy-1.0.1.2.dist-info/RECORD +8 -0
  7. exonware/xwlazy/__init__.py +0 -367
  8. exonware/xwlazy/common/__init__.py +0 -47
  9. exonware/xwlazy/common/base.py +0 -56
  10. exonware/xwlazy/common/cache.py +0 -504
  11. exonware/xwlazy/common/logger.py +0 -257
  12. exonware/xwlazy/common/services/__init__.py +0 -72
  13. exonware/xwlazy/common/services/dependency_mapper.py +0 -232
  14. exonware/xwlazy/common/services/install_async_utils.py +0 -165
  15. exonware/xwlazy/common/services/install_cache_utils.py +0 -245
  16. exonware/xwlazy/common/services/keyword_detection.py +0 -283
  17. exonware/xwlazy/common/services/spec_cache.py +0 -165
  18. exonware/xwlazy/common/services/state_manager.py +0 -84
  19. exonware/xwlazy/common/strategies/__init__.py +0 -28
  20. exonware/xwlazy/common/strategies/caching_dict.py +0 -44
  21. exonware/xwlazy/common/strategies/caching_installation.py +0 -88
  22. exonware/xwlazy/common/strategies/caching_lfu.py +0 -66
  23. exonware/xwlazy/common/strategies/caching_lru.py +0 -63
  24. exonware/xwlazy/common/strategies/caching_multitier.py +0 -59
  25. exonware/xwlazy/common/strategies/caching_ttl.py +0 -59
  26. exonware/xwlazy/config.py +0 -193
  27. exonware/xwlazy/contracts.py +0 -1396
  28. exonware/xwlazy/defs.py +0 -378
  29. exonware/xwlazy/errors.py +0 -276
  30. exonware/xwlazy/facade.py +0 -991
  31. exonware/xwlazy/module/__init__.py +0 -18
  32. exonware/xwlazy/module/base.py +0 -565
  33. exonware/xwlazy/module/data.py +0 -17
  34. exonware/xwlazy/module/facade.py +0 -246
  35. exonware/xwlazy/module/importer_engine.py +0 -2117
  36. exonware/xwlazy/module/strategies/__init__.py +0 -22
  37. exonware/xwlazy/module/strategies/module_helper_lazy.py +0 -93
  38. exonware/xwlazy/module/strategies/module_helper_simple.py +0 -65
  39. exonware/xwlazy/module/strategies/module_manager_advanced.py +0 -111
  40. exonware/xwlazy/module/strategies/module_manager_simple.py +0 -95
  41. exonware/xwlazy/package/__init__.py +0 -18
  42. exonware/xwlazy/package/base.py +0 -798
  43. exonware/xwlazy/package/conf.py +0 -324
  44. exonware/xwlazy/package/data.py +0 -17
  45. exonware/xwlazy/package/facade.py +0 -480
  46. exonware/xwlazy/package/services/__init__.py +0 -84
  47. exonware/xwlazy/package/services/async_install_handle.py +0 -87
  48. exonware/xwlazy/package/services/config_manager.py +0 -245
  49. exonware/xwlazy/package/services/discovery.py +0 -370
  50. exonware/xwlazy/package/services/host_packages.py +0 -145
  51. exonware/xwlazy/package/services/install_async.py +0 -277
  52. exonware/xwlazy/package/services/install_cache.py +0 -145
  53. exonware/xwlazy/package/services/install_interactive.py +0 -59
  54. exonware/xwlazy/package/services/install_policy.py +0 -156
  55. exonware/xwlazy/package/services/install_registry.py +0 -54
  56. exonware/xwlazy/package/services/install_result.py +0 -17
  57. exonware/xwlazy/package/services/install_sbom.py +0 -153
  58. exonware/xwlazy/package/services/install_utils.py +0 -79
  59. exonware/xwlazy/package/services/installer_engine.py +0 -406
  60. exonware/xwlazy/package/services/lazy_installer.py +0 -718
  61. exonware/xwlazy/package/services/manifest.py +0 -496
  62. exonware/xwlazy/package/services/strategy_registry.py +0 -186
  63. exonware/xwlazy/package/strategies/__init__.py +0 -57
  64. exonware/xwlazy/package/strategies/package_discovery_file.py +0 -129
  65. exonware/xwlazy/package/strategies/package_discovery_hybrid.py +0 -84
  66. exonware/xwlazy/package/strategies/package_discovery_manifest.py +0 -101
  67. exonware/xwlazy/package/strategies/package_execution_async.py +0 -113
  68. exonware/xwlazy/package/strategies/package_execution_cached.py +0 -90
  69. exonware/xwlazy/package/strategies/package_execution_pip.py +0 -99
  70. exonware/xwlazy/package/strategies/package_execution_wheel.py +0 -106
  71. exonware/xwlazy/package/strategies/package_mapping_discovery_first.py +0 -100
  72. exonware/xwlazy/package/strategies/package_mapping_hybrid.py +0 -105
  73. exonware/xwlazy/package/strategies/package_mapping_manifest_first.py +0 -100
  74. exonware/xwlazy/package/strategies/package_policy_allow_list.py +0 -57
  75. exonware/xwlazy/package/strategies/package_policy_deny_list.py +0 -57
  76. exonware/xwlazy/package/strategies/package_policy_permissive.py +0 -46
  77. exonware/xwlazy/package/strategies/package_timing_clean.py +0 -67
  78. exonware/xwlazy/package/strategies/package_timing_full.py +0 -66
  79. exonware/xwlazy/package/strategies/package_timing_smart.py +0 -68
  80. exonware/xwlazy/package/strategies/package_timing_temporary.py +0 -66
  81. exonware/xwlazy/runtime/__init__.py +0 -18
  82. exonware/xwlazy/runtime/adaptive_learner.py +0 -129
  83. exonware/xwlazy/runtime/base.py +0 -274
  84. exonware/xwlazy/runtime/facade.py +0 -94
  85. exonware/xwlazy/runtime/intelligent_selector.py +0 -170
  86. exonware/xwlazy/runtime/metrics.py +0 -60
  87. exonware/xwlazy/runtime/performance.py +0 -37
  88. exonware_xwlazy-0.1.0.22.dist-info/RECORD +0 -87
  89. {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/WHEEL +0 -0
  90. {exonware_xwlazy-0.1.0.22.dist-info → exonware_xwlazy-1.0.1.2.dist-info}/licenses/LICENSE +0 -0
exonware/__init__.py CHANGED
@@ -1,23 +1,93 @@
1
1
  """
2
- exonware package - Enterprise-grade Python framework ecosystem
2
+ exonware.xwlazy - Enterprise Lazy Installation System
3
3
 
4
- Company: eXonware.com
5
- Author: Eng. Muhammad AlShehri
6
- Email: connect@exonware.com
7
- Generation Date: 2025-01-03
8
-
9
- This is a namespace package allowing multiple exonware subpackages
10
- to coexist (xwsystem, xwnode, xwdata, xwlazy, etc.)
4
+ Main module for xwlazy auto-installation system.
5
+ Supports both import styles:
6
+ import exonware.xwlazy
7
+ import xwlazy (via convenience import)
11
8
  """
12
9
 
13
- # Make this a namespace package - DO NOT set __path__
14
- # This allows both exonware.xwsystem and exonware.xwlazy to coexist
15
- __path__ = __import__('pkgutil').extend_path(__path__, __name__)
10
+ # Import from xwlazy.py module explicitly using importlib
11
+ # This handles the case where both xwlazy.py and xwlazy/ directory exist
12
+ import sys
13
+ import importlib.util
14
+ from pathlib import Path
16
15
 
17
- # Import version from xwlazy - required, no fallback
18
- from exonware.xwlazy.version import __version__
16
+ # Explicitly load xwlazy.py as a module
17
+ _xwlazy_file = Path(__file__).parent / "xwlazy.py"
18
+ if _xwlazy_file.exists():
19
+ # Load the module explicitly from the .py file
20
+ spec = importlib.util.spec_from_file_location("exonware._xwlazy_module", _xwlazy_file)
21
+ _xwlazy = importlib.util.module_from_spec(spec)
22
+ sys.modules["exonware._xwlazy_module"] = _xwlazy
23
+ spec.loader.exec_module(_xwlazy)
24
+
25
+ # Import all exports from the module
26
+ hook = _xwlazy.hook
27
+ auto_enable_lazy = _xwlazy.auto_enable_lazy
28
+ attach = _xwlazy.attach
29
+ XWLazy = _xwlazy.XWLazy
30
+ enable_keyword_detection = _xwlazy.enable_keyword_detection
31
+ is_keyword_detection_enabled = _xwlazy.is_keyword_detection_enabled
32
+ check_package_keywords = _xwlazy.check_package_keywords
33
+ enable_learning = _xwlazy.enable_learning
34
+ predict_next_imports = _xwlazy.predict_next_imports
35
+ get_all_stats = _xwlazy.get_all_stats
36
+ generate_sbom = _xwlazy.generate_sbom
37
+ get_lockfile = _xwlazy.get_lockfile
38
+ save_lockfile = _xwlazy.save_lockfile
39
+ install_global_import_hook = _xwlazy.install_global_import_hook
40
+ uninstall_global_import_hook = _xwlazy.uninstall_global_import_hook
41
+ is_global_import_hook_installed = _xwlazy.is_global_import_hook_installed
42
+ is_externally_managed = _xwlazy.is_externally_managed
43
+ add_watched_prefix = _xwlazy.add_watched_prefix
44
+ remove_watched_prefix = _xwlazy.remove_watched_prefix
45
+ get_watched_prefixes = _xwlazy.get_watched_prefixes
46
+ is_module_watched = _xwlazy.is_module_watched
47
+ get_cache_stats = _xwlazy.get_cache_stats
48
+ clear_cache = _xwlazy.clear_cache
49
+ invalidate_cache = _xwlazy.invalidate_cache
50
+ get_performance_stats = _xwlazy.get_performance_stats
51
+ clear_performance_stats = _xwlazy.clear_performance_stats
52
+ else:
53
+ raise ImportError("xwlazy.py module not found!")
19
54
 
20
- __author__ = 'Eng. Muhammad AlShehri'
21
- __email__ = 'connect@exonware.com'
22
- __company__ = 'eXonware.com'
55
+ # Import version from version module if it exists
56
+ # Note: version.py is at src/exonware/xwlazy/version.py (for hatch build system)
57
+ try:
58
+ _version_file = Path(__file__).parent / "xwlazy" / "version.py"
59
+ if _version_file.exists():
60
+ _version_spec = importlib.util.spec_from_file_location("exonware.xwlazy.version", _version_file)
61
+ _version_module = importlib.util.module_from_spec(_version_spec)
62
+ _version_spec.loader.exec_module(_version_module)
63
+ __version__ = _version_module.__version__
64
+ else:
65
+ __version__ = "1.0.1"
66
+ except (ImportError, AttributeError, Exception):
67
+ # Fallback: use default version
68
+ __version__ = "1.0.1"
23
69
 
70
+ __all__ = [
71
+ # Core activation
72
+ 'hook', 'auto_enable_lazy', 'attach',
73
+ # Main class
74
+ 'XWLazy',
75
+ # Keyword detection
76
+ 'enable_keyword_detection', 'is_keyword_detection_enabled', 'check_package_keywords',
77
+ # Adaptive learning
78
+ 'enable_learning', 'predict_next_imports',
79
+ # Stats & monitoring
80
+ 'get_all_stats', 'generate_sbom',
81
+ # Lockfile
82
+ 'get_lockfile', 'save_lockfile',
83
+ # Global hook
84
+ 'install_global_import_hook', 'uninstall_global_import_hook', 'is_global_import_hook_installed',
85
+ # Utility
86
+ 'is_externally_managed',
87
+ # Watched prefixes
88
+ 'add_watched_prefix', 'remove_watched_prefix', 'get_watched_prefixes', 'is_module_watched',
89
+ # Cache management
90
+ 'get_cache_stats', 'clear_cache', 'invalidate_cache',
91
+ # Performance monitoring
92
+ 'get_performance_stats', 'clear_performance_stats',
93
+ ]
@@ -14,13 +14,13 @@ All version references should import from this module to ensure consistency.
14
14
  # =============================================================================
15
15
 
16
16
  # Main version - update this to change version across entire project
17
- __version__ = "0.1.0.22"
17
+ __version__ = "1.0.1.2"
18
18
 
19
19
  # Version components for programmatic access
20
- VERSION_MAJOR = 0
21
- VERSION_MINOR = 1
22
- VERSION_PATCH = 0
23
- VERSION_BUILD = 22 # Set to None for releases, or build number for dev builds
20
+ VERSION_MAJOR = 1
21
+ VERSION_MINOR = 0
22
+ VERSION_PATCH = 1
23
+ VERSION_BUILD = 2 # Set to None for releases, or build number for dev builds
24
24
 
25
25
  # Version metadata
26
26
  VERSION_SUFFIX = "" # e.g., "dev", "alpha", "beta", "rc1"