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
|
@@ -3,7 +3,7 @@
|
|
|
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: 09-Nov-2025
|
|
8
8
|
|
|
9
9
|
Async Process Fabric
|
|
@@ -27,7 +27,6 @@ from typing import (
|
|
|
27
27
|
Any,
|
|
28
28
|
AsyncIterator,
|
|
29
29
|
Callable,
|
|
30
|
-
Dict,
|
|
31
30
|
Iterable,
|
|
32
31
|
Optional,
|
|
33
32
|
Sequence,
|
exonware/xwsystem/ipc/base.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/ipc/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
|
IPC module base classes - abstract classes for inter-process communication 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
|
IPC module contracts - interfaces and enums for inter-process communication.
|
|
@@ -124,7 +124,7 @@ class IProcessManager(ABC):
|
|
|
124
124
|
"""Interface for process management."""
|
|
125
125
|
|
|
126
126
|
@abstractmethod
|
|
127
|
-
def create_process(self, target: Callable, args: tuple = (), kwargs: Optional[
|
|
127
|
+
def create_process(self, target: Callable, args: tuple = (), kwargs: Optional[dict] = None) -> Process:
|
|
128
128
|
"""Create new process."""
|
|
129
129
|
pass
|
|
130
130
|
|
exonware/xwsystem/ipc/defs.py
CHANGED
exonware/xwsystem/ipc/errors.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/ipc/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
|
IPC module errors - exception classes for inter-process communication functionality.
|
exonware/xwsystem/ipc/pipes.py
CHANGED
|
@@ -50,7 +50,7 @@ class Pipe:
|
|
|
50
50
|
if sys.platform == 'win32':
|
|
51
51
|
# Windows named pipes
|
|
52
52
|
import uuid
|
|
53
|
-
self.pipe_name = f"\\\\.\\pipe\\
|
|
53
|
+
self.pipe_name = f"\\\\.\\pipe\\xwsystem_{uuid.uuid4().hex}"
|
|
54
54
|
self._create_windows_pipe()
|
|
55
55
|
else:
|
|
56
56
|
# Unix domain sockets or os.pipe()
|
|
@@ -251,7 +251,7 @@ class AsyncPipe:
|
|
|
251
251
|
|
|
252
252
|
# Create temporary socket path
|
|
253
253
|
temp_dir = tempfile.gettempdir()
|
|
254
|
-
self._pipe_path = os.path.join(temp_dir, f"
|
|
254
|
+
self._pipe_path = os.path.join(temp_dir, f"xwsystem_pipe_{os.getpid()}")
|
|
255
255
|
|
|
256
256
|
# Remove existing socket file
|
|
257
257
|
try:
|
|
@@ -68,7 +68,7 @@ class SharedData[T]:
|
|
|
68
68
|
# Unix: Use /dev/shm or temporary files
|
|
69
69
|
import tempfile
|
|
70
70
|
self._file_handle = tempfile.NamedTemporaryFile(
|
|
71
|
-
prefix=f"
|
|
71
|
+
prefix=f"xwsystem_shared_{self.name}_",
|
|
72
72
|
delete=False
|
|
73
73
|
)
|
|
74
74
|
self._file_handle.write(b'\x00' * self.size)
|
|
@@ -364,7 +364,7 @@ class SharedMemory:
|
|
|
364
364
|
name: Name for the shared memory segment
|
|
365
365
|
size: Size of the memory segment
|
|
366
366
|
"""
|
|
367
|
-
self.name = name or f"
|
|
367
|
+
self.name = name or f"xwsystem_shared_{os.getpid()}"
|
|
368
368
|
self.size = size
|
|
369
369
|
self._manager = SharedMemoryManager()
|
|
370
370
|
self._segment = None
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/monitoring/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
|
Monitoring module base classes - abstract classes for monitoring functionality.
|
|
@@ -10,7 +10,7 @@ import functools
|
|
|
10
10
|
import threading
|
|
11
11
|
import time
|
|
12
12
|
from dataclasses import dataclass, field
|
|
13
|
-
from typing import Any, Callable, Optional,
|
|
13
|
+
from typing import Any, Callable, Optional, Union
|
|
14
14
|
|
|
15
15
|
from .defs import CircuitState
|
|
16
16
|
|
|
@@ -25,7 +25,7 @@ class CircuitBreakerConfig:
|
|
|
25
25
|
|
|
26
26
|
failure_threshold: int = 5
|
|
27
27
|
recovery_timeout: float = 60.0 # seconds
|
|
28
|
-
expected_exception:
|
|
28
|
+
expected_exception: type[Exception] = Exception
|
|
29
29
|
monitor_interval: float = 10.0 # seconds
|
|
30
30
|
|
|
31
31
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/monitoring/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
|
Monitoring module errors - exception classes for monitoring functionality.
|
|
@@ -10,7 +10,7 @@ health monitoring, and recommendations without being tied to specific implementa
|
|
|
10
10
|
Company: eXonware.com
|
|
11
11
|
Author: Eng. Muhammad AlShehri
|
|
12
12
|
Email: connect@exonware.com
|
|
13
|
-
Version: 0.0.1
|
|
13
|
+
Version: 0.1.0.1
|
|
14
14
|
Generation Date: November 04, 2025
|
|
15
15
|
"""
|
|
16
16
|
|
|
@@ -23,7 +23,7 @@ from typing import Any, Optional, Union
|
|
|
23
23
|
from ..config.performance_modes import PerformanceMode
|
|
24
24
|
from ..config.logging_setup import get_logger
|
|
25
25
|
|
|
26
|
-
logger = get_logger("
|
|
26
|
+
logger = get_logger("xwsystem.monitoring.performance_manager_generic")
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
@dataclass
|
|
@@ -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
|
System-wide monitoring and hardware introspection utilities.
|
|
@@ -20,7 +20,7 @@ import psutil
|
|
|
20
20
|
|
|
21
21
|
from ..config.logging_setup import get_logger
|
|
22
22
|
|
|
23
|
-
logger = get_logger("
|
|
23
|
+
logger = get_logger("xwsystem.monitoring.system_monitor")
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
@dataclass
|
|
@@ -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 05, 2025
|
|
7
7
|
|
|
8
8
|
Distributed Tracing Integration for Enterprise Observability
|
|
@@ -172,7 +172,7 @@ class OpenTelemetryTracer(ATracingProvider):
|
|
|
172
172
|
class JaegerTracer(ATracingProvider):
|
|
173
173
|
"""Jaeger-specific tracing provider (simplified implementation)."""
|
|
174
174
|
|
|
175
|
-
def __init__(self, service_name: str = "
|
|
175
|
+
def __init__(self, service_name: str = "xwsystem", agent_host: str = "localhost", agent_port: int = 6831):
|
|
176
176
|
"""Initialize Jaeger tracer."""
|
|
177
177
|
self.service_name = service_name
|
|
178
178
|
self.agent_host = agent_host
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/patterns/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
|
Abstract base classes for XSystem patterns.
|
|
@@ -9,7 +9,7 @@ import contextlib
|
|
|
9
9
|
import logging
|
|
10
10
|
import threading
|
|
11
11
|
from contextlib import ExitStack, contextmanager
|
|
12
|
-
from typing import Any, ContextManager, Generator, Optional,
|
|
12
|
+
from typing import Any, ContextManager, Generator, Optional, Union
|
|
13
13
|
|
|
14
14
|
logger = logging.getLogger(__name__)
|
|
15
15
|
|
|
@@ -297,7 +297,7 @@ class MultiContextManager:
|
|
|
297
297
|
self.stack.__exit__(None, None, None)
|
|
298
298
|
raise
|
|
299
299
|
|
|
300
|
-
def __exit__(self, exc_type: Optional[
|
|
300
|
+
def __exit__(self, exc_type: Optional[type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[Any]) -> None:
|
|
301
301
|
"""Exit all managed contexts."""
|
|
302
302
|
if self.stack is not None:
|
|
303
303
|
return self.stack.__exit__(exc_type, exc_val, exc_tb)
|
|
@@ -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
|
Pattern contracts and interfaces for XWSystem design patterns.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
from abc import ABC, abstractmethod
|
|
13
|
-
from typing import Any, Optional,
|
|
13
|
+
from typing import Any, Optional, Callable, Union
|
|
14
14
|
# Root cause: Migrating to Python 3.12 built-in generic syntax for consistency
|
|
15
15
|
# Priority #3: Maintainability - Modern type annotations improve code clarity
|
|
16
16
|
|
|
@@ -77,7 +77,7 @@ class IHandlerFactory[T](ABC):
|
|
|
77
77
|
pass
|
|
78
78
|
|
|
79
79
|
@abstractmethod
|
|
80
|
-
def register_handler(self, handler_type: str, handler_class:
|
|
80
|
+
def register_handler(self, handler_type: str, handler_class: type[T]) -> None:
|
|
81
81
|
"""Register a handler class."""
|
|
82
82
|
pass
|
|
83
83
|
|
|
@@ -106,7 +106,7 @@ class IContextManager(ABC):
|
|
|
106
106
|
pass
|
|
107
107
|
|
|
108
108
|
@abstractmethod
|
|
109
|
-
def __exit__(self, exc_type: Optional[
|
|
109
|
+
def __exit__(self, exc_type: Optional[type[BaseException]],
|
|
110
110
|
exc_val: Optional[BaseException],
|
|
111
111
|
exc_tb: Optional[Any]) -> bool:
|
|
112
112
|
"""Exit the context."""
|
|
@@ -127,7 +127,7 @@ class IObjectPool[T](ABC):
|
|
|
127
127
|
"""Interface for object pools."""
|
|
128
128
|
|
|
129
129
|
@abstractmethod
|
|
130
|
-
def get(self, obj_type:
|
|
130
|
+
def get(self, obj_type: type[T], *args, **kwargs) -> T:
|
|
131
131
|
"""Get an object from the pool."""
|
|
132
132
|
pass
|
|
133
133
|
|
|
@@ -137,7 +137,7 @@ class IObjectPool[T](ABC):
|
|
|
137
137
|
pass
|
|
138
138
|
|
|
139
139
|
@abstractmethod
|
|
140
|
-
def clear(self, obj_type: Optional[
|
|
140
|
+
def clear(self, obj_type: Optional[type[T]] = None) -> None:
|
|
141
141
|
"""Clear objects from the pool."""
|
|
142
142
|
pass
|
|
143
143
|
|
|
@@ -147,7 +147,7 @@ class IObjectPool[T](ABC):
|
|
|
147
147
|
pass
|
|
148
148
|
|
|
149
149
|
@abstractmethod
|
|
150
|
-
def is_empty(self, obj_type:
|
|
150
|
+
def is_empty(self, obj_type: type[T]) -> bool:
|
|
151
151
|
"""Check if pool is empty for a type."""
|
|
152
152
|
pass
|
|
153
153
|
|
|
@@ -343,12 +343,12 @@ class IAdapter(ABC):
|
|
|
343
343
|
pass
|
|
344
344
|
|
|
345
345
|
@abstractmethod
|
|
346
|
-
def get_source_type(self) ->
|
|
346
|
+
def get_source_type(self) -> type:
|
|
347
347
|
"""Get source type."""
|
|
348
348
|
pass
|
|
349
349
|
|
|
350
350
|
@abstractmethod
|
|
351
|
-
def get_target_type(self) ->
|
|
351
|
+
def get_target_type(self) -> type:
|
|
352
352
|
"""Get target type."""
|
|
353
353
|
pass
|
|
354
354
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
|
-
from typing import Any, Callable
|
|
2
|
+
from typing import Any, Callable
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class _FormatProxy:
|
|
@@ -10,7 +10,7 @@ class _FormatProxy:
|
|
|
10
10
|
the creation of a fluent API like `xData.json.load(...)`.
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
def __init__(self, handler_class:
|
|
13
|
+
def __init__(self, handler_class: type, parent_facade_instance: "DynamicFacade"):
|
|
14
14
|
self._handler_class = handler_class
|
|
15
15
|
self._parent = parent_facade_instance
|
|
16
16
|
|
|
@@ -64,7 +64,7 @@ class DynamicFacade:
|
|
|
64
64
|
"""
|
|
65
65
|
|
|
66
66
|
def __init__(
|
|
67
|
-
self, handler_base_class:
|
|
67
|
+
self, handler_base_class: type, handler_discovery_func: Callable[[], list[type]]
|
|
68
68
|
):
|
|
69
69
|
"""
|
|
70
70
|
Initializes the DynamicFacade.
|
|
@@ -78,8 +78,8 @@ class DynamicFacade:
|
|
|
78
78
|
self._attach_proxies()
|
|
79
79
|
|
|
80
80
|
def _discover_handlers(
|
|
81
|
-
self, discovery_func: Callable[[], list[
|
|
82
|
-
) -> dict[str,
|
|
81
|
+
self, discovery_func: Callable[[], list[type]]
|
|
82
|
+
) -> dict[str, type]:
|
|
83
83
|
"""
|
|
84
84
|
Discovers handler classes and maps them to format names.
|
|
85
85
|
"""
|
|
@@ -92,7 +92,7 @@ class DynamicFacade:
|
|
|
92
92
|
handler_map[format_name] = handler
|
|
93
93
|
return handler_map
|
|
94
94
|
|
|
95
|
-
def _get_format_name(self, handler_class:
|
|
95
|
+
def _get_format_name(self, handler_class: type) -> str:
|
|
96
96
|
"""
|
|
97
97
|
Derives a format name (e.g., 'json') from a handler class name
|
|
98
98
|
(e.g., 'JSONDataHandler').
|
|
@@ -113,7 +113,7 @@ class DynamicFacade:
|
|
|
113
113
|
setattr(self, format_name, proxy_instance)
|
|
114
114
|
|
|
115
115
|
def _load_with_handler(
|
|
116
|
-
self, source: Any, handler_class:
|
|
116
|
+
self, source: Any, handler_class: type, **kwargs: Any
|
|
117
117
|
) -> Any:
|
|
118
118
|
"""
|
|
119
119
|
Placeholder for the actual data loading logic.
|
|
@@ -129,7 +129,7 @@ class DynamicFacade:
|
|
|
129
129
|
)
|
|
130
130
|
|
|
131
131
|
def _save_with_handler(
|
|
132
|
-
self, data_container: Any, file_path: str, handler_class:
|
|
132
|
+
self, data_container: Any, file_path: str, handler_class: type, **kwargs: Any
|
|
133
133
|
) -> None:
|
|
134
134
|
"""
|
|
135
135
|
Placeholder for the actual data saving logic.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/patterns/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
|
Pattern-specific error classes for XSystem design patterns.
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
from typing import Any, Optional
|
|
12
|
+
from typing import Any, Optional
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class PatternError(Exception):
|
|
@@ -56,7 +56,7 @@ class HandlerNotFoundError(HandlerError):
|
|
|
56
56
|
class HandlerRegistrationError(HandlerError):
|
|
57
57
|
"""Error when handler registration fails."""
|
|
58
58
|
|
|
59
|
-
def __init__(self, message: str, handler_type: str, handler_class: Optional[
|
|
59
|
+
def __init__(self, message: str, handler_type: str, handler_class: Optional[type] = None, **kwargs):
|
|
60
60
|
super().__init__(message, handler_type=handler_type, **kwargs)
|
|
61
61
|
self.handler_class = handler_class
|
|
62
62
|
|
|
@@ -89,7 +89,7 @@ class FactoryCreationError(FactoryError):
|
|
|
89
89
|
class FactoryRegistrationError(FactoryError):
|
|
90
90
|
"""Error when factory registration fails."""
|
|
91
91
|
|
|
92
|
-
def __init__(self, message: str, factory_type: str, product_class: Optional[
|
|
92
|
+
def __init__(self, message: str, factory_type: str, product_class: Optional[type] = None, **kwargs):
|
|
93
93
|
super().__init__(message, factory_type=factory_type, **kwargs)
|
|
94
94
|
self.product_class = product_class
|
|
95
95
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#exonware/xwsystem/patterns/handler_factory.py
|
|
2
2
|
"""
|
|
3
|
-
Generic handler factory pattern combining all
|
|
3
|
+
Generic handler factory pattern combining all xwsystem utilities.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import logging
|
|
7
|
-
from typing import Any, Callable, Optional
|
|
7
|
+
from typing import Any, Callable, Optional
|
|
8
8
|
# Root cause: Migrating to Python 3.12 built-in generic syntax for consistency
|
|
9
9
|
# Priority #3: Maintainability - Modern type annotations improve code clarity
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
|
|
|
23
23
|
|
|
24
24
|
class GenericHandlerFactory[T](ThreadSafeFactory[T]):
|
|
25
25
|
"""
|
|
26
|
-
Enhanced handler factory that combines all
|
|
26
|
+
Enhanced handler factory that combines all xwsystem utilities.
|
|
27
27
|
|
|
28
28
|
This factory provides thread-safe handler registration with additional
|
|
29
29
|
features like path validation, atomic operations, and circular reference
|
|
@@ -73,7 +73,7 @@ class GenericHandlerFactory[T](ThreadSafeFactory[T]):
|
|
|
73
73
|
def register_safe(
|
|
74
74
|
self,
|
|
75
75
|
name: str,
|
|
76
|
-
handler_class:
|
|
76
|
+
handler_class: type[T],
|
|
77
77
|
extensions: Optional[list[str]] = None,
|
|
78
78
|
validate_class: bool = True,
|
|
79
79
|
) -> None:
|
|
@@ -240,7 +240,7 @@ class GenericHandlerFactory[T](ThreadSafeFactory[T]):
|
|
|
240
240
|
|
|
241
241
|
def generate_enhanced_methods(
|
|
242
242
|
self,
|
|
243
|
-
target_class:
|
|
243
|
+
target_class: type,
|
|
244
244
|
method_template: Callable,
|
|
245
245
|
method_name_pattern: str = "{action}_{format}",
|
|
246
246
|
method_doc_pattern: str = "{action} data to {format} format.",
|
|
@@ -328,7 +328,7 @@ class HandlerFactory[T](GenericHandlerFactory[T]):
|
|
|
328
328
|
|
|
329
329
|
return handler_class(*args, **kwargs)
|
|
330
330
|
|
|
331
|
-
def register_handler(self, name: str, handler_class:
|
|
331
|
+
def register_handler(self, name: str, handler_class: type[T], extensions: Optional[list[str]] = None):
|
|
332
332
|
"""Register a handler class."""
|
|
333
333
|
self.register_safe(name, handler_class, extensions)
|
|
334
334
|
|