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.
Files changed (260) hide show
  1. exonware/__init__.py +2 -2
  2. exonware/conf.py +10 -20
  3. exonware/xwsystem/__init__.py +6 -16
  4. exonware/xwsystem/caching/__init__.py +1 -1
  5. exonware/xwsystem/caching/base.py +16 -16
  6. exonware/xwsystem/caching/bloom_cache.py +5 -5
  7. exonware/xwsystem/caching/cache_manager.py +2 -2
  8. exonware/xwsystem/caching/conditional.py +4 -4
  9. exonware/xwsystem/caching/contracts.py +12 -12
  10. exonware/xwsystem/caching/decorators.py +2 -2
  11. exonware/xwsystem/caching/defs.py +1 -1
  12. exonware/xwsystem/caching/disk_cache.py +4 -4
  13. exonware/xwsystem/caching/distributed.py +1 -1
  14. exonware/xwsystem/caching/errors.py +1 -1
  15. exonware/xwsystem/caching/events.py +8 -8
  16. exonware/xwsystem/caching/eviction_strategies.py +9 -9
  17. exonware/xwsystem/caching/fluent.py +1 -1
  18. exonware/xwsystem/caching/integrity.py +1 -1
  19. exonware/xwsystem/caching/lfu_cache.py +24 -9
  20. exonware/xwsystem/caching/lfu_optimized.py +21 -21
  21. exonware/xwsystem/caching/lru_cache.py +14 -7
  22. exonware/xwsystem/caching/memory_bounded.py +8 -8
  23. exonware/xwsystem/caching/metrics_exporter.py +6 -6
  24. exonware/xwsystem/caching/observable_cache.py +1 -1
  25. exonware/xwsystem/caching/pluggable_cache.py +9 -9
  26. exonware/xwsystem/caching/rate_limiter.py +1 -1
  27. exonware/xwsystem/caching/read_through.py +6 -6
  28. exonware/xwsystem/caching/secure_cache.py +1 -1
  29. exonware/xwsystem/caching/serializable.py +3 -3
  30. exonware/xwsystem/caching/stats.py +7 -7
  31. exonware/xwsystem/caching/tagging.py +11 -11
  32. exonware/xwsystem/caching/ttl_cache.py +21 -6
  33. exonware/xwsystem/caching/two_tier_cache.py +5 -5
  34. exonware/xwsystem/caching/utils.py +3 -3
  35. exonware/xwsystem/caching/validation.py +1 -1
  36. exonware/xwsystem/caching/warming.py +9 -9
  37. exonware/xwsystem/caching/write_behind.py +5 -5
  38. exonware/xwsystem/cli/__init__.py +1 -1
  39. exonware/xwsystem/cli/args.py +10 -10
  40. exonware/xwsystem/cli/base.py +15 -15
  41. exonware/xwsystem/cli/colors.py +1 -1
  42. exonware/xwsystem/cli/console.py +1 -1
  43. exonware/xwsystem/cli/contracts.py +5 -5
  44. exonware/xwsystem/cli/defs.py +1 -1
  45. exonware/xwsystem/cli/errors.py +1 -1
  46. exonware/xwsystem/cli/progress.py +1 -1
  47. exonware/xwsystem/cli/prompts.py +1 -1
  48. exonware/xwsystem/cli/tables.py +7 -7
  49. exonware/xwsystem/config/__init__.py +1 -1
  50. exonware/xwsystem/config/base.py +14 -14
  51. exonware/xwsystem/config/contracts.py +22 -22
  52. exonware/xwsystem/config/defaults.py +2 -2
  53. exonware/xwsystem/config/defs.py +1 -1
  54. exonware/xwsystem/config/errors.py +2 -2
  55. exonware/xwsystem/config/logging.py +1 -1
  56. exonware/xwsystem/config/logging_setup.py +2 -2
  57. exonware/xwsystem/config/performance.py +7 -7
  58. exonware/xwsystem/config/performance_modes.py +20 -20
  59. exonware/xwsystem/config/version_manager.py +4 -4
  60. exonware/xwsystem/{http → http_client}/__init__.py +1 -1
  61. exonware/xwsystem/{http → http_client}/advanced_client.py +20 -20
  62. exonware/xwsystem/{http → http_client}/base.py +13 -13
  63. exonware/xwsystem/{http → http_client}/client.py +43 -43
  64. exonware/xwsystem/{http → http_client}/contracts.py +5 -5
  65. exonware/xwsystem/{http → http_client}/defs.py +2 -2
  66. exonware/xwsystem/{http → http_client}/errors.py +2 -2
  67. exonware/xwsystem/io/__init__.py +1 -1
  68. exonware/xwsystem/io/archive/__init__.py +1 -1
  69. exonware/xwsystem/io/archive/archive.py +5 -5
  70. exonware/xwsystem/io/archive/archive_files.py +8 -8
  71. exonware/xwsystem/io/archive/archivers.py +3 -3
  72. exonware/xwsystem/io/archive/base.py +17 -17
  73. exonware/xwsystem/io/archive/codec_integration.py +1 -1
  74. exonware/xwsystem/io/archive/compression.py +1 -1
  75. exonware/xwsystem/io/archive/formats/__init__.py +1 -1
  76. exonware/xwsystem/io/archive/formats/brotli_format.py +12 -9
  77. exonware/xwsystem/io/archive/formats/lz4_format.py +12 -9
  78. exonware/xwsystem/io/archive/formats/rar.py +12 -9
  79. exonware/xwsystem/io/archive/formats/sevenzip.py +12 -9
  80. exonware/xwsystem/io/archive/formats/squashfs_format.py +7 -7
  81. exonware/xwsystem/io/archive/formats/tar.py +8 -8
  82. exonware/xwsystem/io/archive/formats/wim_format.py +12 -9
  83. exonware/xwsystem/io/archive/formats/zip.py +8 -8
  84. exonware/xwsystem/io/archive/formats/zpaq_format.py +7 -7
  85. exonware/xwsystem/io/archive/formats/zstandard.py +12 -9
  86. exonware/xwsystem/io/base.py +17 -17
  87. exonware/xwsystem/io/codec/__init__.py +1 -1
  88. exonware/xwsystem/io/codec/base.py +261 -14
  89. exonware/xwsystem/io/codec/contracts.py +3 -6
  90. exonware/xwsystem/io/codec/registry.py +29 -29
  91. exonware/xwsystem/io/common/__init__.py +1 -1
  92. exonware/xwsystem/io/common/atomic.py +2 -2
  93. exonware/xwsystem/io/common/base.py +1 -1
  94. exonware/xwsystem/io/common/lock.py +1 -1
  95. exonware/xwsystem/io/common/watcher.py +4 -4
  96. exonware/xwsystem/io/contracts.py +34 -39
  97. exonware/xwsystem/io/data_operations.py +480 -0
  98. exonware/xwsystem/io/defs.py +2 -2
  99. exonware/xwsystem/io/errors.py +32 -3
  100. exonware/xwsystem/io/facade.py +4 -4
  101. exonware/xwsystem/io/file/__init__.py +1 -1
  102. exonware/xwsystem/io/file/base.py +2 -2
  103. exonware/xwsystem/io/file/conversion.py +1 -1
  104. exonware/xwsystem/io/file/file.py +10 -8
  105. exonware/xwsystem/io/file/paged_source.py +8 -1
  106. exonware/xwsystem/io/file/paging/__init__.py +1 -1
  107. exonware/xwsystem/io/file/paging/byte_paging.py +1 -1
  108. exonware/xwsystem/io/file/paging/line_paging.py +1 -1
  109. exonware/xwsystem/io/file/paging/record_paging.py +1 -1
  110. exonware/xwsystem/io/file/paging/registry.py +5 -5
  111. exonware/xwsystem/io/file/source.py +22 -11
  112. exonware/xwsystem/io/filesystem/__init__.py +1 -1
  113. exonware/xwsystem/io/filesystem/base.py +1 -1
  114. exonware/xwsystem/io/filesystem/local.py +9 -1
  115. exonware/xwsystem/io/folder/__init__.py +1 -1
  116. exonware/xwsystem/io/folder/base.py +2 -2
  117. exonware/xwsystem/io/folder/folder.py +6 -6
  118. exonware/xwsystem/io/serialization/__init__.py +1 -1
  119. exonware/xwsystem/io/serialization/auto_serializer.py +53 -40
  120. exonware/xwsystem/io/serialization/base.py +248 -35
  121. exonware/xwsystem/io/serialization/contracts.py +93 -4
  122. exonware/xwsystem/io/serialization/defs.py +1 -1
  123. exonware/xwsystem/io/serialization/errors.py +1 -1
  124. exonware/xwsystem/io/serialization/flyweight.py +22 -22
  125. exonware/xwsystem/io/serialization/format_detector.py +18 -15
  126. exonware/xwsystem/io/serialization/formats/__init__.py +1 -1
  127. exonware/xwsystem/io/serialization/formats/binary/bson.py +1 -1
  128. exonware/xwsystem/io/serialization/formats/binary/cbor.py +1 -1
  129. exonware/xwsystem/io/serialization/formats/binary/marshal.py +1 -1
  130. exonware/xwsystem/io/serialization/formats/binary/msgpack.py +1 -1
  131. exonware/xwsystem/io/serialization/formats/binary/pickle.py +1 -1
  132. exonware/xwsystem/io/serialization/formats/binary/plistlib.py +1 -1
  133. exonware/xwsystem/io/serialization/formats/database/dbm.py +53 -1
  134. exonware/xwsystem/io/serialization/formats/database/shelve.py +48 -1
  135. exonware/xwsystem/io/serialization/formats/database/sqlite3.py +85 -1
  136. exonware/xwsystem/io/serialization/formats/text/configparser.py +2 -2
  137. exonware/xwsystem/io/serialization/formats/text/csv.py +2 -2
  138. exonware/xwsystem/io/serialization/formats/text/formdata.py +2 -2
  139. exonware/xwsystem/io/serialization/formats/text/json.py +23 -5
  140. exonware/xwsystem/io/serialization/formats/text/json5.py +98 -13
  141. exonware/xwsystem/io/serialization/formats/text/jsonlines.py +230 -20
  142. exonware/xwsystem/io/serialization/formats/text/multipart.py +2 -2
  143. exonware/xwsystem/io/serialization/formats/text/toml.py +65 -4
  144. exonware/xwsystem/io/serialization/formats/text/xml.py +451 -69
  145. exonware/xwsystem/io/serialization/formats/text/yaml.py +52 -2
  146. exonware/xwsystem/io/serialization/registry.py +5 -5
  147. exonware/xwsystem/io/serialization/serializer.py +184 -12
  148. exonware/xwsystem/io/serialization/utils/__init__.py +1 -1
  149. exonware/xwsystem/io/serialization/utils/path_ops.py +3 -3
  150. exonware/xwsystem/io/stream/__init__.py +1 -1
  151. exonware/xwsystem/io/stream/async_operations.py +3 -3
  152. exonware/xwsystem/io/stream/base.py +3 -7
  153. exonware/xwsystem/io/stream/codec_io.py +4 -7
  154. exonware/xwsystem/ipc/async_fabric.py +7 -8
  155. exonware/xwsystem/ipc/base.py +9 -9
  156. exonware/xwsystem/ipc/contracts.py +5 -5
  157. exonware/xwsystem/ipc/defs.py +1 -1
  158. exonware/xwsystem/ipc/errors.py +2 -2
  159. exonware/xwsystem/ipc/message_queue.py +4 -6
  160. exonware/xwsystem/ipc/pipes.py +2 -2
  161. exonware/xwsystem/ipc/process_manager.py +7 -7
  162. exonware/xwsystem/ipc/process_pool.py +8 -8
  163. exonware/xwsystem/ipc/shared_memory.py +7 -7
  164. exonware/xwsystem/monitoring/base.py +33 -33
  165. exonware/xwsystem/monitoring/contracts.py +27 -27
  166. exonware/xwsystem/monitoring/defs.py +1 -1
  167. exonware/xwsystem/monitoring/error_recovery.py +16 -16
  168. exonware/xwsystem/monitoring/errors.py +2 -2
  169. exonware/xwsystem/monitoring/memory_monitor.py +12 -12
  170. exonware/xwsystem/monitoring/metrics.py +8 -8
  171. exonware/xwsystem/monitoring/performance_manager_generic.py +20 -20
  172. exonware/xwsystem/monitoring/performance_monitor.py +11 -11
  173. exonware/xwsystem/monitoring/performance_validator.py +21 -21
  174. exonware/xwsystem/monitoring/system_monitor.py +17 -17
  175. exonware/xwsystem/monitoring/tracing.py +20 -20
  176. exonware/xwsystem/monitoring/tracker.py +7 -7
  177. exonware/xwsystem/operations/__init__.py +5 -5
  178. exonware/xwsystem/operations/base.py +3 -3
  179. exonware/xwsystem/operations/contracts.py +3 -3
  180. exonware/xwsystem/operations/defs.py +5 -5
  181. exonware/xwsystem/operations/diff.py +5 -5
  182. exonware/xwsystem/operations/merge.py +2 -2
  183. exonware/xwsystem/operations/patch.py +5 -5
  184. exonware/xwsystem/patterns/base.py +4 -4
  185. exonware/xwsystem/patterns/context_manager.py +7 -7
  186. exonware/xwsystem/patterns/contracts.py +29 -31
  187. exonware/xwsystem/patterns/defs.py +1 -1
  188. exonware/xwsystem/patterns/dynamic_facade.py +9 -9
  189. exonware/xwsystem/patterns/errors.py +10 -10
  190. exonware/xwsystem/patterns/handler_factory.py +15 -14
  191. exonware/xwsystem/patterns/import_registry.py +22 -22
  192. exonware/xwsystem/patterns/object_pool.py +14 -13
  193. exonware/xwsystem/patterns/registry.py +45 -32
  194. exonware/xwsystem/plugins/__init__.py +1 -1
  195. exonware/xwsystem/plugins/base.py +25 -25
  196. exonware/xwsystem/plugins/contracts.py +28 -28
  197. exonware/xwsystem/plugins/defs.py +1 -1
  198. exonware/xwsystem/plugins/errors.py +9 -9
  199. exonware/xwsystem/runtime/__init__.py +1 -1
  200. exonware/xwsystem/runtime/base.py +42 -42
  201. exonware/xwsystem/runtime/contracts.py +9 -9
  202. exonware/xwsystem/runtime/defs.py +1 -1
  203. exonware/xwsystem/runtime/env.py +9 -9
  204. exonware/xwsystem/runtime/errors.py +1 -1
  205. exonware/xwsystem/runtime/reflection.py +15 -15
  206. exonware/xwsystem/security/auth.py +47 -15
  207. exonware/xwsystem/security/base.py +17 -17
  208. exonware/xwsystem/security/contracts.py +30 -30
  209. exonware/xwsystem/security/crypto.py +8 -8
  210. exonware/xwsystem/security/defs.py +1 -1
  211. exonware/xwsystem/security/errors.py +2 -2
  212. exonware/xwsystem/security/hazmat.py +7 -7
  213. exonware/xwsystem/security/path_validator.py +1 -1
  214. exonware/xwsystem/shared/__init__.py +1 -1
  215. exonware/xwsystem/shared/base.py +14 -14
  216. exonware/xwsystem/shared/contracts.py +6 -6
  217. exonware/xwsystem/shared/defs.py +1 -1
  218. exonware/xwsystem/shared/errors.py +1 -1
  219. exonware/xwsystem/structures/__init__.py +1 -1
  220. exonware/xwsystem/structures/base.py +29 -29
  221. exonware/xwsystem/structures/circular_detector.py +15 -15
  222. exonware/xwsystem/structures/contracts.py +9 -9
  223. exonware/xwsystem/structures/defs.py +1 -1
  224. exonware/xwsystem/structures/errors.py +2 -2
  225. exonware/xwsystem/structures/tree_walker.py +8 -8
  226. exonware/xwsystem/threading/async_primitives.py +7 -7
  227. exonware/xwsystem/threading/base.py +19 -19
  228. exonware/xwsystem/threading/contracts.py +13 -13
  229. exonware/xwsystem/threading/defs.py +1 -1
  230. exonware/xwsystem/threading/errors.py +2 -2
  231. exonware/xwsystem/threading/safe_factory.py +13 -12
  232. exonware/xwsystem/utils/base.py +34 -34
  233. exonware/xwsystem/utils/contracts.py +9 -9
  234. exonware/xwsystem/utils/dt/__init__.py +1 -1
  235. exonware/xwsystem/utils/dt/base.py +6 -6
  236. exonware/xwsystem/utils/dt/contracts.py +2 -2
  237. exonware/xwsystem/utils/dt/defs.py +1 -1
  238. exonware/xwsystem/utils/dt/errors.py +2 -2
  239. exonware/xwsystem/utils/dt/formatting.py +3 -3
  240. exonware/xwsystem/utils/dt/humanize.py +2 -2
  241. exonware/xwsystem/utils/dt/parsing.py +2 -2
  242. exonware/xwsystem/utils/dt/timezone_utils.py +5 -5
  243. exonware/xwsystem/utils/errors.py +2 -2
  244. exonware/xwsystem/utils/test_runner.py +6 -6
  245. exonware/xwsystem/utils/utils_contracts.py +1 -1
  246. exonware/xwsystem/validation/__init__.py +1 -1
  247. exonware/xwsystem/validation/base.py +48 -48
  248. exonware/xwsystem/validation/contracts.py +8 -8
  249. exonware/xwsystem/validation/data_validator.py +10 -0
  250. exonware/xwsystem/validation/declarative.py +15 -15
  251. exonware/xwsystem/validation/defs.py +1 -1
  252. exonware/xwsystem/validation/errors.py +2 -2
  253. exonware/xwsystem/validation/fluent_validator.py +10 -10
  254. exonware/xwsystem/version.py +2 -2
  255. {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/METADATA +9 -11
  256. exonware_xwsystem-0.0.1.411.dist-info/RECORD +274 -0
  257. {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/WHEEL +1 -1
  258. exonware/xwsystem/lazy_bootstrap.py +0 -79
  259. exonware_xwsystem-0.0.1.409.dist-info/RECORD +0 -274
  260. {exonware_xwsystem-0.0.1.409.dist-info → exonware_xwsystem-0.0.1.411.dist-info}/licenses/LICENSE +0 -0
@@ -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.409
5
+ Version: 0.0.1.411
6
6
  Generation Date: November 2, 2025
7
7
 
8
8
  Serialization Registry - Delegates to UniversalCodecRegistry.
@@ -10,7 +10,7 @@ Serialization Registry - Delegates to UniversalCodecRegistry.
10
10
  Provides serialization-specific convenience methods for format discovery.
11
11
  """
12
12
 
13
- from typing import Optional, List, Union
13
+ from typing import Optional, Union
14
14
  from pathlib import Path
15
15
 
16
16
  from ..codec.registry import UniversalCodecRegistry, get_registry
@@ -117,7 +117,7 @@ class SerializationRegistry:
117
117
  """
118
118
  return self._codec_registry.get_by_mime_type(mime_type)
119
119
 
120
- def list_formats(self) -> List[str]:
120
+ def list_formats(self) -> list[str]:
121
121
  """
122
122
  List all registered format IDs.
123
123
 
@@ -130,7 +130,7 @@ class SerializationRegistry:
130
130
  """
131
131
  return self._codec_registry.list_codecs()
132
132
 
133
- def list_extensions(self) -> List[str]:
133
+ def list_extensions(self) -> list[str]:
134
134
  """
135
135
  List all registered file extensions.
136
136
 
@@ -143,7 +143,7 @@ class SerializationRegistry:
143
143
  """
144
144
  return self._codec_registry.list_extensions()
145
145
 
146
- def list_mime_types(self) -> List[str]:
146
+ def list_mime_types(self) -> list[str]:
147
147
  """
148
148
  List all registered MIME types.
149
149
 
@@ -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.409
5
+ Version: 0.0.1.411
6
6
  Generation Date: September 04, 2025
7
7
 
8
8
  XWSerializer - Unified intelligent serializer with I/O integration and auto-serialization.
@@ -11,7 +11,7 @@ XWSerializer - Unified intelligent serializer with I/O integration and auto-seri
11
11
  import os
12
12
  import time
13
13
  from pathlib import Path
14
- from typing import Any, Dict, Optional, Union, List, Callable, Type
14
+ from typing import Any, Optional, Union, Callable
15
15
 
16
16
  from .base import ASerialization
17
17
  from .contracts import ISerialization
@@ -97,7 +97,7 @@ class XWSerializer(ASerialization):
97
97
  # FORMAT DETECTION AND TRANSFORMATION (from XWSerialization)
98
98
  # ============================================================================
99
99
 
100
- def _get_serializer_class(self, format_name: str) -> Type[ISerialization]:
100
+ def _get_serializer_class(self, format_name: str) -> type[ISerialization]:
101
101
  """Get serializer class for format name."""
102
102
  module_map = {
103
103
  'JSON': ('json', 'JsonSerializer'),
@@ -497,11 +497,11 @@ class XWSerializer(ASerialization):
497
497
  # FILE MANAGER INTEGRATION
498
498
  # ============================================================================
499
499
 
500
- def process_file(self, file_path: Union[str, Path], operation: str = 'info') -> Dict[str, Any]:
500
+ def process_file(self, file_path: Union[str, Path], operation: str = 'info') -> dict[str, Any]:
501
501
  """Process file using file manager."""
502
502
  return self._file_manager.process_file(file_path, operation)
503
503
 
504
- def get_file_info(self, file_path: Union[str, Path]) -> Dict[str, Any]:
504
+ def get_file_info(self, file_path: Union[str, Path]) -> dict[str, Any]:
505
505
  """Get comprehensive file information."""
506
506
  return self._file_manager.get_file_info(file_path)
507
507
 
@@ -734,7 +734,7 @@ class XWSerializer(ASerialization):
734
734
  def merge(
735
735
  self,
736
736
  file_path: Union[str, Path],
737
- updates: Dict[str, Any],
737
+ updates: dict[str, Any],
738
738
  **options
739
739
  ) -> None:
740
740
  """
@@ -775,13 +775,185 @@ class XWSerializer(ASerialization):
775
775
  except Exception as e:
776
776
  logger.error(f"Merge failed for {target_path}: {e}")
777
777
  raise SerializationError(f"Merge failed: {e}") from e
778
+
779
+ # ============================================================================
780
+ # RECORD-LEVEL OPERATIONS (delegated to specialized serializers)
781
+ # ============================================================================
782
+
783
+ def stream_read_record(
784
+ self,
785
+ file_path: Union[str, Path],
786
+ match: callable,
787
+ projection: Optional[list[Any]] = None,
788
+ **options: Any,
789
+ ) -> Any:
790
+ """
791
+ Stream-style read of a single logical record.
792
+
793
+ Delegates to the specialized serializer when available (e.g. JSONL /
794
+ NDJSON), falling back to the generic ASerialization implementation
795
+ which may load the entire file and scan in memory.
796
+ """
797
+ target_path = Path(file_path)
798
+
799
+ if self.validate_paths:
800
+ self._path_validator.validate_path(target_path)
801
+
802
+ format_hint = self._detect_format_from_path(target_path)
803
+ specialized = self._ensure_specialized(
804
+ file_path=target_path,
805
+ format_hint=format_hint,
806
+ )
807
+
808
+ try:
809
+ return specialized.stream_read_record(
810
+ target_path,
811
+ match,
812
+ projection=projection,
813
+ **options,
814
+ )
815
+ except NotImplementedError:
816
+ # Fallback to generic full-load behavior from ASerialization
817
+ return super().stream_read_record(
818
+ target_path,
819
+ match,
820
+ projection=projection,
821
+ **options,
822
+ )
823
+
824
+ def stream_update_record(
825
+ self,
826
+ file_path: Union[str, Path],
827
+ match: callable,
828
+ updater: callable,
829
+ *,
830
+ atomic: bool = True,
831
+ **options: Any,
832
+ ) -> int:
833
+ """
834
+ Stream-style update of logical records.
835
+
836
+ Delegates to the specialized serializer when it provides a streaming
837
+ implementation (e.g. JSONL). Falls back to the generic
838
+ ASerialization implementation that may load the full file, but still
839
+ honours atomic save semantics.
840
+ """
841
+ target_path = Path(file_path)
842
+
843
+ if self.validate_paths:
844
+ self._path_validator.validate_path(target_path)
845
+
846
+ format_hint = self._detect_format_from_path(target_path)
847
+ specialized = self._ensure_specialized(
848
+ file_path=target_path,
849
+ format_hint=format_hint,
850
+ )
851
+
852
+ try:
853
+ return specialized.stream_update_record(
854
+ target_path,
855
+ match,
856
+ updater,
857
+ atomic=atomic,
858
+ **options,
859
+ )
860
+ except NotImplementedError:
861
+ return super().stream_update_record(
862
+ target_path,
863
+ match,
864
+ updater,
865
+ atomic=atomic,
866
+ **options,
867
+ )
868
+
869
+ def get_record_page(
870
+ self,
871
+ file_path: Union[str, Path],
872
+ page_number: int,
873
+ page_size: int,
874
+ **options: Any,
875
+ ) -> list[Any]:
876
+ """
877
+ Retrieve a logical page of records from a file.
878
+
879
+ Delegates to the specialized serializer when supported (for example,
880
+ JSONL can implement true streaming paging). Falls back to the generic
881
+ ASerialization implementation, which may load the entire file and
882
+ slice a top-level list.
883
+ """
884
+ target_path = Path(file_path)
885
+
886
+ if self.validate_paths:
887
+ self._path_validator.validate_path(target_path)
888
+
889
+ format_hint = self._detect_format_from_path(target_path)
890
+ specialized = self._ensure_specialized(
891
+ file_path=target_path,
892
+ format_hint=format_hint,
893
+ )
894
+
895
+ try:
896
+ return specialized.get_record_page(
897
+ target_path,
898
+ page_number,
899
+ page_size,
900
+ **options,
901
+ )
902
+ except NotImplementedError:
903
+ return super().get_record_page(
904
+ target_path,
905
+ page_number,
906
+ page_size,
907
+ **options,
908
+ )
909
+
910
+ def get_record_by_id(
911
+ self,
912
+ file_path: Union[str, Path],
913
+ id_value: Any,
914
+ *,
915
+ id_field: str = "id",
916
+ **options: Any,
917
+ ) -> Any:
918
+ """
919
+ Retrieve a logical record by identifier.
920
+
921
+ Delegates to the specialized serializer where possible; falls back to
922
+ the generic ASerialization implementation which performs a linear scan
923
+ over a top-level list.
924
+ """
925
+ target_path = Path(file_path)
926
+
927
+ if self.validate_paths:
928
+ self._path_validator.validate_path(target_path)
929
+
930
+ format_hint = self._detect_format_from_path(target_path)
931
+ specialized = self._ensure_specialized(
932
+ file_path=target_path,
933
+ format_hint=format_hint,
934
+ )
935
+
936
+ try:
937
+ return specialized.get_record_by_id(
938
+ target_path,
939
+ id_value,
940
+ id_field=id_field,
941
+ **options,
942
+ )
943
+ except NotImplementedError:
944
+ return super().get_record_by_id(
945
+ target_path,
946
+ id_value,
947
+ id_field=id_field,
948
+ **options,
949
+ )
778
950
 
779
951
  # ============================================================================
780
952
  # BATCH OPERATIONS
781
953
  # ============================================================================
782
954
 
783
- def batch_save(self, data_dict: Dict[Union[str, Path], Any],
784
- format_hint: Optional[str] = None) -> Dict[str, bool]:
955
+ def batch_save(self, data_dict: dict[Union[str, Path], Any],
956
+ format_hint: Optional[str] = None) -> dict[str, bool]:
785
957
  """Save multiple files in batch."""
786
958
  results = {}
787
959
 
@@ -796,8 +968,8 @@ class XWSerializer(ASerialization):
796
968
 
797
969
  return results
798
970
 
799
- def batch_load(self, file_paths: List[Union[str, Path]],
800
- format_hint: Optional[str] = None) -> Dict[str, Any]:
971
+ def batch_load(self, file_paths: list[Union[str, Path]],
972
+ format_hint: Optional[str] = None) -> dict[str, Any]:
801
973
  """Load multiple files in batch."""
802
974
  results = {}
803
975
 
@@ -816,7 +988,7 @@ class XWSerializer(ASerialization):
816
988
  # UTILITY METHODS
817
989
  # ============================================================================
818
990
 
819
- def get_serializer_info(self) -> Dict[str, Any]:
991
+ def get_serializer_info(self) -> dict[str, Any]:
820
992
  """Get comprehensive serializer information."""
821
993
  return {
822
994
  'auto_serialize': self.auto_serialize,
@@ -907,7 +1079,7 @@ class XWSerializer(ASerialization):
907
1079
  specialized = self._ensure_specialized(data=data)
908
1080
  return specialized.validate_data(data)
909
1081
 
910
- def get_schema_info(self) -> Dict[str, Any]:
1082
+ def get_schema_info(self) -> dict[str, Any]:
911
1083
  """Get schema info."""
912
1084
  if self._specialized_serializer is None:
913
1085
  return {
@@ -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.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: November 9, 2025
9
9
 
10
10
  Serialization utilities module.
@@ -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.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: November 9, 2025
9
9
 
10
10
  Path operations utilities for serialization formats.
@@ -13,7 +13,7 @@ Provides JSONPointer path parsing and manipulation utilities that serializers
13
13
  can use for path-based operations. Includes path validation for security.
14
14
  """
15
15
 
16
- from typing import Any, Dict, List, Union
16
+ from typing import Any, Union
17
17
  from pathlib import Path
18
18
 
19
19
  from ...errors import SerializationError
@@ -65,7 +65,7 @@ def validate_json_pointer(path: str) -> bool:
65
65
  return True
66
66
 
67
67
 
68
- def parse_json_pointer(path: str) -> List[Union[str, int]]:
68
+ def parse_json_pointer(path: str) -> list[Union[str, int]]:
69
69
  """
70
70
  Parse a JSONPointer path into a list of keys/indices.
71
71
 
@@ -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.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: 30-Oct-2025
9
9
 
10
10
  Stream operations and codec-integrated I/O.
@@ -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.409
5
+ Version: 0.0.1.411
6
6
  Generation Date: September 04, 2025
7
7
 
8
8
  Asynchronous I/O operations for non-blocking file handling.
@@ -15,7 +15,7 @@ import tempfile
15
15
  import time
16
16
  from contextlib import asynccontextmanager
17
17
  from pathlib import Path
18
- from typing import Any, AsyncContextManager, BinaryIO, List, Optional, TextIO, Union
18
+ from typing import Any, AsyncContextManager, BinaryIO, Optional, TextIO, Union
19
19
 
20
20
  # Import aiofiles - lazy installation system will handle it if missing
21
21
  import aiofiles
@@ -441,7 +441,7 @@ async def async_safe_read_bytes(file_path: Union[str, Path], max_size_mb: float
441
441
  async def async_safe_read_with_fallback(
442
442
  file_path: Union[str, Path],
443
443
  preferred_encoding: str = "utf-8",
444
- fallback_encodings: Optional[List[str]] = None,
444
+ fallback_encodings: Optional[list[str]] = None,
445
445
  max_size_mb: float = 100.0,
446
446
  ) -> str:
447
447
  """
@@ -4,24 +4,20 @@
4
4
  Company: eXonware.com
5
5
  Author: Eng. Muhammad AlShehri
6
6
  Email: connect@exonware.com
7
- Version: 0.0.1.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: 30-Oct-2025
9
9
 
10
10
  Base classes for stream operations.
11
11
  """
12
12
 
13
13
  from abc import ABC, abstractmethod
14
- from typing import Generic, TypeVar
15
14
 
16
15
  from ..contracts import ICodecIO, IPagedCodecIO
17
16
 
18
- T = TypeVar('T')
19
- R = TypeVar('R')
20
-
21
17
  __all__ = ['ACodecIO', 'APagedCodecIO']
22
18
 
23
19
 
24
- class ACodecIO(ICodecIO[T, R], ABC, Generic[T, R]):
20
+ class ACodecIO[T, R](ICodecIO[T, R], ABC):
25
21
  """Abstract base for codec I/O operations."""
26
22
 
27
23
  def __init__(self, codec, source):
@@ -40,7 +36,7 @@ class ACodecIO(ICodecIO[T, R], ABC, Generic[T, R]):
40
36
  return self._source
41
37
 
42
38
 
43
- class APagedCodecIO(ACodecIO[T, R], IPagedCodecIO[T, R], ABC, Generic[T, R]):
39
+ class APagedCodecIO[T, R](ACodecIO[T, R], IPagedCodecIO[T, R], ABC):
44
40
  """Abstract base for paged codec I/O."""
45
41
  pass
46
42
 
@@ -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.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: 30-Oct-2025
9
9
 
10
10
  Codec-integrated I/O - THE KILLER FEATURE!
@@ -19,15 +19,12 @@ Priority 5 (Extensibility): Works with ANY codec + ANY data source
19
19
  """
20
20
 
21
21
  from pathlib import Path
22
- from typing import Generic, TypeVar, Union, Optional, Iterator, Any
22
+ from typing import Union, Optional, Iterator, Any
23
23
 
24
24
  from ..contracts import ICodecIO, IPagedCodecIO, IDataSource, IPagedDataSource
25
25
 
26
- T = TypeVar('T') # Model type
27
- R = TypeVar('R') # Representation type (bytes or str)
28
26
 
29
-
30
- class CodecIO(Generic[T, R], ICodecIO[T, R]):
27
+ class CodecIO[T, R](ICodecIO[T, R]):
31
28
  """
32
29
  I/O operations with integrated codec - THE KILLER FEATURE!
33
30
 
@@ -260,7 +257,7 @@ class CodecIO(Generic[T, R], ICodecIO[T, R]):
260
257
  return CodecIO(codec, source)
261
258
 
262
259
 
263
- class PagedCodecIO(CodecIO[T, R], IPagedCodecIO[T, R]):
260
+ class PagedCodecIO[T, R](CodecIO[T, R], IPagedCodecIO[T, R]):
264
261
  """
265
262
  CodecIO with paging support - for BIG data files!
266
263
 
@@ -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.409
6
+ Version: 0.0.1.411
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,
@@ -79,9 +78,9 @@ class FabricConfig:
79
78
  pool_factory: Callable[..., AsyncProcessPool] = AsyncProcessPool
80
79
  queue_factory: Callable[..., AsyncMessageQueue] = AsyncMessageQueue
81
80
  shared_memory_factory: Callable[..., SharedMemoryManager] = SharedMemoryManager
82
- pool_kwargs: Dict[str, Any] = field(default_factory=dict)
83
- queue_kwargs: Dict[str, Any] = field(default_factory=dict)
84
- shared_memory_kwargs: Dict[str, Any] = field(default_factory=dict)
81
+ pool_kwargs: dict[str, Any] = field(default_factory=dict)
82
+ queue_kwargs: dict[str, Any] = field(default_factory=dict)
83
+ shared_memory_kwargs: dict[str, Any] = field(default_factory=dict)
85
84
 
86
85
 
87
86
  class AsyncProcessFabric:
@@ -106,9 +105,9 @@ class AsyncProcessFabric:
106
105
  pool_factory: Optional[Callable[..., AsyncProcessPool]] = None,
107
106
  queue_factory: Optional[Callable[..., AsyncMessageQueue]] = None,
108
107
  shared_memory_factory: Optional[Callable[..., SharedMemoryManager]] = None,
109
- pool_kwargs: Optional[Dict[str, Any]] = None,
110
- queue_kwargs: Optional[Dict[str, Any]] = None,
111
- shared_memory_kwargs: Optional[Dict[str, Any]] = None,
108
+ pool_kwargs: Optional[dict[str, Any]] = None,
109
+ queue_kwargs: Optional[dict[str, Any]] = None,
110
+ shared_memory_kwargs: Optional[dict[str, Any]] = None,
112
111
  logger_instance: Optional[logging.Logger] = None,
113
112
  ) -> None:
114
113
  self._config = FabricConfig(
@@ -1,16 +1,16 @@
1
- #exonware/xsystem/ipc/base.py
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.409
6
+ Version: 0.0.1.411
7
7
  Generation Date: September 04, 2025
8
8
 
9
9
  IPC module base classes - abstract classes for inter-process communication functionality.
10
10
  """
11
11
 
12
12
  from abc import ABC, abstractmethod
13
- from typing import Any, Dict, List, Optional, Union
13
+ from typing import Any, Optional, Union
14
14
  from .contracts import MessageType, QueueType, ProcessState, SharedMemoryType
15
15
 
16
16
 
@@ -215,10 +215,10 @@ class AProcessManagerBase(ABC):
215
215
 
216
216
  def __init__(self):
217
217
  """Initialize process manager."""
218
- self._processes: Dict[str, Any] = {}
218
+ self._processes: dict[str, Any] = {}
219
219
 
220
220
  @abstractmethod
221
- def start_process(self, name: str, command: List[str], **kwargs) -> bool:
221
+ def start_process(self, name: str, command: list[str], **kwargs) -> bool:
222
222
  """Start new process."""
223
223
  pass
224
224
 
@@ -238,7 +238,7 @@ class AProcessManagerBase(ABC):
238
238
  pass
239
239
 
240
240
  @abstractmethod
241
- def list_processes(self) -> List[str]:
241
+ def list_processes(self) -> list[str]:
242
242
  """List all managed processes."""
243
243
  pass
244
244
 
@@ -279,9 +279,9 @@ class AProcessPoolBase(ABC):
279
279
  max_processes: Maximum number of processes in pool
280
280
  """
281
281
  self.max_processes = max_processes
282
- self._processes: List[Any] = []
283
- self._available_processes: List[Any] = []
284
- self._busy_processes: List[Any] = []
282
+ self._processes: list[Any] = []
283
+ self._available_processes: list[Any] = []
284
+ self._busy_processes: list[Any] = []
285
285
 
286
286
  @abstractmethod
287
287
  def initialize(self) -> None:
@@ -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.409
5
+ Version: 0.0.1.411
6
6
  Generation Date: September 04, 2025
7
7
 
8
8
  IPC module contracts - interfaces and enums for inter-process communication.
9
9
  """
10
10
 
11
11
  from abc import ABC, abstractmethod
12
- from typing import Any, Dict, List, Optional, Union, AsyncGenerator, Callable
12
+ from typing import Any, Optional, Union, AsyncGenerator, Callable
13
13
  from multiprocessing import Process
14
14
 
15
15
  # Import enums from types module
@@ -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[Dict] = None) -> Process:
127
+ def create_process(self, target: Callable, args: tuple = (), kwargs: Optional[dict] = None) -> Process:
128
128
  """Create new process."""
129
129
  pass
130
130
 
@@ -163,12 +163,12 @@ class IProcessPool(ABC):
163
163
  pass
164
164
 
165
165
  @abstractmethod
166
- def map(self, func: Callable, iterable: List[Any]) -> List[Any]:
166
+ def map(self, func: Callable, iterable: list[Any]) -> list[Any]:
167
167
  """Map function over iterable."""
168
168
  pass
169
169
 
170
170
  @abstractmethod
171
- async def map_async(self, func: Callable, iterable: List[Any]) -> List[Any]:
171
+ async def map_async(self, func: Callable, iterable: list[Any]) -> list[Any]:
172
172
  """Map function over iterable asynchronously."""
173
173
  pass
174
174
 
@@ -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.409
7
+ Version: 0.0.1.411
8
8
  Generation Date: 07-Sep-2025
9
9
 
10
10
  IPC types and enums for XWSystem.
@@ -1,9 +1,9 @@
1
- #exonware/xsystem/ipc/errors.py
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.409
6
+ Version: 0.0.1.411
7
7
  Generation Date: September 04, 2025
8
8
 
9
9
  IPC module errors - exception classes for inter-process communication functionality.
@@ -14,7 +14,7 @@ import asyncio
14
14
  import queue
15
15
  import threading
16
16
  import multiprocessing as mp
17
- from typing import Any, Optional, TypeVar, Generic, Callable
17
+ from typing import Any, Optional, Callable
18
18
  from dataclasses import dataclass
19
19
  import time
20
20
  import logging
@@ -22,11 +22,9 @@ from .defs import MessageQueueType
22
22
 
23
23
  logger = logging.getLogger(__name__)
24
24
 
25
- T = TypeVar('T')
26
-
27
25
 
28
26
  @dataclass
29
- class Message(Generic[T]):
27
+ class Message[T]:
30
28
  """A message in the queue with metadata."""
31
29
  data: T
32
30
  timestamp: float
@@ -39,7 +37,7 @@ class Message(Generic[T]):
39
37
  self.timestamp = time.time()
40
38
 
41
39
 
42
- class MessageQueue(Generic[T]):
40
+ class MessageQueue[T]:
43
41
  """
44
42
  Thread-safe message queue with advanced features.
45
43
 
@@ -270,7 +268,7 @@ class MessageQueue(Generic[T]):
270
268
  self.shutdown()
271
269
 
272
270
 
273
- class AsyncMessageQueue(Generic[T]):
271
+ class AsyncMessageQueue[T]:
274
272
  """
275
273
  Async-compatible message queue.
276
274
 
@@ -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\\xsystem_{uuid.uuid4().hex}"
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"xsystem_pipe_{os.getpid()}")
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: