query-cascade 0.3.22__tar.gz → 0.3.23__tar.gz
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.
- {query_cascade-0.3.22 → query_cascade-0.3.23}/PKG-INFO +9 -4
- {query_cascade-0.3.22 → query_cascade-0.3.23}/README.md +8 -3
- {query_cascade-0.3.22 → query_cascade-0.3.23}/pyproject.toml +1 -1
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/engine.py +4 -3
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/PKG-INFO +9 -4
- {query_cascade-0.3.22 → query_cascade-0.3.23}/setup.cfg +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/__init__.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_ast_rewrite.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_canonical.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_collections.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_disk_cache.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_errors.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_evaluator.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_graph_export.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_incremental.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_persistence.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_runtime.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_scheduler.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_serde.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_state.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_store.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/cascade/_synthetic_graph.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/SOURCES.txt +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/dependency_links.txt +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/requires.txt +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/top_level.txt +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_ast_rewrite.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_async.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_async_coverage.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_code_versioning.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_datetime.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_dependency_parallelism.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_disk_cache.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_compute_many.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_concurrency.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_persistence_and_tracing.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_private.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_private2.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_engine_sweep.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_error_caching.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_error_caching_persistence.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_evaluator_and_synthetic_coverage.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_examples.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_fixed_point.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_incremental_collections.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_incremental_graph.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_incremental_persistence.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_incremental_pipeline.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_internal_invariants.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_memoize_false.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_performance.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_persistence_permutations.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_repro_touch_memo_keyerror.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_scale_behavior.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_serde.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_stateful_engine_invariants.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_store_coverage.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_subgraph_stats_export.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_sweep_unaccessed.py +0 -0
- {query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_ttl.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: query-cascade
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.23
|
|
4
4
|
Summary: Minimal demand-driven query framework for incremental computation.
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -88,9 +88,10 @@ print(get_result())
|
|
|
88
88
|
|
|
89
89
|
The `Engine` manages caching, execution, and state tracking.
|
|
90
90
|
|
|
91
|
-
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, incremental=True)`**: Initializes the engine.
|
|
91
|
+
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, cache_backend="mdbx", incremental=True)`**: Initializes the engine.
|
|
92
92
|
* `max_entries` sets the limit for the Least Recently Used (LRU) in-memory cache.
|
|
93
93
|
* Passing `cache_dir` enables persistent disk caching.
|
|
94
|
+
* `cache_backend` allows you to select the storage engine for persistence (`"mdbx"`, `"sqlite"`, or `"lmdb"`).
|
|
94
95
|
|
|
95
96
|
### Defining Nodes: `@engine.input` and `@engine.query`
|
|
96
97
|
|
|
@@ -221,13 +222,17 @@ print(effects["warnings"])
|
|
|
221
222
|
```
|
|
222
223
|
|
|
223
224
|
### Persistent Disk Caching
|
|
224
|
-
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded MDBX
|
|
225
|
+
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded store (MDBX by default), serializes query results with a deterministic msgpack encoding, and fingerprints every input value by hashing its serialized bytes with blake2b.
|
|
225
226
|
|
|
226
227
|
```python
|
|
227
228
|
from cascade import Engine
|
|
229
|
+
# Uses the default "mdbx" backend:
|
|
228
230
|
engine = Engine(max_entries=10_000, cache_dir=".cascade_cache")
|
|
231
|
+
|
|
232
|
+
# Or opt into an alternative backend, like SQLite:
|
|
233
|
+
sqlite_engine = Engine(max_entries=10_000, cache_dir=".cascade_cache", cache_backend="sqlite")
|
|
229
234
|
```
|
|
230
|
-
* `libmdbx` and `msgpack` are required (`pip install query-cascade[disk]`).
|
|
235
|
+
* `libmdbx` and `msgpack` are required for the default backend (`pip install query-cascade[disk]`). You can also use `sqlite` which has no external dependencies.
|
|
231
236
|
* Values and arguments must be serializable (primitives, bytes, lists, dicts, dataclasses, etc.).
|
|
232
237
|
* **`engine.clear_disk_cache()`**: Deletes every entry in the persistent disk cache.
|
|
233
238
|
|
|
@@ -67,9 +67,10 @@ print(get_result())
|
|
|
67
67
|
|
|
68
68
|
The `Engine` manages caching, execution, and state tracking.
|
|
69
69
|
|
|
70
|
-
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, incremental=True)`**: Initializes the engine.
|
|
70
|
+
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, cache_backend="mdbx", incremental=True)`**: Initializes the engine.
|
|
71
71
|
* `max_entries` sets the limit for the Least Recently Used (LRU) in-memory cache.
|
|
72
72
|
* Passing `cache_dir` enables persistent disk caching.
|
|
73
|
+
* `cache_backend` allows you to select the storage engine for persistence (`"mdbx"`, `"sqlite"`, or `"lmdb"`).
|
|
73
74
|
|
|
74
75
|
### Defining Nodes: `@engine.input` and `@engine.query`
|
|
75
76
|
|
|
@@ -200,13 +201,17 @@ print(effects["warnings"])
|
|
|
200
201
|
```
|
|
201
202
|
|
|
202
203
|
### Persistent Disk Caching
|
|
203
|
-
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded MDBX
|
|
204
|
+
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded store (MDBX by default), serializes query results with a deterministic msgpack encoding, and fingerprints every input value by hashing its serialized bytes with blake2b.
|
|
204
205
|
|
|
205
206
|
```python
|
|
206
207
|
from cascade import Engine
|
|
208
|
+
# Uses the default "mdbx" backend:
|
|
207
209
|
engine = Engine(max_entries=10_000, cache_dir=".cascade_cache")
|
|
210
|
+
|
|
211
|
+
# Or opt into an alternative backend, like SQLite:
|
|
212
|
+
sqlite_engine = Engine(max_entries=10_000, cache_dir=".cascade_cache", cache_backend="sqlite")
|
|
208
213
|
```
|
|
209
|
-
* `libmdbx` and `msgpack` are required (`pip install query-cascade[disk]`).
|
|
214
|
+
* `libmdbx` and `msgpack` are required for the default backend (`pip install query-cascade[disk]`). You can also use `sqlite` which has no external dependencies.
|
|
210
215
|
* Values and arguments must be serializable (primitives, bytes, lists, dicts, dataclasses, etc.).
|
|
211
216
|
* **`engine.clear_disk_cache()`**: Deletes every entry in the persistent disk cache.
|
|
212
217
|
|
|
@@ -261,9 +261,10 @@ class Engine:
|
|
|
261
261
|
# Global opt-out for the map/reduce AST interception; per-query
|
|
262
262
|
# incremental= on @engine.query overrides it in either direction.
|
|
263
263
|
self._incremental_default = incremental
|
|
264
|
-
# Passing cache_dir switches on zero-config persistence
|
|
265
|
-
# deterministic msgpack serialization, and content
|
|
266
|
-
# cross-session revision markers. Missing
|
|
264
|
+
# Passing cache_dir switches on zero-config persistence (MDBX by default,
|
|
265
|
+
# or sqlite/lmdb), deterministic msgpack serialization, and content
|
|
266
|
+
# fingerprints as the cross-session revision markers. Missing dependencies
|
|
267
|
+
# (e.g. libmdbx/msgpack) raise here.
|
|
267
268
|
self._disk: DiskCacheProtocol | None = None
|
|
268
269
|
value_digest: Callable[[Any], str] | None = None
|
|
269
270
|
if cache_dir is not None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: query-cascade
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.23
|
|
4
4
|
Summary: Minimal demand-driven query framework for incremental computation.
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -88,9 +88,10 @@ print(get_result())
|
|
|
88
88
|
|
|
89
89
|
The `Engine` manages caching, execution, and state tracking.
|
|
90
90
|
|
|
91
|
-
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, incremental=True)`**: Initializes the engine.
|
|
91
|
+
* **`Engine(*, max_entries=10000, trace_limit=50000, stats=False, cache_dir=None, cache_map_size=2**30, cache_backend="mdbx", incremental=True)`**: Initializes the engine.
|
|
92
92
|
* `max_entries` sets the limit for the Least Recently Used (LRU) in-memory cache.
|
|
93
93
|
* Passing `cache_dir` enables persistent disk caching.
|
|
94
|
+
* `cache_backend` allows you to select the storage engine for persistence (`"mdbx"`, `"sqlite"`, or `"lmdb"`).
|
|
94
95
|
|
|
95
96
|
### Defining Nodes: `@engine.input` and `@engine.query`
|
|
96
97
|
|
|
@@ -221,13 +222,17 @@ print(effects["warnings"])
|
|
|
221
222
|
```
|
|
222
223
|
|
|
223
224
|
### Persistent Disk Caching
|
|
224
|
-
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded MDBX
|
|
225
|
+
Passing `cache_dir` to the `Engine` turns on zero-config persistence. Cascade provisions an embedded store (MDBX by default), serializes query results with a deterministic msgpack encoding, and fingerprints every input value by hashing its serialized bytes with blake2b.
|
|
225
226
|
|
|
226
227
|
```python
|
|
227
228
|
from cascade import Engine
|
|
229
|
+
# Uses the default "mdbx" backend:
|
|
228
230
|
engine = Engine(max_entries=10_000, cache_dir=".cascade_cache")
|
|
231
|
+
|
|
232
|
+
# Or opt into an alternative backend, like SQLite:
|
|
233
|
+
sqlite_engine = Engine(max_entries=10_000, cache_dir=".cascade_cache", cache_backend="sqlite")
|
|
229
234
|
```
|
|
230
|
-
* `libmdbx` and `msgpack` are required (`pip install query-cascade[disk]`).
|
|
235
|
+
* `libmdbx` and `msgpack` are required for the default backend (`pip install query-cascade[disk]`). You can also use `sqlite` which has no external dependencies.
|
|
231
236
|
* Values and arguments must be serializable (primitives, bytes, lists, dicts, dataclasses, etc.).
|
|
232
237
|
* **`engine.clear_disk_cache()`**: Deletes every entry in the persistent disk cache.
|
|
233
238
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{query_cascade-0.3.22 → query_cascade-0.3.23}/src/query_cascade.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{query_cascade-0.3.22 → query_cascade-0.3.23}/tests/test_evaluator_and_synthetic_coverage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|