weftcodec 1.2.0__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.
weftcodec/__init__.py ADDED
@@ -0,0 +1,62 @@
1
+ """Independent Python implementation of the WeftCodec v1 reader.
2
+
3
+ This package reads WFT1 frames and canonical WCB bytes, verifies content roots
4
+ with domain-separated BLAKE3, and exposes a PyTorch-facing dataset over a
5
+ mounted directory. It contains no Rust or Go extension modules.
6
+
7
+ Implemented payload modes: RAW, ZSTD, REFERENCE, DELTA, DICTIONARY,
8
+ STRUCTURED, TENSOR, TOKEN_SEQUENCE, QUANTIZED_TENSOR, FLOAT_TENSOR,
9
+ TENSOR_SHARDED, WEIGHT_DELTA, KV_CACHE, ACTIVATION_STREAM, SEMANTIC_DELTA,
10
+ TENSOR_TILED, and SPARSE_DELTA (every allocated mode 0-16). Reserved and
11
+ experimental mode bytes raise :class:`UnsupportedMode` in
12
+ :mod:`weftcodec.frame`.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from .errors import (
18
+ Corrupt,
19
+ DependencyCycle,
20
+ DependencyDenied,
21
+ DependencyMismatch,
22
+ DependencyMissing,
23
+ LimitExceeded,
24
+ Malformed,
25
+ NonCanonical,
26
+ UnsupportedFeature,
27
+ UnsupportedMode,
28
+ UnsupportedVersion,
29
+ WeftError,
30
+ )
31
+ from .frame import Frame, FrameHeader, IMPLEMENTED_MODES, MODE_NAMES, parse
32
+ from .hashing import content_root, content_root_hex, hash_domain
33
+ from .identity import VerifyResult, verify_bytes, verify_frame
34
+
35
+ __version__ = "1.1.0"
36
+
37
+ __all__ = [
38
+ "Corrupt",
39
+ "DependencyCycle",
40
+ "DependencyDenied",
41
+ "DependencyMismatch",
42
+ "DependencyMissing",
43
+ "Frame",
44
+ "FrameHeader",
45
+ "IMPLEMENTED_MODES",
46
+ "LimitExceeded",
47
+ "MODE_NAMES",
48
+ "Malformed",
49
+ "NonCanonical",
50
+ "UnsupportedFeature",
51
+ "UnsupportedMode",
52
+ "UnsupportedVersion",
53
+ "VerifyResult",
54
+ "WeftError",
55
+ "__version__",
56
+ "content_root",
57
+ "content_root_hex",
58
+ "hash_domain",
59
+ "parse",
60
+ "verify_bytes",
61
+ "verify_frame",
62
+ ]
weftcodec/__main__.py ADDED
@@ -0,0 +1,6 @@
1
+ """``python -m weftcodec`` entry point."""
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ raise SystemExit(main())