exonware-xwsystem 0.0.1.409__py3-none-any.whl → 0.0.1.411__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 +2 -2
- exonware/conf.py +10 -20
- exonware/xwsystem/__init__.py +6 -16
- exonware/xwsystem/caching/__init__.py +1 -1
- exonware/xwsystem/caching/base.py +16 -16
- exonware/xwsystem/caching/bloom_cache.py +5 -5
- exonware/xwsystem/caching/cache_manager.py +2 -2
- exonware/xwsystem/caching/conditional.py +4 -4
- exonware/xwsystem/caching/contracts.py +12 -12
- exonware/xwsystem/caching/decorators.py +2 -2
- exonware/xwsystem/caching/defs.py +1 -1
- exonware/xwsystem/caching/disk_cache.py +4 -4
- exonware/xwsystem/caching/distributed.py +1 -1
- exonware/xwsystem/caching/errors.py +1 -1
- exonware/xwsystem/caching/events.py +8 -8
- exonware/xwsystem/caching/eviction_strategies.py +9 -9
- exonware/xwsystem/caching/fluent.py +1 -1
- exonware/xwsystem/caching/integrity.py +1 -1
- exonware/xwsystem/caching/lfu_cache.py +24 -9
- exonware/xwsystem/caching/lfu_optimized.py +21 -21
- exonware/xwsystem/caching/lru_cache.py +14 -7
- exonware/xwsystem/caching/memory_bounded.py +8 -8
- exonware/xwsystem/caching/metrics_exporter.py +6 -6
- exonware/xwsystem/caching/observable_cache.py +1 -1
- exonware/xwsystem/caching/pluggable_cache.py +9 -9
- exonware/xwsystem/caching/rate_limiter.py +1 -1
- exonware/xwsystem/caching/read_through.py +6 -6
- exonware/xwsystem/caching/secure_cache.py +1 -1
- exonware/xwsystem/caching/serializable.py +3 -3
- exonware/xwsystem/caching/stats.py +7 -7
- exonware/xwsystem/caching/tagging.py +11 -11
- exonware/xwsystem/caching/ttl_cache.py +21 -6
- exonware/xwsystem/caching/two_tier_cache.py +5 -5
- exonware/xwsystem/caching/utils.py +3 -3
- exonware/xwsystem/caching/validation.py +1 -1
- exonware/xwsystem/caching/warming.py +9 -9
- exonware/xwsystem/caching/write_behind.py +5 -5
- exonware/xwsystem/cli/__init__.py +1 -1
- exonware/xwsystem/cli/args.py +10 -10
- exonware/xwsystem/cli/base.py +15 -15
- exonware/xwsystem/cli/colors.py +1 -1
- exonware/xwsystem/cli/console.py +1 -1
- exonware/xwsystem/cli/contracts.py +5 -5
- exonware/xwsystem/cli/defs.py +1 -1
- exonware/xwsystem/cli/errors.py +1 -1
- exonware/xwsystem/cli/progress.py +1 -1
- exonware/xwsystem/cli/prompts.py +1 -1
- exonware/xwsystem/cli/tables.py +7 -7
- exonware/xwsystem/config/__init__.py +1 -1
- exonware/xwsystem/config/base.py +14 -14
- exonware/xwsystem/config/contracts.py +22 -22
- exonware/xwsystem/config/defaults.py +2 -2
- exonware/xwsystem/config/defs.py +1 -1
- exonware/xwsystem/config/errors.py +2 -2
- exonware/xwsystem/config/logging.py +1 -1
- exonware/xwsystem/config/logging_setup.py +2 -2
- exonware/xwsystem/config/performance.py +7 -7
- exonware/xwsystem/config/performance_modes.py +20 -20
- exonware/xwsystem/config/version_manager.py +4 -4
- exonware/xwsystem/{http → http_client}/__init__.py +1 -1
- exonware/xwsystem/{http → http_client}/advanced_client.py +20 -20
- exonware/xwsystem/{http → http_client}/base.py +13 -13
- exonware/xwsystem/{http → http_client}/client.py +43 -43
- exonware/xwsystem/{http → http_client}/contracts.py +5 -5
- exonware/xwsystem/{http → http_client}/defs.py +2 -2
- exonware/xwsystem/{http → http_client}/errors.py +2 -2
- exonware/xwsystem/io/__init__.py +1 -1
- exonware/xwsystem/io/archive/__init__.py +1 -1
- exonware/xwsystem/io/archive/archive.py +5 -5
- exonware/xwsystem/io/archive/archive_files.py +8 -8
- exonware/xwsystem/io/archive/archivers.py +3 -3
- exonware/xwsystem/io/archive/base.py +17 -17
- exonware/xwsystem/io/archive/codec_integration.py +1 -1
- exonware/xwsystem/io/archive/compression.py +1 -1
- exonware/xwsystem/io/archive/formats/__init__.py +1 -1
- exonware/xwsystem/io/archive/formats/brotli_format.py +12 -9
- exonware/xwsystem/io/archive/formats/lz4_format.py +12 -9
- exonware/xwsystem/io/archive/formats/rar.py +12 -9
- exonware/xwsystem/io/archive/formats/sevenzip.py +12 -9
- exonware/xwsystem/io/archive/formats/squashfs_format.py +7 -7
- exonware/xwsystem/io/archive/formats/tar.py +8 -8
- exonware/xwsystem/io/archive/formats/wim_format.py +12 -9
- exonware/xwsystem/io/archive/formats/zip.py +8 -8
- exonware/xwsystem/io/archive/formats/zpaq_format.py +7 -7
- exonware/xwsystem/io/archive/formats/zstandard.py +12 -9
- exonware/xwsystem/io/base.py +17 -17
- exonware/xwsystem/io/codec/__init__.py +1 -1
- exonware/xwsystem/io/codec/base.py +261 -14
- exonware/xwsystem/io/codec/contracts.py +3 -6
- exonware/xwsystem/io/codec/registry.py +29 -29
- exonware/xwsystem/io/common/__init__.py +1 -1
- exonware/xwsystem/io/common/atomic.py +2 -2
- exonware/xwsystem/io/common/base.py +1 -1
- exonware/xwsystem/io/common/lock.py +1 -1
- exonware/xwsystem/io/common/watcher.py +4 -4
- exonware/xwsystem/io/contracts.py +34 -39
- exonware/xwsystem/io/data_operations.py +480 -0
- exonware/xwsystem/io/defs.py +2 -2
- exonware/xwsystem/io/errors.py +32 -3
- exonware/xwsystem/io/facade.py +4 -4
- exonware/xwsystem/io/file/__init__.py +1 -1
- exonware/xwsystem/io/file/base.py +2 -2
- exonware/xwsystem/io/file/conversion.py +1 -1
- exonware/xwsystem/io/file/file.py +10 -8
- exonware/xwsystem/io/file/paged_source.py +8 -1
- exonware/xwsystem/io/file/paging/__init__.py +1 -1
- exonware/xwsystem/io/file/paging/byte_paging.py +1 -1
- exonware/xwsystem/io/file/paging/line_paging.py +1 -1
- exonware/xwsystem/io/file/paging/record_paging.py +1 -1
- exonware/xwsystem/io/file/paging/registry.py +5 -5
- exonware/xwsystem/io/file/source.py +22 -11
- exonware/xwsystem/io/filesystem/__init__.py +1 -1
- exonware/xwsystem/io/filesystem/base.py +1 -1
- exonware/xwsystem/io/filesystem/local.py +9 -1
- exonware/xwsystem/io/folder/__init__.py +1 -1
- exonware/xwsystem/io/folder/base.py +2 -2
- exonware/xwsystem/io/folder/folder.py +6 -6
- exonware/xwsystem/io/serialization/__init__.py +1 -1
- exonware/xwsystem/io/serialization/auto_serializer.py +53 -40
- exonware/xwsystem/io/serialization/base.py +248 -35
- exonware/xwsystem/io/serialization/contracts.py +93 -4
- exonware/xwsystem/io/serialization/defs.py +1 -1
- exonware/xwsystem/io/serialization/errors.py +1 -1
- exonware/xwsystem/io/serialization/flyweight.py +22 -22
- exonware/xwsystem/io/serialization/format_detector.py +18 -15
- exonware/xwsystem/io/serialization/formats/__init__.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/bson.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/cbor.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/marshal.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/msgpack.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/pickle.py +1 -1
- exonware/xwsystem/io/serialization/formats/binary/plistlib.py +1 -1
- exonware/xwsystem/io/serialization/formats/database/dbm.py +53 -1
- exonware/xwsystem/io/serialization/formats/database/shelve.py +48 -1
- exonware/xwsystem/io/serialization/formats/database/sqlite3.py +85 -1
- exonware/xwsystem/io/serialization/formats/text/configparser.py +2 -2
- exonware/xwsystem/io/serialization/formats/text/csv.py +2 -2
- exonware/xwsystem/io/serialization/formats/text/formdata.py +2 -2
- exonware/xwsystem/io/serialization/formats/text/json.py +23 -5
- exonware/xwsystem/io/serialization/formats/text/json5.py +98 -13
- exonware/xwsystem/io/serialization/formats/text/jsonlines.py +230 -20
- exonware/xwsystem/io/serialization/formats/text/multipart.py +2 -2
- exonware/xwsystem/io/serialization/formats/text/toml.py +65 -4
- exonware/xwsystem/io/serialization/formats/text/xml.py +451 -69
- exonware/xwsystem/io/serialization/formats/text/yaml.py +52 -2
- exonware/xwsystem/io/serialization/registry.py +5 -5
- exonware/xwsystem/io/serialization/serializer.py +184 -12
- exonware/xwsystem/io/serialization/utils/__init__.py +1 -1
- exonware/xwsystem/io/serialization/utils/path_ops.py +3 -3
- exonware/xwsystem/io/stream/__init__.py +1 -1
- exonware/xwsystem/io/stream/async_operations.py +3 -3
- exonware/xwsystem/io/stream/base.py +3 -7
- exonware/xwsystem/io/stream/codec_io.py +4 -7
- exonware/xwsystem/ipc/async_fabric.py +7 -8
- exonware/xwsystem/ipc/base.py +9 -9
- exonware/xwsystem/ipc/contracts.py +5 -5
- exonware/xwsystem/ipc/defs.py +1 -1
- exonware/xwsystem/ipc/errors.py +2 -2
- exonware/xwsystem/ipc/message_queue.py +4 -6
- exonware/xwsystem/ipc/pipes.py +2 -2
- exonware/xwsystem/ipc/process_manager.py +7 -7
- exonware/xwsystem/ipc/process_pool.py +8 -8
- exonware/xwsystem/ipc/shared_memory.py +7 -7
- exonware/xwsystem/monitoring/base.py +33 -33
- exonware/xwsystem/monitoring/contracts.py +27 -27
- exonware/xwsystem/monitoring/defs.py +1 -1
- exonware/xwsystem/monitoring/error_recovery.py +16 -16
- exonware/xwsystem/monitoring/errors.py +2 -2
- exonware/xwsystem/monitoring/memory_monitor.py +12 -12
- exonware/xwsystem/monitoring/metrics.py +8 -8
- exonware/xwsystem/monitoring/performance_manager_generic.py +20 -20
- exonware/xwsystem/monitoring/performance_monitor.py +11 -11
- exonware/xwsystem/monitoring/performance_validator.py +21 -21
- exonware/xwsystem/monitoring/system_monitor.py +17 -17
- exonware/xwsystem/monitoring/tracing.py +20 -20
- exonware/xwsystem/monitoring/tracker.py +7 -7
- exonware/xwsystem/operations/__init__.py +5 -5
- exonware/xwsystem/operations/base.py +3 -3
- exonware/xwsystem/operations/contracts.py +3 -3
- exonware/xwsystem/operations/defs.py +5 -5
- exonware/xwsystem/operations/diff.py +5 -5
- exonware/xwsystem/operations/merge.py +2 -2
- exonware/xwsystem/operations/patch.py +5 -5
- exonware/xwsystem/patterns/base.py +4 -4
- exonware/xwsystem/patterns/context_manager.py +7 -7
- exonware/xwsystem/patterns/contracts.py +29 -31
- exonware/xwsystem/patterns/defs.py +1 -1
- exonware/xwsystem/patterns/dynamic_facade.py +9 -9
- exonware/xwsystem/patterns/errors.py +10 -10
- exonware/xwsystem/patterns/handler_factory.py +15 -14
- exonware/xwsystem/patterns/import_registry.py +22 -22
- exonware/xwsystem/patterns/object_pool.py +14 -13
- exonware/xwsystem/patterns/registry.py +45 -32
- exonware/xwsystem/plugins/__init__.py +1 -1
- exonware/xwsystem/plugins/base.py +25 -25
- exonware/xwsystem/plugins/contracts.py +28 -28
- exonware/xwsystem/plugins/defs.py +1 -1
- exonware/xwsystem/plugins/errors.py +9 -9
- exonware/xwsystem/runtime/__init__.py +1 -1
- exonware/xwsystem/runtime/base.py +42 -42
- exonware/xwsystem/runtime/contracts.py +9 -9
- exonware/xwsystem/runtime/defs.py +1 -1
- exonware/xwsystem/runtime/env.py +9 -9
- exonware/xwsystem/runtime/errors.py +1 -1
- exonware/xwsystem/runtime/reflection.py +15 -15
- exonware/xwsystem/security/auth.py +47 -15
- exonware/xwsystem/security/base.py +17 -17
- exonware/xwsystem/security/contracts.py +30 -30
- exonware/xwsystem/security/crypto.py +8 -8
- exonware/xwsystem/security/defs.py +1 -1
- exonware/xwsystem/security/errors.py +2 -2
- exonware/xwsystem/security/hazmat.py +7 -7
- exonware/xwsystem/security/path_validator.py +1 -1
- exonware/xwsystem/shared/__init__.py +1 -1
- exonware/xwsystem/shared/base.py +14 -14
- exonware/xwsystem/shared/contracts.py +6 -6
- exonware/xwsystem/shared/defs.py +1 -1
- exonware/xwsystem/shared/errors.py +1 -1
- exonware/xwsystem/structures/__init__.py +1 -1
- exonware/xwsystem/structures/base.py +29 -29
- exonware/xwsystem/structures/circular_detector.py +15 -15
- exonware/xwsystem/structures/contracts.py +9 -9
- exonware/xwsystem/structures/defs.py +1 -1
- exonware/xwsystem/structures/errors.py +2 -2
- exonware/xwsystem/structures/tree_walker.py +8 -8
- exonware/xwsystem/threading/async_primitives.py +7 -7
- exonware/xwsystem/threading/base.py +19 -19
- exonware/xwsystem/threading/contracts.py +13 -13
- exonware/xwsystem/threading/defs.py +1 -1
- exonware/xwsystem/threading/errors.py +2 -2
- exonware/xwsystem/threading/safe_factory.py +13 -12
- exonware/xwsystem/utils/base.py +34 -34
- exonware/xwsystem/utils/contracts.py +9 -9
- exonware/xwsystem/utils/dt/__init__.py +1 -1
- exonware/xwsystem/utils/dt/base.py +6 -6
- exonware/xwsystem/utils/dt/contracts.py +2 -2
- exonware/xwsystem/utils/dt/defs.py +1 -1
- exonware/xwsystem/utils/dt/errors.py +2 -2
- exonware/xwsystem/utils/dt/formatting.py +3 -3
- exonware/xwsystem/utils/dt/humanize.py +2 -2
- exonware/xwsystem/utils/dt/parsing.py +2 -2
- exonware/xwsystem/utils/dt/timezone_utils.py +5 -5
- exonware/xwsystem/utils/errors.py +2 -2
- exonware/xwsystem/utils/test_runner.py +6 -6
- exonware/xwsystem/utils/utils_contracts.py +1 -1
- exonware/xwsystem/validation/__init__.py +1 -1
- exonware/xwsystem/validation/base.py +48 -48
- exonware/xwsystem/validation/contracts.py +8 -8
- exonware/xwsystem/validation/data_validator.py +10 -0
- exonware/xwsystem/validation/declarative.py +15 -15
- exonware/xwsystem/validation/defs.py +1 -1
- exonware/xwsystem/validation/errors.py +2 -2
- exonware/xwsystem/validation/fluent_validator.py +10 -10
- exonware/xwsystem/version.py +2 -2
- {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/METADATA +9 -11
- exonware_xwsystem-0.0.1.411.dist-info/RECORD +274 -0
- {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/WHEEL +1 -1
- exonware/xwsystem/lazy_bootstrap.py +0 -79
- exonware_xwsystem-0.0.1.409.dist-info/RECORD +0 -274
- {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Company: eXonware.com
|
|
4
4
|
Author: Eng. Muhammad AlShehri
|
|
5
5
|
Email: connect@exonware.com
|
|
6
|
-
Version: 0.0.1.
|
|
6
|
+
Version: 0.0.1.411
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Plugin protocol interfaces for XWSystem.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
from abc import ABC, abstractmethod
|
|
13
|
-
from typing import Any,
|
|
13
|
+
from typing import Any, Optional, Union, Iterator, Callable
|
|
14
14
|
import importlib
|
|
15
15
|
|
|
16
16
|
# Import enums from types module
|
|
@@ -49,7 +49,7 @@ class IPlugin(ABC):
|
|
|
49
49
|
pass
|
|
50
50
|
|
|
51
51
|
@abstractmethod
|
|
52
|
-
def get_info(self) ->
|
|
52
|
+
def get_info(self) -> dict[str, Any]:
|
|
53
53
|
"""
|
|
54
54
|
Get plugin information.
|
|
55
55
|
|
|
@@ -113,7 +113,7 @@ class IPlugin(ABC):
|
|
|
113
113
|
pass
|
|
114
114
|
|
|
115
115
|
@abstractmethod
|
|
116
|
-
def get_dependencies(self) ->
|
|
116
|
+
def get_dependencies(self) -> list[str]:
|
|
117
117
|
"""
|
|
118
118
|
Get plugin dependencies.
|
|
119
119
|
|
|
@@ -191,7 +191,7 @@ class IExtensible(ABC):
|
|
|
191
191
|
pass
|
|
192
192
|
|
|
193
193
|
@abstractmethod
|
|
194
|
-
def get_extensions(self) ->
|
|
194
|
+
def get_extensions(self) -> list[Any]:
|
|
195
195
|
"""
|
|
196
196
|
Get all extensions.
|
|
197
197
|
|
|
@@ -227,7 +227,7 @@ class IExtensible(ABC):
|
|
|
227
227
|
pass
|
|
228
228
|
|
|
229
229
|
@abstractmethod
|
|
230
|
-
def list_extension_names(self) ->
|
|
230
|
+
def list_extension_names(self) -> list[str]:
|
|
231
231
|
"""
|
|
232
232
|
List extension names.
|
|
233
233
|
|
|
@@ -309,7 +309,7 @@ class IHookable(ABC):
|
|
|
309
309
|
pass
|
|
310
310
|
|
|
311
311
|
@abstractmethod
|
|
312
|
-
def list_hooks(self, event: Optional[str] = None) ->
|
|
312
|
+
def list_hooks(self, event: Optional[str] = None) -> list[dict[str, Any]]:
|
|
313
313
|
"""
|
|
314
314
|
List hooks.
|
|
315
315
|
|
|
@@ -422,7 +422,7 @@ class IPluginManager(ABC):
|
|
|
422
422
|
pass
|
|
423
423
|
|
|
424
424
|
@abstractmethod
|
|
425
|
-
def list_plugins(self) ->
|
|
425
|
+
def list_plugins(self) -> list[str]:
|
|
426
426
|
"""
|
|
427
427
|
List all plugin names.
|
|
428
428
|
|
|
@@ -432,7 +432,7 @@ class IPluginManager(ABC):
|
|
|
432
432
|
pass
|
|
433
433
|
|
|
434
434
|
@abstractmethod
|
|
435
|
-
def list_loaded_plugins(self) ->
|
|
435
|
+
def list_loaded_plugins(self) -> list[str]:
|
|
436
436
|
"""
|
|
437
437
|
List loaded plugin names.
|
|
438
438
|
|
|
@@ -455,7 +455,7 @@ class IPluginManager(ABC):
|
|
|
455
455
|
pass
|
|
456
456
|
|
|
457
457
|
@abstractmethod
|
|
458
|
-
def get_plugin_info(self, plugin_name: str) -> Optional[
|
|
458
|
+
def get_plugin_info(self, plugin_name: str) -> Optional[dict[str, Any]]:
|
|
459
459
|
"""
|
|
460
460
|
Get plugin information.
|
|
461
461
|
|
|
@@ -480,7 +480,7 @@ class IPluginRegistry(ABC):
|
|
|
480
480
|
"""
|
|
481
481
|
|
|
482
482
|
@abstractmethod
|
|
483
|
-
def register_plugin(self, plugin_class:
|
|
483
|
+
def register_plugin(self, plugin_class: type[IPlugin], name: str, priority: PluginPriority = PluginPriority.NORMAL) -> bool:
|
|
484
484
|
"""
|
|
485
485
|
Register plugin class.
|
|
486
486
|
|
|
@@ -508,7 +508,7 @@ class IPluginRegistry(ABC):
|
|
|
508
508
|
pass
|
|
509
509
|
|
|
510
510
|
@abstractmethod
|
|
511
|
-
def get_registered_plugins(self) ->
|
|
511
|
+
def get_registered_plugins(self) -> dict[str, type[IPlugin]]:
|
|
512
512
|
"""
|
|
513
513
|
Get all registered plugins.
|
|
514
514
|
|
|
@@ -531,7 +531,7 @@ class IPluginRegistry(ABC):
|
|
|
531
531
|
pass
|
|
532
532
|
|
|
533
533
|
@abstractmethod
|
|
534
|
-
def get_plugin_class(self, name: str) -> Optional[
|
|
534
|
+
def get_plugin_class(self, name: str) -> Optional[type[IPlugin]]:
|
|
535
535
|
"""
|
|
536
536
|
Get plugin class by name.
|
|
537
537
|
|
|
@@ -551,7 +551,7 @@ class IPluginRegistry(ABC):
|
|
|
551
551
|
pass
|
|
552
552
|
|
|
553
553
|
@abstractmethod
|
|
554
|
-
def get_registry_stats(self) ->
|
|
554
|
+
def get_registry_stats(self) -> dict[str, Any]:
|
|
555
555
|
"""
|
|
556
556
|
Get registry statistics.
|
|
557
557
|
|
|
@@ -573,7 +573,7 @@ class IPluginDiscovery(ABC):
|
|
|
573
573
|
"""
|
|
574
574
|
|
|
575
575
|
@abstractmethod
|
|
576
|
-
def discover_plugins(self, search_paths:
|
|
576
|
+
def discover_plugins(self, search_paths: list[str]) -> list[str]:
|
|
577
577
|
"""
|
|
578
578
|
Discover plugins in search paths.
|
|
579
579
|
|
|
@@ -586,7 +586,7 @@ class IPluginDiscovery(ABC):
|
|
|
586
586
|
pass
|
|
587
587
|
|
|
588
588
|
@abstractmethod
|
|
589
|
-
def scan_directory(self, directory: str) ->
|
|
589
|
+
def scan_directory(self, directory: str) -> list[str]:
|
|
590
590
|
"""
|
|
591
591
|
Scan directory for plugins.
|
|
592
592
|
|
|
@@ -599,7 +599,7 @@ class IPluginDiscovery(ABC):
|
|
|
599
599
|
pass
|
|
600
600
|
|
|
601
601
|
@abstractmethod
|
|
602
|
-
def validate_plugin(self, plugin_path: str) ->
|
|
602
|
+
def validate_plugin(self, plugin_path: str) -> tuple[bool, list[str]]:
|
|
603
603
|
"""
|
|
604
604
|
Validate plugin.
|
|
605
605
|
|
|
@@ -612,7 +612,7 @@ class IPluginDiscovery(ABC):
|
|
|
612
612
|
pass
|
|
613
613
|
|
|
614
614
|
@abstractmethod
|
|
615
|
-
def get_plugin_metadata(self, plugin_path: str) -> Optional[
|
|
615
|
+
def get_plugin_metadata(self, plugin_path: str) -> Optional[dict[str, Any]]:
|
|
616
616
|
"""
|
|
617
617
|
Get plugin metadata.
|
|
618
618
|
|
|
@@ -638,7 +638,7 @@ class IPluginDiscovery(ABC):
|
|
|
638
638
|
pass
|
|
639
639
|
|
|
640
640
|
@abstractmethod
|
|
641
|
-
def get_supported_extensions(self) ->
|
|
641
|
+
def get_supported_extensions(self) -> list[str]:
|
|
642
642
|
"""
|
|
643
643
|
Get supported plugin file extensions.
|
|
644
644
|
|
|
@@ -660,7 +660,7 @@ class IPluginConfig(ABC):
|
|
|
660
660
|
"""
|
|
661
661
|
|
|
662
662
|
@abstractmethod
|
|
663
|
-
def get_plugin_config(self, plugin_name: str) ->
|
|
663
|
+
def get_plugin_config(self, plugin_name: str) -> dict[str, Any]:
|
|
664
664
|
"""
|
|
665
665
|
Get plugin configuration.
|
|
666
666
|
|
|
@@ -673,7 +673,7 @@ class IPluginConfig(ABC):
|
|
|
673
673
|
pass
|
|
674
674
|
|
|
675
675
|
@abstractmethod
|
|
676
|
-
def set_plugin_config(self, plugin_name: str, config:
|
|
676
|
+
def set_plugin_config(self, plugin_name: str, config: dict[str, Any]) -> None:
|
|
677
677
|
"""
|
|
678
678
|
Set plugin configuration.
|
|
679
679
|
|
|
@@ -828,7 +828,7 @@ class IPluginEvents(ABC):
|
|
|
828
828
|
pass
|
|
829
829
|
|
|
830
830
|
@abstractmethod
|
|
831
|
-
def get_event_subscribers(self, event: PluginEvent) ->
|
|
831
|
+
def get_event_subscribers(self, event: PluginEvent) -> list[Callable]:
|
|
832
832
|
"""
|
|
833
833
|
Get event subscribers.
|
|
834
834
|
|
|
@@ -851,7 +851,7 @@ class IPluginEvents(ABC):
|
|
|
851
851
|
pass
|
|
852
852
|
|
|
853
853
|
@abstractmethod
|
|
854
|
-
def get_event_history(self, event: Optional[PluginEvent] = None, limit: int = 100) ->
|
|
854
|
+
def get_event_history(self, event: Optional[PluginEvent] = None, limit: int = 100) -> list[dict[str, Any]]:
|
|
855
855
|
"""
|
|
856
856
|
Get event history.
|
|
857
857
|
|
|
@@ -910,7 +910,7 @@ class IPluginDependency(ABC):
|
|
|
910
910
|
pass
|
|
911
911
|
|
|
912
912
|
@abstractmethod
|
|
913
|
-
def get_dependencies(self, plugin_name: str) ->
|
|
913
|
+
def get_dependencies(self, plugin_name: str) -> list[dict[str, Any]]:
|
|
914
914
|
"""
|
|
915
915
|
Get plugin dependencies.
|
|
916
916
|
|
|
@@ -923,7 +923,7 @@ class IPluginDependency(ABC):
|
|
|
923
923
|
pass
|
|
924
924
|
|
|
925
925
|
@abstractmethod
|
|
926
|
-
def check_dependencies(self, plugin_name: str) ->
|
|
926
|
+
def check_dependencies(self, plugin_name: str) -> tuple[bool, list[str]]:
|
|
927
927
|
"""
|
|
928
928
|
Check if plugin dependencies are satisfied.
|
|
929
929
|
|
|
@@ -936,7 +936,7 @@ class IPluginDependency(ABC):
|
|
|
936
936
|
pass
|
|
937
937
|
|
|
938
938
|
@abstractmethod
|
|
939
|
-
def resolve_dependencies(self, plugin_name: str) ->
|
|
939
|
+
def resolve_dependencies(self, plugin_name: str) -> list[str]:
|
|
940
940
|
"""
|
|
941
941
|
Resolve plugin dependency order.
|
|
942
942
|
|
|
@@ -949,7 +949,7 @@ class IPluginDependency(ABC):
|
|
|
949
949
|
pass
|
|
950
950
|
|
|
951
951
|
@abstractmethod
|
|
952
|
-
def get_dependents(self, plugin_name: str) ->
|
|
952
|
+
def get_dependents(self, plugin_name: str) -> list[str]:
|
|
953
953
|
"""
|
|
954
954
|
Get plugins that depend on this plugin.
|
|
955
955
|
|
|
@@ -975,7 +975,7 @@ class IPluginDependency(ABC):
|
|
|
975
975
|
pass
|
|
976
976
|
|
|
977
977
|
@abstractmethod
|
|
978
|
-
def get_dependency_graph(self) ->
|
|
978
|
+
def get_dependency_graph(self) -> dict[str, list[str]]:
|
|
979
979
|
"""
|
|
980
980
|
Get plugin dependency graph.
|
|
981
981
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/plugins/errors.py
|
|
2
2
|
"""
|
|
3
3
|
Company: eXonware.com
|
|
4
4
|
Author: Eng. Muhammad AlShehri
|
|
5
5
|
Email: connect@exonware.com
|
|
6
|
-
Version: 0.0.1.
|
|
6
|
+
Version: 0.0.1.411
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Plugin-specific error classes for XSystem plugin system.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from typing import Any,
|
|
12
|
+
from typing import Any, Optional
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class PluginError(Exception):
|
|
16
16
|
"""Base exception for all plugin-related errors."""
|
|
17
17
|
|
|
18
18
|
def __init__(self, message: str, plugin_name: Optional[str] = None,
|
|
19
|
-
plugin_version: Optional[str] = None, context: Optional[
|
|
19
|
+
plugin_version: Optional[str] = None, context: Optional[dict[str, Any]] = None,
|
|
20
20
|
original_error: Optional[Exception] = None):
|
|
21
21
|
super().__init__(message)
|
|
22
22
|
self.plugin_name = plugin_name
|
|
@@ -39,7 +39,7 @@ class PluginError(Exception):
|
|
|
39
39
|
class PluginNotFoundError(PluginError):
|
|
40
40
|
"""Error when a requested plugin is not found."""
|
|
41
41
|
|
|
42
|
-
def __init__(self, plugin_name: str, available_plugins: Optional[
|
|
42
|
+
def __init__(self, plugin_name: str, available_plugins: Optional[list[str]] = None, **kwargs):
|
|
43
43
|
message = f"Plugin '{plugin_name}' not found"
|
|
44
44
|
if available_plugins:
|
|
45
45
|
message += f". Available plugins: {', '.join(available_plugins)}"
|
|
@@ -66,7 +66,7 @@ class PluginImportError(PluginLoadError):
|
|
|
66
66
|
class PluginDependencyError(PluginLoadError):
|
|
67
67
|
"""Error when plugin dependencies are not met."""
|
|
68
68
|
|
|
69
|
-
def __init__(self, message: str, plugin_name: str, missing_dependencies: Optional[
|
|
69
|
+
def __init__(self, message: str, plugin_name: str, missing_dependencies: Optional[list[str]] = None, **kwargs):
|
|
70
70
|
super().__init__(message, plugin_name=plugin_name, **kwargs)
|
|
71
71
|
self.missing_dependencies = missing_dependencies or []
|
|
72
72
|
|
|
@@ -84,7 +84,7 @@ class PluginVersionError(PluginLoadError):
|
|
|
84
84
|
class PluginRegistrationError(PluginError):
|
|
85
85
|
"""Error when plugin registration fails."""
|
|
86
86
|
|
|
87
|
-
def __init__(self, message: str, plugin_name: str, plugin_class: Optional[
|
|
87
|
+
def __init__(self, message: str, plugin_name: str, plugin_class: Optional[type] = None, **kwargs):
|
|
88
88
|
super().__init__(message, plugin_name=plugin_name, **kwargs)
|
|
89
89
|
self.plugin_class = plugin_class
|
|
90
90
|
|
|
@@ -100,7 +100,7 @@ class PluginDuplicateError(PluginRegistrationError):
|
|
|
100
100
|
class PluginValidationError(PluginRegistrationError):
|
|
101
101
|
"""Error when plugin validation fails."""
|
|
102
102
|
|
|
103
|
-
def __init__(self, message: str, plugin_name: str, validation_errors: Optional[
|
|
103
|
+
def __init__(self, message: str, plugin_name: str, validation_errors: Optional[list[str]] = None, **kwargs):
|
|
104
104
|
super().__init__(message, plugin_name=plugin_name, **kwargs)
|
|
105
105
|
self.validation_errors = validation_errors or []
|
|
106
106
|
|
|
@@ -350,7 +350,7 @@ class PluginPriorityError(PluginError):
|
|
|
350
350
|
class PluginDependencyCycleError(PluginError):
|
|
351
351
|
"""Error when plugin dependency cycle is detected."""
|
|
352
352
|
|
|
353
|
-
def __init__(self, message: str, plugin_name: str, dependency_cycle: Optional[
|
|
353
|
+
def __init__(self, message: str, plugin_name: str, dependency_cycle: Optional[list[str]] = None, **kwargs):
|
|
354
354
|
super().__init__(message, plugin_name=plugin_name, **kwargs)
|
|
355
355
|
self.dependency_cycle = dependency_cycle or []
|
|
356
356
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Company: eXonware.com
|
|
4
4
|
Author: Eng. Muhammad AlShehri
|
|
5
5
|
Email: connect@exonware.com
|
|
6
|
-
Version: 0.0.1.
|
|
6
|
+
Version: 0.0.1.411
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Runtime module base classes - abstract classes for runtime functionality.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
from abc import ABC, abstractmethod
|
|
13
|
-
from typing import Any,
|
|
13
|
+
from typing import Any, Optional, Union, Callable
|
|
14
14
|
from .contracts import RuntimeMode, PlatformType, PythonVersion, EnvironmentType
|
|
15
15
|
|
|
16
16
|
|
|
@@ -26,7 +26,7 @@ class ARuntimeBase(ABC):
|
|
|
26
26
|
"""
|
|
27
27
|
self.mode = mode
|
|
28
28
|
self._initialized = False
|
|
29
|
-
self._runtime_info:
|
|
29
|
+
self._runtime_info: dict[str, Any] = {}
|
|
30
30
|
|
|
31
31
|
@abstractmethod
|
|
32
32
|
def initialize(self) -> None:
|
|
@@ -44,27 +44,27 @@ class ARuntimeBase(ABC):
|
|
|
44
44
|
pass
|
|
45
45
|
|
|
46
46
|
@abstractmethod
|
|
47
|
-
def get_runtime_info(self) ->
|
|
47
|
+
def get_runtime_info(self) -> dict[str, Any]:
|
|
48
48
|
"""Get runtime information."""
|
|
49
49
|
pass
|
|
50
50
|
|
|
51
|
-
def get_platform_info(self) ->
|
|
51
|
+
def get_platform_info(self) -> dict[str, Any]:
|
|
52
52
|
"""Get platform information."""
|
|
53
53
|
return {}
|
|
54
54
|
|
|
55
|
-
def get_python_info(self) ->
|
|
55
|
+
def get_python_info(self) -> dict[str, Any]:
|
|
56
56
|
"""Get Python information."""
|
|
57
57
|
return {}
|
|
58
58
|
|
|
59
|
-
def get_system_info(self) ->
|
|
59
|
+
def get_system_info(self) -> dict[str, Any]:
|
|
60
60
|
"""Get system information."""
|
|
61
61
|
return {}
|
|
62
62
|
|
|
63
|
-
def get_memory_info(self) ->
|
|
63
|
+
def get_memory_info(self) -> dict[str, Any]:
|
|
64
64
|
"""Get memory information."""
|
|
65
65
|
return {}
|
|
66
66
|
|
|
67
|
-
def get_cpu_info(self) ->
|
|
67
|
+
def get_cpu_info(self) -> dict[str, Any]:
|
|
68
68
|
"""Get CPU information."""
|
|
69
69
|
return {}
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ class AEnvironmentBase(ABC):
|
|
|
74
74
|
|
|
75
75
|
def __init__(self):
|
|
76
76
|
"""Initialize environment base."""
|
|
77
|
-
self._environment_vars:
|
|
77
|
+
self._environment_vars: dict[str, str] = {}
|
|
78
78
|
self._environment_type: EnvironmentType = EnvironmentType.UNKNOWN
|
|
79
79
|
|
|
80
80
|
@abstractmethod
|
|
@@ -103,7 +103,7 @@ class AEnvironmentBase(ABC):
|
|
|
103
103
|
pass
|
|
104
104
|
|
|
105
105
|
@abstractmethod
|
|
106
|
-
def get_all_environment_variables(self) ->
|
|
106
|
+
def get_all_environment_variables(self) -> dict[str, str]:
|
|
107
107
|
"""Get all environment variables."""
|
|
108
108
|
pass
|
|
109
109
|
|
|
@@ -123,7 +123,7 @@ class AEnvironmentBase(ABC):
|
|
|
123
123
|
pass
|
|
124
124
|
|
|
125
125
|
@abstractmethod
|
|
126
|
-
def get_environment_config(self) ->
|
|
126
|
+
def get_environment_config(self) -> dict[str, Any]:
|
|
127
127
|
"""Get environment configuration."""
|
|
128
128
|
pass
|
|
129
129
|
|
|
@@ -134,7 +134,7 @@ class APlatformBase(ABC):
|
|
|
134
134
|
def __init__(self):
|
|
135
135
|
"""Initialize platform base."""
|
|
136
136
|
self._platform_type: PlatformType = PlatformType.UNKNOWN
|
|
137
|
-
self._platform_info:
|
|
137
|
+
self._platform_info: dict[str, Any] = {}
|
|
138
138
|
|
|
139
139
|
@abstractmethod
|
|
140
140
|
def detect_platform(self) -> PlatformType:
|
|
@@ -182,7 +182,7 @@ class APlatformBase(ABC):
|
|
|
182
182
|
pass
|
|
183
183
|
|
|
184
184
|
@abstractmethod
|
|
185
|
-
def get_platform_specific_info(self) ->
|
|
185
|
+
def get_platform_specific_info(self) -> dict[str, Any]:
|
|
186
186
|
"""Get platform-specific information."""
|
|
187
187
|
pass
|
|
188
188
|
|
|
@@ -193,7 +193,7 @@ class APythonBase(ABC):
|
|
|
193
193
|
def __init__(self):
|
|
194
194
|
"""Initialize Python base."""
|
|
195
195
|
self._python_version: PythonVersion = PythonVersion.UNKNOWN
|
|
196
|
-
self._python_info:
|
|
196
|
+
self._python_info: dict[str, Any] = {}
|
|
197
197
|
|
|
198
198
|
@abstractmethod
|
|
199
199
|
def get_python_version(self) -> PythonVersion:
|
|
@@ -216,7 +216,7 @@ class APythonBase(ABC):
|
|
|
216
216
|
pass
|
|
217
217
|
|
|
218
218
|
@abstractmethod
|
|
219
|
-
def get_python_paths(self) ->
|
|
219
|
+
def get_python_paths(self) -> list[str]:
|
|
220
220
|
"""Get Python module search paths."""
|
|
221
221
|
pass
|
|
222
222
|
|
|
@@ -236,12 +236,12 @@ class APythonBase(ABC):
|
|
|
236
236
|
pass
|
|
237
237
|
|
|
238
238
|
@abstractmethod
|
|
239
|
-
def get_installed_packages(self) ->
|
|
239
|
+
def get_installed_packages(self) -> list[str]:
|
|
240
240
|
"""Get list of installed packages."""
|
|
241
241
|
pass
|
|
242
242
|
|
|
243
243
|
@abstractmethod
|
|
244
|
-
def get_package_info(self, package_name: str) ->
|
|
244
|
+
def get_package_info(self, package_name: str) -> dict[str, Any]:
|
|
245
245
|
"""Get package information."""
|
|
246
246
|
pass
|
|
247
247
|
|
|
@@ -251,11 +251,11 @@ class AReflectionBase(ABC):
|
|
|
251
251
|
|
|
252
252
|
def __init__(self):
|
|
253
253
|
"""Initialize reflection base."""
|
|
254
|
-
self._module_cache:
|
|
255
|
-
self._class_cache:
|
|
254
|
+
self._module_cache: dict[str, Any] = {}
|
|
255
|
+
self._class_cache: dict[str, type] = {}
|
|
256
256
|
|
|
257
257
|
@abstractmethod
|
|
258
|
-
def get_class(self, class_name: str, module_name: Optional[str] = None) -> Optional[
|
|
258
|
+
def get_class(self, class_name: str, module_name: Optional[str] = None) -> Optional[type]:
|
|
259
259
|
"""Get class by name."""
|
|
260
260
|
pass
|
|
261
261
|
|
|
@@ -285,27 +285,27 @@ class AReflectionBase(ABC):
|
|
|
285
285
|
pass
|
|
286
286
|
|
|
287
287
|
@abstractmethod
|
|
288
|
-
def get_methods(self, obj: Any) ->
|
|
288
|
+
def get_methods(self, obj: Any) -> list[str]:
|
|
289
289
|
"""Get object methods."""
|
|
290
290
|
pass
|
|
291
291
|
|
|
292
292
|
@abstractmethod
|
|
293
|
-
def get_attributes(self, obj: Any) ->
|
|
293
|
+
def get_attributes(self, obj: Any) -> list[str]:
|
|
294
294
|
"""Get object attributes."""
|
|
295
295
|
pass
|
|
296
296
|
|
|
297
297
|
@abstractmethod
|
|
298
|
-
def get_class_hierarchy(self, cls:
|
|
298
|
+
def get_class_hierarchy(self, cls: type) -> list[type]:
|
|
299
299
|
"""Get class hierarchy."""
|
|
300
300
|
pass
|
|
301
301
|
|
|
302
302
|
@abstractmethod
|
|
303
|
-
def is_subclass(self, cls:
|
|
303
|
+
def is_subclass(self, cls: type, parent_cls: type) -> bool:
|
|
304
304
|
"""Check if class is subclass of parent."""
|
|
305
305
|
pass
|
|
306
306
|
|
|
307
307
|
@abstractmethod
|
|
308
|
-
def get_type_info(self, obj: Any) ->
|
|
308
|
+
def get_type_info(self, obj: Any) -> dict[str, Any]:
|
|
309
309
|
"""Get type information."""
|
|
310
310
|
pass
|
|
311
311
|
|
|
@@ -315,8 +315,8 @@ class ARuntimeManagerBase(ABC):
|
|
|
315
315
|
|
|
316
316
|
def __init__(self):
|
|
317
317
|
"""Initialize runtime manager."""
|
|
318
|
-
self._runtime_components:
|
|
319
|
-
self._component_states:
|
|
318
|
+
self._runtime_components: dict[str, Any] = {}
|
|
319
|
+
self._component_states: dict[str, bool] = {}
|
|
320
320
|
|
|
321
321
|
@abstractmethod
|
|
322
322
|
def register_component(self, name: str, component: Any) -> None:
|
|
@@ -334,7 +334,7 @@ class ARuntimeManagerBase(ABC):
|
|
|
334
334
|
pass
|
|
335
335
|
|
|
336
336
|
@abstractmethod
|
|
337
|
-
def list_components(self) ->
|
|
337
|
+
def list_components(self) -> list[str]:
|
|
338
338
|
"""List all registered components."""
|
|
339
339
|
pass
|
|
340
340
|
|
|
@@ -354,17 +354,17 @@ class ARuntimeManagerBase(ABC):
|
|
|
354
354
|
pass
|
|
355
355
|
|
|
356
356
|
@abstractmethod
|
|
357
|
-
def get_component_status(self) ->
|
|
357
|
+
def get_component_status(self) -> dict[str, bool]:
|
|
358
358
|
"""Get status of all components."""
|
|
359
359
|
pass
|
|
360
360
|
|
|
361
361
|
@abstractmethod
|
|
362
|
-
def initialize_all_components(self) ->
|
|
362
|
+
def initialize_all_components(self) -> dict[str, bool]:
|
|
363
363
|
"""Initialize all components."""
|
|
364
364
|
pass
|
|
365
365
|
|
|
366
366
|
@abstractmethod
|
|
367
|
-
def shutdown_all_components(self) ->
|
|
367
|
+
def shutdown_all_components(self) -> dict[str, bool]:
|
|
368
368
|
"""Shutdown all components."""
|
|
369
369
|
pass
|
|
370
370
|
|
|
@@ -396,27 +396,27 @@ class BaseRuntime(ARuntimeBase):
|
|
|
396
396
|
"""Check if runtime is initialized."""
|
|
397
397
|
return self._initialized
|
|
398
398
|
|
|
399
|
-
def get_runtime_info(self) ->
|
|
399
|
+
def get_runtime_info(self) -> dict[str, Any]:
|
|
400
400
|
"""Get runtime information."""
|
|
401
401
|
return self._runtime_info.copy()
|
|
402
402
|
|
|
403
|
-
def get_platform_info(self) ->
|
|
403
|
+
def get_platform_info(self) -> dict[str, Any]:
|
|
404
404
|
"""Get platform information."""
|
|
405
405
|
return {}
|
|
406
406
|
|
|
407
|
-
def get_python_info(self) ->
|
|
407
|
+
def get_python_info(self) -> dict[str, Any]:
|
|
408
408
|
"""Get Python information."""
|
|
409
409
|
return {}
|
|
410
410
|
|
|
411
|
-
def get_system_info(self) ->
|
|
411
|
+
def get_system_info(self) -> dict[str, Any]:
|
|
412
412
|
"""Get system information."""
|
|
413
413
|
return {}
|
|
414
414
|
|
|
415
|
-
def get_memory_info(self) ->
|
|
415
|
+
def get_memory_info(self) -> dict[str, Any]:
|
|
416
416
|
"""Get memory information."""
|
|
417
417
|
return {}
|
|
418
418
|
|
|
419
|
-
def get_cpu_info(self) ->
|
|
419
|
+
def get_cpu_info(self) -> dict[str, Any]:
|
|
420
420
|
"""Get CPU information."""
|
|
421
421
|
return {}
|
|
422
422
|
|
|
@@ -444,7 +444,7 @@ class BaseRuntime(ARuntimeBase):
|
|
|
444
444
|
"""Get component."""
|
|
445
445
|
return self._components.get(name)
|
|
446
446
|
|
|
447
|
-
def list_components(self) ->
|
|
447
|
+
def list_components(self) -> list[str]:
|
|
448
448
|
"""List all components."""
|
|
449
449
|
return list(self._components.keys())
|
|
450
450
|
|
|
@@ -471,14 +471,14 @@ class BaseRuntime(ARuntimeBase):
|
|
|
471
471
|
return component.is_initialized()
|
|
472
472
|
return False
|
|
473
473
|
|
|
474
|
-
def get_component_status(self) ->
|
|
474
|
+
def get_component_status(self) -> dict[str, bool]:
|
|
475
475
|
"""Get status of all components."""
|
|
476
476
|
return {name: self.is_component_initialized(name) for name in self._components.keys()}
|
|
477
477
|
|
|
478
|
-
def initialize_all_components(self) ->
|
|
478
|
+
def initialize_all_components(self) -> dict[str, bool]:
|
|
479
479
|
"""Initialize all components."""
|
|
480
480
|
return {name: self.initialize_component(name) for name in self._components.keys()}
|
|
481
481
|
|
|
482
|
-
def shutdown_all_components(self) ->
|
|
482
|
+
def shutdown_all_components(self) -> dict[str, bool]:
|
|
483
483
|
"""Shutdown all components."""
|
|
484
484
|
return {name: self.shutdown_component(name) for name in self._components.keys()}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Company: eXonware.com
|
|
3
3
|
Author: Eng. Muhammad AlShehri
|
|
4
4
|
Email: connect@exonware.com
|
|
5
|
-
Version: 0.0.1.
|
|
5
|
+
Version: 0.0.1.411
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Runtime module contracts - interfaces and enums for runtime environment functionality.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
from abc import ABC, abstractmethod
|
|
12
|
-
from typing import Any,
|
|
12
|
+
from typing import Any, Optional, Union, Callable
|
|
13
13
|
import sys
|
|
14
14
|
|
|
15
15
|
# Import enums from types module
|
|
@@ -45,7 +45,7 @@ class IEnvironmentManager(ABC):
|
|
|
45
45
|
pass
|
|
46
46
|
|
|
47
47
|
@abstractmethod
|
|
48
|
-
def get_all_environment_variables(self) ->
|
|
48
|
+
def get_all_environment_variables(self) -> dict[str, str]:
|
|
49
49
|
"""Get all environment variables."""
|
|
50
50
|
pass
|
|
51
51
|
|
|
@@ -93,12 +93,12 @@ class IPythonInfo(ABC):
|
|
|
93
93
|
pass
|
|
94
94
|
|
|
95
95
|
@abstractmethod
|
|
96
|
-
def get_python_path(self) ->
|
|
96
|
+
def get_python_path(self) -> list[str]:
|
|
97
97
|
"""Get Python path."""
|
|
98
98
|
pass
|
|
99
99
|
|
|
100
100
|
@abstractmethod
|
|
101
|
-
def get_installed_packages(self) ->
|
|
101
|
+
def get_installed_packages(self) -> dict[str, str]:
|
|
102
102
|
"""Get installed packages."""
|
|
103
103
|
pass
|
|
104
104
|
|
|
@@ -112,7 +112,7 @@ class IReflectionUtils(ABC):
|
|
|
112
112
|
"""Interface for reflection utilities."""
|
|
113
113
|
|
|
114
114
|
@abstractmethod
|
|
115
|
-
def get_class_from_string(self, class_path: str) ->
|
|
115
|
+
def get_class_from_string(self, class_path: str) -> type:
|
|
116
116
|
"""Get class from string path."""
|
|
117
117
|
pass
|
|
118
118
|
|
|
@@ -122,17 +122,17 @@ class IReflectionUtils(ABC):
|
|
|
122
122
|
pass
|
|
123
123
|
|
|
124
124
|
@abstractmethod
|
|
125
|
-
def find_classes_in_module(self, module: Any, base_class:
|
|
125
|
+
def find_classes_in_module(self, module: Any, base_class: type) -> list[type]:
|
|
126
126
|
"""Find classes in module."""
|
|
127
127
|
pass
|
|
128
128
|
|
|
129
129
|
@abstractmethod
|
|
130
|
-
def get_class_hierarchy(self, cls:
|
|
130
|
+
def get_class_hierarchy(self, cls: type) -> list[type]:
|
|
131
131
|
"""Get class hierarchy."""
|
|
132
132
|
pass
|
|
133
133
|
|
|
134
134
|
@abstractmethod
|
|
135
|
-
def get_class_attributes(self, cls:
|
|
135
|
+
def get_class_attributes(self, cls: type) -> dict[str, Any]:
|
|
136
136
|
"""Get class attributes."""
|
|
137
137
|
pass
|
|
138
138
|
|