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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#exonware/
|
|
1
|
+
#exonware/xwsystem/http/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
|
HTTP module errors - exception classes for HTTP client functionality.
|
exonware/xwsystem/io/__init__.py
CHANGED
|
@@ -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: 30-Oct-2025
|
|
9
9
|
|
|
10
10
|
Archive codecs - In-memory archive processors.
|
|
@@ -117,7 +117,7 @@ class ZipArchiver(AArchiver):
|
|
|
117
117
|
|
|
118
118
|
with zipfile.ZipFile(zip_buffer, 'w', compression=compression) as zf:
|
|
119
119
|
if isinstance(value, dict):
|
|
120
|
-
#
|
|
120
|
+
# dict: keys are filenames, values are contents
|
|
121
121
|
for filename, content in value.items():
|
|
122
122
|
if isinstance(content, str):
|
|
123
123
|
zf.writestr(filename, content)
|
|
@@ -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: 30-Oct-2025
|
|
9
9
|
|
|
10
10
|
Base classes and registries for archive system.
|
|
@@ -19,7 +19,7 @@ Priority 5 (Extensibility): Easy to add 7z, RAR, etc.
|
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
from abc import ABC, abstractmethod
|
|
22
|
-
from typing import Optional,
|
|
22
|
+
from typing import Optional, Union, Any
|
|
23
23
|
from pathlib import Path
|
|
24
24
|
|
|
25
25
|
from ..contracts import IArchiveFormat, ICompressor, IArchiveMetadata, IArchiver, IArchiveFile, EncodeOptions, DecodeOptions
|
|
@@ -252,11 +252,11 @@ class ArchiveFormatRegistry:
|
|
|
252
252
|
|
|
253
253
|
def __init__(self):
|
|
254
254
|
"""Initialize registry."""
|
|
255
|
-
self._formats: dict[str,
|
|
255
|
+
self._formats: dict[str, type[IArchiveFormat]] = {}
|
|
256
256
|
self._instances: dict[str, IArchiveFormat] = {}
|
|
257
257
|
self._extension_map: dict[str, str] = {} # .zip → "zip"
|
|
258
258
|
|
|
259
|
-
def register(self, format_class:
|
|
259
|
+
def register(self, format_class: type[IArchiveFormat]) -> None:
|
|
260
260
|
"""
|
|
261
261
|
Register an archive format.
|
|
262
262
|
|
|
@@ -326,10 +326,10 @@ class CompressionRegistry:
|
|
|
326
326
|
|
|
327
327
|
def __init__(self):
|
|
328
328
|
"""Initialize registry."""
|
|
329
|
-
self._algorithms: dict[str,
|
|
329
|
+
self._algorithms: dict[str, type[ICompressor]] = {}
|
|
330
330
|
self._instances: dict[str, ICompressor] = {}
|
|
331
331
|
|
|
332
|
-
def register(self, compressor_class:
|
|
332
|
+
def register(self, compressor_class: type[ICompressor]) -> None:
|
|
333
333
|
"""Register a compression algorithm."""
|
|
334
334
|
instance = compressor_class()
|
|
335
335
|
algo_id = instance.algorithm_id
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
Brotli (.br) compression format - RANK #6 WEB COMPRESSION.
|
|
@@ -25,8 +25,11 @@ from typing import Optional
|
|
|
25
25
|
from ...contracts import IArchiveFormat
|
|
26
26
|
from ...errors import ArchiveError
|
|
27
27
|
|
|
28
|
-
# Lazy import for brotli -
|
|
29
|
-
|
|
28
|
+
# Lazy import for brotli - optional dependency
|
|
29
|
+
try:
|
|
30
|
+
import brotli
|
|
31
|
+
except ImportError:
|
|
32
|
+
brotli = None # type: ignore
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
class BrotliArchiver(IArchiveFormat):
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
LZ4 compression format - RANK #7 FASTEST COMPRESSION.
|
|
@@ -25,8 +25,11 @@ from typing import Optional
|
|
|
25
25
|
from ...contracts import IArchiveFormat
|
|
26
26
|
from ...errors import ArchiveError
|
|
27
27
|
|
|
28
|
-
# Lazy import for lz4 -
|
|
29
|
-
|
|
28
|
+
# Lazy import for lz4 - optional dependency
|
|
29
|
+
try:
|
|
30
|
+
import lz4.frame as lz4
|
|
31
|
+
except ImportError:
|
|
32
|
+
lz4 = None # type: ignore
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
class Lz4Archiver(IArchiveFormat):
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
RAR5 archive format implementation - RANK #3 PROPRIETARY COMPRESSION.
|
|
@@ -24,8 +24,11 @@ from typing import Optional
|
|
|
24
24
|
from ...contracts import IArchiveFormat
|
|
25
25
|
from ...errors import ArchiveError
|
|
26
26
|
|
|
27
|
-
# Lazy import for rarfile -
|
|
28
|
-
|
|
27
|
+
# Lazy import for rarfile - optional dependency
|
|
28
|
+
try:
|
|
29
|
+
import rarfile
|
|
30
|
+
except ImportError:
|
|
31
|
+
rarfile = None # type: ignore
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
class RarArchiver(IArchiveFormat):
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
7z archive format implementation - RANK #1 BEST COMPRESSION.
|
|
@@ -24,8 +24,11 @@ from typing import Optional
|
|
|
24
24
|
from ...contracts import IArchiveFormat
|
|
25
25
|
from ...errors import ArchiveError
|
|
26
26
|
|
|
27
|
-
# Lazy import for py7zr -
|
|
28
|
-
|
|
27
|
+
# Lazy import for py7zr - optional dependency
|
|
28
|
+
try:
|
|
29
|
+
import py7zr
|
|
30
|
+
except ImportError:
|
|
31
|
+
py7zr = None # type: ignore
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
class SevenZipArchiver(IArchiveFormat):
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
WIM (Windows Imaging) format - RANK #9 SYSTEM IMAGES.
|
|
@@ -24,8 +24,11 @@ from typing import Optional
|
|
|
24
24
|
from ...contracts import IArchiveFormat
|
|
25
25
|
from ...errors import ArchiveError
|
|
26
26
|
|
|
27
|
-
# Lazy import for wimlib -
|
|
28
|
-
|
|
27
|
+
# Lazy import for wimlib - optional dependency
|
|
28
|
+
try:
|
|
29
|
+
import wimlib
|
|
30
|
+
except ImportError:
|
|
31
|
+
wimlib = None # type: ignore
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
class WimArchiver(IArchiveFormat):
|
|
@@ -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: November 1, 2025
|
|
9
9
|
|
|
10
10
|
Zstandard (.zst) compression format - RANK #2 MODERN STANDARD.
|
|
@@ -25,8 +25,11 @@ from typing import Optional
|
|
|
25
25
|
from ...contracts import IArchiveFormat
|
|
26
26
|
from ...errors import ArchiveError
|
|
27
27
|
|
|
28
|
-
# Lazy import for zstandard -
|
|
29
|
-
|
|
28
|
+
# Lazy import for zstandard - optional dependency
|
|
29
|
+
try:
|
|
30
|
+
import zstandard
|
|
31
|
+
except ImportError:
|
|
32
|
+
zstandard = None # type: ignore
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
class ZstandardArchiver(IArchiveFormat):
|
exonware/xwsystem/io/base.py
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
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 30, 2025
|
|
9
9
|
|
|
10
10
|
Base classes, registry, adapters, and helper functions for codec system.
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
from __future__ import annotations
|
|
14
|
-
from typing import Optional, Any,
|
|
14
|
+
from typing import Optional, Any, IO, Union
|
|
15
15
|
# Root cause: Migrating to Python 3.12 built-in generic syntax for consistency
|
|
16
16
|
# Priority #3: Maintainability - Modern type annotations improve code clarity
|
|
17
17
|
from pathlib import Path
|
|
@@ -120,12 +120,12 @@ class CodecRegistry:
|
|
|
120
120
|
"""
|
|
121
121
|
|
|
122
122
|
def __init__(self) -> None:
|
|
123
|
-
self._by_media_type: dict[MediaKey,
|
|
124
|
-
self._by_extension: dict[str,
|
|
125
|
-
self._by_id: dict[str,
|
|
123
|
+
self._by_media_type: dict[MediaKey, type[ICodec]] = {}
|
|
124
|
+
self._by_extension: dict[str, type[ICodec]] = {}
|
|
125
|
+
self._by_id: dict[str, type[ICodec]] = {}
|
|
126
126
|
self._instances: dict[str, ICodec] = {} # Cached instances
|
|
127
127
|
|
|
128
|
-
def register(self, codec_class:
|
|
128
|
+
def register(self, codec_class: type[ICodec]) -> None:
|
|
129
129
|
"""
|
|
130
130
|
Register a codec class.
|
|
131
131
|
|
|
@@ -2,13 +2,13 @@
|
|
|
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: November 04, 2025
|
|
7
7
|
|
|
8
8
|
Universal Codec Registry - High-performance registry for all codec types.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
from typing import Optional,
|
|
11
|
+
from typing import Optional, Union, Any, Callable
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
from threading import RLock
|
|
14
14
|
from functools import lru_cache
|
|
@@ -104,7 +104,7 @@ class UniversalCodecRegistry:
|
|
|
104
104
|
def __init__(self):
|
|
105
105
|
"""Initialize the universal codec registry."""
|
|
106
106
|
# Core mappings (codec_id is always lowercase)
|
|
107
|
-
self._by_id: dict[str,
|
|
107
|
+
self._by_id: dict[str, type[ICodec]] = {}
|
|
108
108
|
self._by_extension: dict[str, list[tuple[str, int]]] = {} # ext -> [(codec_id, priority)]
|
|
109
109
|
self._by_mime_type: dict[str, list[tuple[str, int]]] = {} # mime -> [(codec_id, priority)]
|
|
110
110
|
self._by_alias: dict[str, str] = {} # alias -> codec_id (1:1 mapping)
|
|
@@ -130,7 +130,7 @@ class UniversalCodecRegistry:
|
|
|
130
130
|
|
|
131
131
|
def register(
|
|
132
132
|
self,
|
|
133
|
-
codec_class:
|
|
133
|
+
codec_class: type[ICodec],
|
|
134
134
|
codec_instance: Optional[ICodec] = None,
|
|
135
135
|
priority: int = 0,
|
|
136
136
|
magic_bytes: Optional[list[bytes]] = None
|
|
@@ -702,7 +702,7 @@ class UniversalCodecRegistry:
|
|
|
702
702
|
# BULK OPERATIONS
|
|
703
703
|
# ========================================================================
|
|
704
704
|
|
|
705
|
-
def register_bulk(self, codec_classes: list[
|
|
705
|
+
def register_bulk(self, codec_classes: list[type[ICodec]], priorities: Optional[list[int]] = None) -> int:
|
|
706
706
|
"""
|
|
707
707
|
Register multiple codecs efficiently.
|
|
708
708
|
|