exonware-xwsystem 0.0.1.410__py3-none-any.whl → 0.1.0.1__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 +1 -1
- exonware/conf.py +1 -1
- exonware/xwsystem/__init__.py +2 -2
- exonware/xwsystem/caching/__init__.py +1 -1
- exonware/xwsystem/caching/base.py +2 -2
- exonware/xwsystem/caching/bloom_cache.py +2 -2
- exonware/xwsystem/caching/cache_manager.py +1 -1
- exonware/xwsystem/caching/conditional.py +2 -2
- exonware/xwsystem/caching/contracts.py +1 -1
- exonware/xwsystem/caching/decorators.py +2 -2
- exonware/xwsystem/caching/defs.py +1 -1
- exonware/xwsystem/caching/disk_cache.py +1 -1
- exonware/xwsystem/caching/distributed.py +1 -1
- exonware/xwsystem/caching/errors.py +1 -1
- exonware/xwsystem/caching/events.py +2 -2
- exonware/xwsystem/caching/eviction_strategies.py +1 -1
- exonware/xwsystem/caching/fluent.py +1 -1
- exonware/xwsystem/caching/integrity.py +1 -1
- exonware/xwsystem/caching/lfu_cache.py +2 -2
- exonware/xwsystem/caching/lfu_optimized.py +3 -3
- exonware/xwsystem/caching/lru_cache.py +2 -2
- exonware/xwsystem/caching/memory_bounded.py +2 -2
- exonware/xwsystem/caching/metrics_exporter.py +2 -2
- exonware/xwsystem/caching/observable_cache.py +1 -1
- exonware/xwsystem/caching/pluggable_cache.py +2 -2
- exonware/xwsystem/caching/rate_limiter.py +1 -1
- exonware/xwsystem/caching/read_through.py +2 -2
- exonware/xwsystem/caching/secure_cache.py +1 -1
- exonware/xwsystem/caching/serializable.py +2 -2
- exonware/xwsystem/caching/stats.py +1 -1
- exonware/xwsystem/caching/tagging.py +2 -2
- exonware/xwsystem/caching/ttl_cache.py +1 -1
- exonware/xwsystem/caching/two_tier_cache.py +1 -1
- exonware/xwsystem/caching/utils.py +1 -1
- exonware/xwsystem/caching/validation.py +1 -1
- exonware/xwsystem/caching/warming.py +2 -2
- exonware/xwsystem/caching/write_behind.py +2 -2
- exonware/xwsystem/cli/__init__.py +1 -1
- exonware/xwsystem/cli/args.py +1 -1
- exonware/xwsystem/cli/base.py +1 -1
- exonware/xwsystem/cli/colors.py +1 -1
- exonware/xwsystem/cli/console.py +1 -1
- exonware/xwsystem/cli/contracts.py +1 -1
- 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 +1 -1
- exonware/xwsystem/config/__init__.py +1 -1
- exonware/xwsystem/config/base.py +2 -2
- exonware/xwsystem/config/contracts.py +1 -1
- exonware/xwsystem/config/defaults.py +1 -1
- 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 +115 -388
- exonware/xwsystem/http_client/__init__.py +1 -1
- exonware/xwsystem/http_client/advanced_client.py +2 -2
- exonware/xwsystem/http_client/base.py +2 -2
- exonware/xwsystem/http_client/client.py +2 -2
- exonware/xwsystem/http_client/contracts.py +1 -1
- exonware/xwsystem/http_client/defs.py +1 -1
- exonware/xwsystem/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 +1 -1
- exonware/xwsystem/io/archive/archive_files.py +1 -1
- exonware/xwsystem/io/archive/archivers.py +2 -2
- exonware/xwsystem/io/archive/base.py +6 -6
- 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 +6 -3
- exonware/xwsystem/io/archive/formats/lz4_format.py +6 -3
- exonware/xwsystem/io/archive/formats/rar.py +6 -3
- exonware/xwsystem/io/archive/formats/sevenzip.py +6 -3
- exonware/xwsystem/io/archive/formats/squashfs_format.py +1 -1
- exonware/xwsystem/io/archive/formats/tar.py +1 -1
- exonware/xwsystem/io/archive/formats/wim_format.py +6 -3
- exonware/xwsystem/io/archive/formats/zip.py +1 -1
- exonware/xwsystem/io/archive/formats/zpaq_format.py +1 -1
- exonware/xwsystem/io/archive/formats/zstandard.py +6 -3
- exonware/xwsystem/io/base.py +1 -1
- exonware/xwsystem/io/codec/__init__.py +1 -1
- exonware/xwsystem/io/codec/base.py +6 -6
- exonware/xwsystem/io/codec/contracts.py +1 -1
- exonware/xwsystem/io/codec/registry.py +5 -5
- exonware/xwsystem/io/common/__init__.py +1 -1
- exonware/xwsystem/io/common/base.py +1 -1
- exonware/xwsystem/io/common/lock.py +1 -1
- exonware/xwsystem/io/common/watcher.py +1 -1
- exonware/xwsystem/io/contracts.py +1 -1
- exonware/xwsystem/io/data_operations.py +746 -0
- exonware/xwsystem/io/defs.py +1 -1
- exonware/xwsystem/io/errors.py +1 -1
- exonware/xwsystem/io/facade.py +2 -2
- exonware/xwsystem/io/file/__init__.py +1 -1
- exonware/xwsystem/io/file/base.py +1 -1
- exonware/xwsystem/io/file/conversion.py +1 -1
- exonware/xwsystem/io/file/file.py +8 -6
- 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 +4 -4
- exonware/xwsystem/io/file/source.py +20 -9
- 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 +1 -1
- exonware/xwsystem/io/folder/folder.py +2 -2
- exonware/xwsystem/io/serialization/__init__.py +1 -1
- exonware/xwsystem/io/serialization/auto_serializer.py +52 -39
- exonware/xwsystem/io/serialization/base.py +165 -1
- exonware/xwsystem/io/serialization/contracts.py +88 -1
- exonware/xwsystem/io/serialization/defs.py +1 -1
- exonware/xwsystem/io/serialization/errors.py +1 -1
- exonware/xwsystem/io/serialization/flyweight.py +10 -10
- exonware/xwsystem/io/serialization/format_detector.py +8 -5
- 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/append_only_log.py +201 -0
- exonware/xwsystem/io/serialization/formats/text/configparser.py +1 -1
- exonware/xwsystem/io/serialization/formats/text/csv.py +1 -1
- exonware/xwsystem/io/serialization/formats/text/formdata.py +1 -1
- exonware/xwsystem/io/serialization/formats/text/json.py +43 -20
- exonware/xwsystem/io/serialization/formats/text/json5.py +7 -5
- exonware/xwsystem/io/serialization/formats/text/jsonlines.py +316 -22
- exonware/xwsystem/io/serialization/formats/text/multipart.py +1 -1
- exonware/xwsystem/io/serialization/formats/text/toml.py +19 -3
- exonware/xwsystem/io/serialization/formats/text/xml.py +8 -1
- exonware/xwsystem/io/serialization/formats/text/yaml.py +52 -2
- exonware/xwsystem/io/serialization/parsers/__init__.py +15 -0
- exonware/xwsystem/io/serialization/parsers/base.py +59 -0
- exonware/xwsystem/io/serialization/parsers/hybrid_parser.py +61 -0
- exonware/xwsystem/io/serialization/parsers/msgspec_parser.py +45 -0
- exonware/xwsystem/io/serialization/parsers/orjson_direct_parser.py +53 -0
- exonware/xwsystem/io/serialization/parsers/orjson_parser.py +59 -0
- exonware/xwsystem/io/serialization/parsers/pysimdjson_parser.py +51 -0
- exonware/xwsystem/io/serialization/parsers/rapidjson_parser.py +50 -0
- exonware/xwsystem/io/serialization/parsers/registry.py +90 -0
- exonware/xwsystem/io/serialization/parsers/standard.py +43 -0
- exonware/xwsystem/io/serialization/parsers/ujson_parser.py +50 -0
- exonware/xwsystem/io/serialization/registry.py +1 -1
- exonware/xwsystem/io/serialization/serializer.py +175 -3
- exonware/xwsystem/io/serialization/utils/__init__.py +1 -1
- exonware/xwsystem/io/serialization/utils/path_ops.py +1 -1
- exonware/xwsystem/io/stream/__init__.py +1 -1
- exonware/xwsystem/io/stream/async_operations.py +1 -1
- exonware/xwsystem/io/stream/base.py +1 -1
- exonware/xwsystem/io/stream/codec_io.py +1 -1
- exonware/xwsystem/ipc/async_fabric.py +1 -2
- exonware/xwsystem/ipc/base.py +2 -2
- exonware/xwsystem/ipc/contracts.py +2 -2
- exonware/xwsystem/ipc/defs.py +1 -1
- exonware/xwsystem/ipc/errors.py +2 -2
- exonware/xwsystem/ipc/pipes.py +2 -2
- exonware/xwsystem/ipc/shared_memory.py +2 -2
- exonware/xwsystem/monitoring/base.py +2 -2
- exonware/xwsystem/monitoring/contracts.py +1 -1
- exonware/xwsystem/monitoring/defs.py +1 -1
- exonware/xwsystem/monitoring/error_recovery.py +2 -2
- exonware/xwsystem/monitoring/errors.py +2 -2
- exonware/xwsystem/monitoring/memory_monitor.py +1 -1
- exonware/xwsystem/monitoring/performance_manager_generic.py +2 -2
- exonware/xwsystem/monitoring/performance_validator.py +1 -1
- exonware/xwsystem/monitoring/system_monitor.py +2 -2
- exonware/xwsystem/monitoring/tracing.py +2 -2
- exonware/xwsystem/monitoring/tracker.py +1 -1
- exonware/xwsystem/operations/__init__.py +1 -1
- exonware/xwsystem/operations/base.py +1 -1
- exonware/xwsystem/operations/defs.py +1 -1
- exonware/xwsystem/operations/diff.py +1 -1
- exonware/xwsystem/operations/merge.py +1 -1
- exonware/xwsystem/operations/patch.py +1 -1
- exonware/xwsystem/patterns/base.py +2 -2
- exonware/xwsystem/patterns/context_manager.py +2 -2
- exonware/xwsystem/patterns/contracts.py +9 -9
- exonware/xwsystem/patterns/defs.py +1 -1
- exonware/xwsystem/patterns/dynamic_facade.py +8 -8
- exonware/xwsystem/patterns/errors.py +5 -5
- exonware/xwsystem/patterns/handler_factory.py +6 -6
- exonware/xwsystem/patterns/object_pool.py +7 -7
- exonware/xwsystem/patterns/registry.py +3 -3
- exonware/xwsystem/plugins/__init__.py +1 -1
- exonware/xwsystem/plugins/base.py +5 -5
- exonware/xwsystem/plugins/contracts.py +5 -5
- exonware/xwsystem/plugins/defs.py +1 -1
- exonware/xwsystem/plugins/errors.py +4 -4
- exonware/xwsystem/runtime/__init__.py +1 -1
- exonware/xwsystem/runtime/base.py +6 -6
- exonware/xwsystem/runtime/contracts.py +6 -6
- exonware/xwsystem/runtime/defs.py +1 -1
- exonware/xwsystem/runtime/env.py +2 -2
- exonware/xwsystem/runtime/errors.py +1 -1
- exonware/xwsystem/runtime/reflection.py +8 -8
- exonware/xwsystem/security/auth.py +1 -1
- exonware/xwsystem/security/base.py +2 -2
- exonware/xwsystem/security/contracts.py +1 -1
- exonware/xwsystem/security/crypto.py +2 -2
- exonware/xwsystem/security/defs.py +1 -1
- exonware/xwsystem/security/errors.py +2 -2
- exonware/xwsystem/security/hazmat.py +2 -2
- exonware/xwsystem/shared/__init__.py +1 -1
- exonware/xwsystem/shared/base.py +1 -1
- exonware/xwsystem/shared/contracts.py +1 -1
- 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 +2 -2
- exonware/xwsystem/structures/contracts.py +1 -1
- exonware/xwsystem/structures/defs.py +1 -1
- exonware/xwsystem/structures/errors.py +2 -2
- exonware/xwsystem/threading/async_primitives.py +2 -2
- exonware/xwsystem/threading/base.py +2 -2
- exonware/xwsystem/threading/contracts.py +1 -1
- exonware/xwsystem/threading/defs.py +1 -1
- exonware/xwsystem/threading/errors.py +2 -2
- exonware/xwsystem/threading/safe_factory.py +6 -6
- exonware/xwsystem/utils/base.py +2 -2
- exonware/xwsystem/utils/contracts.py +1 -1
- exonware/xwsystem/utils/dt/__init__.py +1 -1
- exonware/xwsystem/utils/dt/base.py +2 -2
- exonware/xwsystem/utils/dt/contracts.py +1 -1
- exonware/xwsystem/utils/dt/defs.py +1 -1
- exonware/xwsystem/utils/dt/errors.py +2 -2
- exonware/xwsystem/utils/dt/formatting.py +1 -1
- exonware/xwsystem/utils/dt/humanize.py +2 -2
- exonware/xwsystem/utils/dt/parsing.py +1 -1
- exonware/xwsystem/utils/dt/timezone_utils.py +1 -1
- exonware/xwsystem/utils/errors.py +2 -2
- exonware/xwsystem/utils/utils_contracts.py +1 -1
- exonware/xwsystem/validation/__init__.py +1 -1
- exonware/xwsystem/validation/base.py +15 -15
- exonware/xwsystem/validation/contracts.py +1 -1
- exonware/xwsystem/validation/data_validator.py +10 -0
- exonware/xwsystem/validation/declarative.py +9 -9
- exonware/xwsystem/validation/defs.py +1 -1
- exonware/xwsystem/validation/errors.py +2 -2
- exonware/xwsystem/validation/fluent_validator.py +4 -4
- exonware/xwsystem/version.py +4 -4
- {exonware_xwsystem-0.0.1.410.dist-info → exonware_xwsystem-0.1.0.1.dist-info}/METADATA +3 -3
- exonware_xwsystem-0.1.0.1.dist-info/RECORD +284 -0
- exonware/xwsystem/caching/USAGE_GUIDE.md +0 -779
- exonware/xwsystem/utils/test_runner.py +0 -526
- exonware_xwsystem-0.0.1.410.dist-info/RECORD +0 -273
- {exonware_xwsystem-0.0.1.410.dist-info → exonware_xwsystem-0.1.0.1.dist-info}/WHEEL +0 -0
- {exonware_xwsystem-0.0.1.410.dist-info → exonware_xwsystem-0.1.0.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,7 @@ components to reduce memory allocation overhead and improve performance.
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import threading
|
|
10
|
-
from typing import Any, Callable, Optional
|
|
10
|
+
from typing import Any, Callable, Optional
|
|
11
11
|
# Root cause: Migrating to Python 3.12 built-in generic syntax for consistency
|
|
12
12
|
# Priority #3: Maintainability - Modern type annotations improve code clarity
|
|
13
13
|
|
|
@@ -36,13 +36,13 @@ class ObjectPool:
|
|
|
36
36
|
enable_thread_safety: Whether to use thread-safe operations
|
|
37
37
|
component_name: Name for logging purposes
|
|
38
38
|
"""
|
|
39
|
-
self._pools: dict[
|
|
39
|
+
self._pools: dict[type, list[Any]] = {}
|
|
40
40
|
self._max_size = max_size
|
|
41
41
|
self._lock = threading.RLock() if enable_thread_safety else None
|
|
42
42
|
self._logger = get_logger(f"{component_name}.object_pool")
|
|
43
43
|
self._stats = {"created": 0, "reused": 0, "released": 0, "discarded": 0}
|
|
44
44
|
|
|
45
|
-
def get[T](self, obj_type:
|
|
45
|
+
def get[T](self, obj_type: type[T], *args, **kwargs) -> T:
|
|
46
46
|
"""
|
|
47
47
|
Get an object from the pool or create a new one if the pool is empty.
|
|
48
48
|
|
|
@@ -62,7 +62,7 @@ class ObjectPool:
|
|
|
62
62
|
else:
|
|
63
63
|
return self._get_from_pool(obj_type, pool, *args, **kwargs)
|
|
64
64
|
|
|
65
|
-
def _get_from_pool[T](self, obj_type:
|
|
65
|
+
def _get_from_pool[T](self, obj_type: type[T], pool: list[Any], *args, **kwargs) -> T:
|
|
66
66
|
"""Internal method to get object from pool."""
|
|
67
67
|
if pool:
|
|
68
68
|
obj = pool.pop()
|
|
@@ -100,7 +100,7 @@ class ObjectPool:
|
|
|
100
100
|
else:
|
|
101
101
|
self._release_to_pool(obj, obj_type)
|
|
102
102
|
|
|
103
|
-
def _release_to_pool(self, obj: Any, obj_type:
|
|
103
|
+
def _release_to_pool(self, obj: Any, obj_type: type) -> None:
|
|
104
104
|
"""Internal method to release object to pool."""
|
|
105
105
|
if obj_type not in self._pools:
|
|
106
106
|
self._pools[obj_type] = []
|
|
@@ -115,7 +115,7 @@ class ObjectPool:
|
|
|
115
115
|
self._stats["discarded"] += 1
|
|
116
116
|
self._logger.debug(f"Discarded {obj_type.__name__} (pool full)")
|
|
117
117
|
|
|
118
|
-
def clear(self, obj_type: Optional[
|
|
118
|
+
def clear(self, obj_type: Optional[type] = None) -> None:
|
|
119
119
|
"""
|
|
120
120
|
Clear objects from the pool.
|
|
121
121
|
|
|
@@ -128,7 +128,7 @@ class ObjectPool:
|
|
|
128
128
|
else:
|
|
129
129
|
self._clear_pool(obj_type)
|
|
130
130
|
|
|
131
|
-
def _clear_pool(self, obj_type: Optional[
|
|
131
|
+
def _clear_pool(self, obj_type: Optional[type] = None) -> None:
|
|
132
132
|
"""Internal method to clear pool."""
|
|
133
133
|
if obj_type is None:
|
|
134
134
|
# Clear all pools
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Company: eXonware.com
|
|
5
5
|
Author: Eng. Muhammad AlShehri
|
|
6
6
|
Email: connect@exonware.com
|
|
7
|
-
Version: 0.0.1
|
|
7
|
+
Version: 0.1.0.1
|
|
8
8
|
Generation Date: October 26, 2025
|
|
9
9
|
|
|
10
10
|
Generic registry pattern for dynamic registration and discovery.
|
|
@@ -12,7 +12,7 @@ Generic registry pattern for dynamic registration and discovery.
|
|
|
12
12
|
|
|
13
13
|
import threading
|
|
14
14
|
import time
|
|
15
|
-
from typing import Any, Optional,
|
|
15
|
+
from typing import Any, Optional, Callable
|
|
16
16
|
# Root cause: Migrating to Python 3.12 built-in generic syntax for consistency
|
|
17
17
|
# Priority #3: Maintainability - Modern type annotations improve code clarity
|
|
18
18
|
from abc import ABC, abstractmethod
|
|
@@ -81,7 +81,7 @@ class GenericRegistry[T](IRegistry[T]):
|
|
|
81
81
|
def __init__(
|
|
82
82
|
self,
|
|
83
83
|
name: str = "generic",
|
|
84
|
-
item_type: Optional[
|
|
84
|
+
item_type: Optional[type] = None,
|
|
85
85
|
allow_overwrite: bool = False,
|
|
86
86
|
auto_discovery: bool = False
|
|
87
87
|
):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/plugins/base.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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Plugin system base classes and management.
|
|
@@ -15,7 +15,7 @@ import threading
|
|
|
15
15
|
from abc import ABC, abstractmethod
|
|
16
16
|
from dataclasses import dataclass, field
|
|
17
17
|
from pathlib import Path
|
|
18
|
-
from typing import Any, Optional,
|
|
18
|
+
from typing import Any, Optional, Union
|
|
19
19
|
|
|
20
20
|
from importlib.metadata import entry_points
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@ from ..runtime.reflection import ReflectionUtils
|
|
|
24
24
|
from .contracts import IPlugin, PluginState, PluginType, PluginPriority
|
|
25
25
|
from .errors import PluginError
|
|
26
26
|
|
|
27
|
-
logger = get_logger("
|
|
27
|
+
logger = get_logger("xwsystem.plugins.base")
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
@dataclass
|
|
@@ -403,7 +403,7 @@ class APluginManager:
|
|
|
403
403
|
except Exception as e:
|
|
404
404
|
raise PluginError(f"Failed to load plugin from {file_path}: {e}") from e
|
|
405
405
|
|
|
406
|
-
def discover_entry_points(self, group: str = "
|
|
406
|
+
def discover_entry_points(self, group: str = "xwsystem.plugins") -> dict[str, dict[str, Any]]:
|
|
407
407
|
"""
|
|
408
408
|
Discover plugins through entry points.
|
|
409
409
|
|
|
@@ -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.1.0.1
|
|
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, Optional, Union, Iterator, Callable
|
|
13
|
+
from typing import Any, Optional, Union, Iterator, Callable
|
|
14
14
|
import importlib
|
|
15
15
|
|
|
16
16
|
# Import enums from types module
|
|
@@ -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) -> dict[str,
|
|
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
|
|
|
@@ -1,15 +1,15 @@
|
|
|
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.1.0.1
|
|
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, Optional
|
|
12
|
+
from typing import Any, Optional
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class PluginError(Exception):
|
|
@@ -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
|
|
|
@@ -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.1.0.1
|
|
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, Optional, Union,
|
|
13
|
+
from typing import Any, Optional, Union, Callable
|
|
14
14
|
from .contracts import RuntimeMode, PlatformType, PythonVersion, EnvironmentType
|
|
15
15
|
|
|
16
16
|
|
|
@@ -252,10 +252,10 @@ class AReflectionBase(ABC):
|
|
|
252
252
|
def __init__(self):
|
|
253
253
|
"""Initialize reflection base."""
|
|
254
254
|
self._module_cache: dict[str, Any] = {}
|
|
255
|
-
self._class_cache: dict[str,
|
|
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
|
|
|
@@ -295,12 +295,12 @@ class AReflectionBase(ABC):
|
|
|
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
|
|
|
@@ -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.1.0.1
|
|
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, Optional, Union,
|
|
12
|
+
from typing import Any, Optional, Union, Callable
|
|
13
13
|
import sys
|
|
14
14
|
|
|
15
15
|
# Import enums from types module
|
|
@@ -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
|
|
exonware/xwsystem/runtime/env.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.1.0.1
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Environment management utilities for runtime configuration and detection.
|
|
@@ -16,7 +16,7 @@ from typing import Any, Optional, Union
|
|
|
16
16
|
|
|
17
17
|
from ..config.logging_setup import get_logger
|
|
18
18
|
|
|
19
|
-
logger = get_logger("
|
|
19
|
+
logger = get_logger("xwsystem.runtime.env")
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class EnvironmentManager:
|
|
@@ -2,7 +2,7 @@
|
|
|
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.1.0.1
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Reflection utilities for dynamic code inspection and manipulation.
|
|
@@ -12,11 +12,11 @@ import importlib
|
|
|
12
12
|
import inspect
|
|
13
13
|
import sys
|
|
14
14
|
from pathlib import Path
|
|
15
|
-
from typing import Any, Callable, Optional,
|
|
15
|
+
from typing import Any, Callable, Optional, Union
|
|
16
16
|
|
|
17
17
|
from ..config.logging_setup import get_logger
|
|
18
18
|
|
|
19
|
-
logger = get_logger("
|
|
19
|
+
logger = get_logger("xwsystem.runtime.reflection")
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class ReflectionUtils:
|
|
@@ -26,7 +26,7 @@ class ReflectionUtils:
|
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
@staticmethod
|
|
29
|
-
def get_class_info(cls:
|
|
29
|
+
def get_class_info(cls: type) -> dict[str, Any]:
|
|
30
30
|
"""
|
|
31
31
|
Get comprehensive information about a class.
|
|
32
32
|
|
|
@@ -164,7 +164,7 @@ class ReflectionUtils:
|
|
|
164
164
|
raise
|
|
165
165
|
|
|
166
166
|
@staticmethod
|
|
167
|
-
def get_class_from_string(class_path: str) ->
|
|
167
|
+
def get_class_from_string(class_path: str) -> type:
|
|
168
168
|
"""
|
|
169
169
|
Get class from string path.
|
|
170
170
|
|
|
@@ -240,7 +240,7 @@ class ReflectionUtils:
|
|
|
240
240
|
return func(*args, **kwargs)
|
|
241
241
|
|
|
242
242
|
@staticmethod
|
|
243
|
-
def find_classes_in_module(module: Any, base_class: Optional[
|
|
243
|
+
def find_classes_in_module(module: Any, base_class: Optional[type] = None) -> list[type]:
|
|
244
244
|
"""
|
|
245
245
|
Find all classes in a module, optionally filtered by base class.
|
|
246
246
|
|
|
@@ -278,7 +278,7 @@ class ReflectionUtils:
|
|
|
278
278
|
return functions
|
|
279
279
|
|
|
280
280
|
@staticmethod
|
|
281
|
-
def get_all_subclasses(cls:
|
|
281
|
+
def get_all_subclasses(cls: type) -> list[type]:
|
|
282
282
|
"""
|
|
283
283
|
Get all subclasses of a class recursively.
|
|
284
284
|
|
|
@@ -313,7 +313,7 @@ class ReflectionUtils:
|
|
|
313
313
|
return False
|
|
314
314
|
|
|
315
315
|
@staticmethod
|
|
316
|
-
def get_method_resolution_order(cls:
|
|
316
|
+
def get_method_resolution_order(cls: type) -> list[str]:
|
|
317
317
|
"""
|
|
318
318
|
Get method resolution order for a class.
|
|
319
319
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/security/base.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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Security module base classes - abstract classes for security functionality.
|
|
@@ -2,7 +2,7 @@
|
|
|
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.1.0.1
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Cryptographic utilities for secure data handling and protection.
|
|
@@ -24,7 +24,7 @@ import bcrypt
|
|
|
24
24
|
from ..config.logging_setup import get_logger
|
|
25
25
|
from .errors import CryptographicError
|
|
26
26
|
|
|
27
|
-
logger = get_logger("
|
|
27
|
+
logger = get_logger("xwsystem.security.crypto")
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class SecureHash:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/security/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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Security module errors - exception classes for security functionality.
|
|
@@ -2,7 +2,7 @@
|
|
|
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.1.0.1
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Hazardous Materials (Hazmat) Layer - Low-level cryptographic primitives.
|
|
@@ -38,7 +38,7 @@ from cryptography.x509.oid import NameOID, ExtensionOID
|
|
|
38
38
|
|
|
39
39
|
from ..config.logging_setup import get_logger
|
|
40
40
|
|
|
41
|
-
logger = get_logger("
|
|
41
|
+
logger = get_logger("xwsystem.security.hazmat")
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class HazmatError(Exception):
|
exonware/xwsystem/shared/base.py
CHANGED
exonware/xwsystem/shared/defs.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/structures/base.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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Structures module base classes - abstract classes for data structure functionality.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/structures/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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Structures module errors - exception classes for data structure functionality.
|
|
@@ -2,7 +2,7 @@
|
|
|
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.1.0.1
|
|
6
6
|
Generation Date: September 04, 2025
|
|
7
7
|
|
|
8
8
|
Async-aware concurrency primitives and synchronization utilities.
|
|
@@ -18,7 +18,7 @@ from collections import defaultdict
|
|
|
18
18
|
|
|
19
19
|
from ..config.logging_setup import get_logger
|
|
20
20
|
|
|
21
|
-
logger = get_logger("
|
|
21
|
+
logger = get_logger("xwsystem.threading.async_primitives")
|
|
22
22
|
|
|
23
23
|
# Performance-aware logging - only log if debug is enabled
|
|
24
24
|
def _debug_log(message: str) -> None:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/threading/base.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.1.0.1
|
|
7
7
|
Generation Date: September 04, 2025
|
|
8
8
|
|
|
9
9
|
Threading module base classes - abstract classes for threading functionality.
|