matview-cache 0.1.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.
- matview/__init__.py +78 -0
- matview/cache.py +750 -0
- matview/canon.py +116 -0
- matview/cli.py +900 -0
- matview/codecs/__init__.py +159 -0
- matview/codecs/_arrow.py +104 -0
- matview/codecs/_arrow_ipc.py +89 -0
- matview/codecs/_arrow_pandas.py +76 -0
- matview/codecs/_arrow_parts.py +99 -0
- matview/codecs/_json.py +36 -0
- matview/codecs/_npy.py +53 -0
- matview/context.py +87 -0
- matview/errors.py +96 -0
- matview/fingerprint.py +99 -0
- matview/foreign.py +436 -0
- matview/graph.py +876 -0
- matview/policy.py +67 -0
- matview/py.typed +0 -0
- matview/registry.py +293 -0
- matview/store/__init__.py +6 -0
- matview/store/base.py +99 -0
- matview/store/sqlite.py +1188 -0
- matview/types.py +341 -0
- matview_cache-0.1.0.dist-info/METADATA +262 -0
- matview_cache-0.1.0.dist-info/RECORD +28 -0
- matview_cache-0.1.0.dist-info/WHEEL +4 -0
- matview_cache-0.1.0.dist-info/entry_points.txt +2 -0
- matview_cache-0.1.0.dist-info/licenses/LICENSE +21 -0
matview/__init__.py
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"""matview — materialized views for derived values.
|
|
2
|
+
|
|
3
|
+
Declare recipes: functions that compute a value from parameters and from other
|
|
4
|
+
recipes' outputs. Ask the cache for a value; it returns the stored one if it is
|
|
5
|
+
current and computes it if not, recursively resolving whatever that computation
|
|
6
|
+
turns out to need. Results are memoized in SQLite and reused across processes,
|
|
7
|
+
machines and runs.
|
|
8
|
+
|
|
9
|
+
A suspending scheduler with constructive traces, in the sense of *Build Systems
|
|
10
|
+
a la Carte*: dependencies are discovered by execution rather than declared, and
|
|
11
|
+
staleness is decided by content digests rather than timestamps.
|
|
12
|
+
|
|
13
|
+
The interoperability contract lives in ``SPEC.md`` and is versioned independently
|
|
14
|
+
of this package.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from matview.cache import Cache
|
|
18
|
+
from matview.codecs import Codec, get_codec, register_codec
|
|
19
|
+
from matview.errors import (
|
|
20
|
+
ArtifactTooLarge,
|
|
21
|
+
CodecError,
|
|
22
|
+
CycleError,
|
|
23
|
+
DeadlineExceeded,
|
|
24
|
+
ForeignRecipeError,
|
|
25
|
+
InvalidKey,
|
|
26
|
+
MatviewError,
|
|
27
|
+
MissingArtifacts,
|
|
28
|
+
RecipeNotFound,
|
|
29
|
+
)
|
|
30
|
+
from matview.registry import REGISTRY, Recipe, Registry, recipe
|
|
31
|
+
from matview.store import SqliteStore, Store
|
|
32
|
+
from matview.types import (
|
|
33
|
+
Artifact,
|
|
34
|
+
ArtifactRef,
|
|
35
|
+
BatchResult,
|
|
36
|
+
CacheStats,
|
|
37
|
+
DepEdge,
|
|
38
|
+
MissingNode,
|
|
39
|
+
OnMiss,
|
|
40
|
+
PlanReport,
|
|
41
|
+
Request,
|
|
42
|
+
StoreResult,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
__all__ = [
|
|
46
|
+
"REGISTRY",
|
|
47
|
+
"Artifact",
|
|
48
|
+
"ArtifactRef",
|
|
49
|
+
"ArtifactTooLarge",
|
|
50
|
+
"BatchResult",
|
|
51
|
+
"Cache",
|
|
52
|
+
"CacheStats",
|
|
53
|
+
"Codec",
|
|
54
|
+
"CodecError",
|
|
55
|
+
"CycleError",
|
|
56
|
+
"DeadlineExceeded",
|
|
57
|
+
"DepEdge",
|
|
58
|
+
"ForeignRecipeError",
|
|
59
|
+
"InvalidKey",
|
|
60
|
+
"MatviewError",
|
|
61
|
+
"MissingArtifacts",
|
|
62
|
+
"MissingNode",
|
|
63
|
+
"OnMiss",
|
|
64
|
+
"PlanReport",
|
|
65
|
+
"Recipe",
|
|
66
|
+
"RecipeNotFound",
|
|
67
|
+
"Registry",
|
|
68
|
+
"Request",
|
|
69
|
+
"SqliteStore",
|
|
70
|
+
"Store",
|
|
71
|
+
"StoreResult",
|
|
72
|
+
"__version__",
|
|
73
|
+
"get_codec",
|
|
74
|
+
"recipe",
|
|
75
|
+
"register_codec",
|
|
76
|
+
]
|
|
77
|
+
|
|
78
|
+
__version__ = "0.1.0"
|