withcache 0.7.2__tar.gz → 0.8.1__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.
Files changed (26) hide show
  1. {withcache-0.7.2 → withcache-0.8.1}/PKG-INFO +8 -6
  2. {withcache-0.7.2 → withcache-0.8.1}/README.md +7 -5
  3. {withcache-0.7.2 → withcache-0.8.1}/shim/build.zig.zon +1 -1
  4. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/__init__.py +1 -1
  5. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/server.py +463 -502
  6. {withcache-0.7.2 → withcache-0.8.1}/tests/test_withcache.py +46 -27
  7. {withcache-0.7.2 → withcache-0.8.1}/.gitignore +0 -0
  8. {withcache-0.7.2 → withcache-0.8.1}/LICENSE +0 -0
  9. {withcache-0.7.2 → withcache-0.8.1}/deploy/Containerfile +0 -0
  10. {withcache-0.7.2 → withcache-0.8.1}/deploy/compose.yml +0 -0
  11. {withcache-0.7.2 → withcache-0.8.1}/hatch_build.py +0 -0
  12. {withcache-0.7.2 → withcache-0.8.1}/pyproject.toml +0 -0
  13. {withcache-0.7.2 → withcache-0.8.1}/shim/build.zig +0 -0
  14. {withcache-0.7.2 → withcache-0.8.1}/shim/shim.zig +0 -0
  15. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/_shim.py +0 -0
  16. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/client.py +0 -0
  17. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/curlwithcache.py +0 -0
  18. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/oras.py +0 -0
  19. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/static/bootstrap-icons.min.css +0 -0
  20. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/static/bootstrap.min.css +0 -0
  21. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/static/fonts/bootstrap-icons.woff +0 -0
  22. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/static/fonts/bootstrap-icons.woff2 +0 -0
  23. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/static/htmx.min.js +0 -0
  24. {withcache-0.7.2 → withcache-0.8.1}/src/withcache/wgetwithcache.py +0 -0
  25. {withcache-0.7.2 → withcache-0.8.1}/tests/test_differential.py +0 -0
  26. {withcache-0.7.2 → withcache-0.8.1}/tests/test_oras.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: withcache
3
- Version: 0.7.2
3
+ Version: 0.8.1
4
4
  Summary: Operator-curated, URL-keyed artifact cache for a small lab (CUDA/ROCm/DOCA/firmware)
5
5
  Project-URL: Homepage, https://github.com/safl/withcache
6
6
  Author-email: "Simon A. F. Lund" <safl@safl.dk>
@@ -61,7 +61,7 @@ optional **operator-curated** model (`--curate`: a miss queue a human approves).
61
61
 
62
62
  | Path | What it is |
63
63
  |-------------------------------|-------------------------------------------------------------|
64
- | `src/withcache/server.py` | The cache-host: blob store + miss table + **background download manager** + operator UI (Pico.css + HTMX) |
64
+ | `src/withcache/server.py` | The cache-host: blob store + miss table + **background download manager** + operator UI (Bootstrap 5 + Bootstrap Icons + HTMX) |
65
65
  | `src/withcache/_shim.py` | Shared shim core (find URL → probe → rewrite → exec) |
66
66
  | `src/withcache/curlwithcache.py` / `wgetwithcache.py` | The Python `curl` / `wget` shims |
67
67
  | `shim/shim.zig` | The native shim: one static binary, both tools via `argv[0]` |
@@ -237,11 +237,13 @@ Notes & limits (all degrade gracefully; worst case is "no caching, curl still wo
237
237
 
238
238
  ## Operator UI
239
239
 
240
- `http://withcache-server:8081/` (Pico.css + HTMX, bundled offline) shows:
240
+ `http://withcache-server:8081/` (Bootstrap 5 + Bootstrap Icons + HTMX, bundled
241
+ offline; matches bty's chrome for a consistent trio) is a five-page dashboard:
242
+ - **Cached** (landing): URL, size, **hits** (times served) and **misses** (times requested before it was cached), SHA-256, fetched-at, each with **Delete** to free space.
243
+ - **Streams**: in-flight stream-through-and-store fetches serving bytes to a client while writing to disk.
244
+ - **Downloads**: live progress bars, `queued/running/completed/cancelled/failed`, **Cancel**, and **Clear finished**. Downloads run in a background worker pool, not in the request, so large pulls never block, modelled on [bty]'s job managers. The subnav Fetch form pre-seeds an artifact before anyone misses it.
241
245
  - **Misses**: auto-fetched by default, or (under `--curate`) each with **Download** (queues a background pull) and **Dismiss**.
242
- - **Downloads**: live progress bars, `queued/running/completed/cancelled/failed`, **Cancel**, and **Clear finished**. Downloads run in a background worker pool, not in the request, so large pulls never block, modelled on [bty]'s job managers.
243
- - **Cached artifacts**: URL, size, **hits** (times served) and **misses** (times requested before it was cached), SHA-256, fetched-at, each with **Delete** to free space.
244
- - **Add from URI**: pre-seed an artifact before anyone misses it.
246
+ - **Catalog**: image catalog fetched from a nosi-style `catalog.toml` (URL configurable via `$WITHCACHE_CATALOG_URL` or the subnav Set&fetch input); pre-seed by URL via the "Add image from oras" input.
245
247
 
246
248
  ## Auth
247
249
 
@@ -43,7 +43,7 @@ optional **operator-curated** model (`--curate`: a miss queue a human approves).
43
43
 
44
44
  | Path | What it is |
45
45
  |-------------------------------|-------------------------------------------------------------|
46
- | `src/withcache/server.py` | The cache-host: blob store + miss table + **background download manager** + operator UI (Pico.css + HTMX) |
46
+ | `src/withcache/server.py` | The cache-host: blob store + miss table + **background download manager** + operator UI (Bootstrap 5 + Bootstrap Icons + HTMX) |
47
47
  | `src/withcache/_shim.py` | Shared shim core (find URL → probe → rewrite → exec) |
48
48
  | `src/withcache/curlwithcache.py` / `wgetwithcache.py` | The Python `curl` / `wget` shims |
49
49
  | `shim/shim.zig` | The native shim: one static binary, both tools via `argv[0]` |
@@ -219,11 +219,13 @@ Notes & limits (all degrade gracefully; worst case is "no caching, curl still wo
219
219
 
220
220
  ## Operator UI
221
221
 
222
- `http://withcache-server:8081/` (Pico.css + HTMX, bundled offline) shows:
222
+ `http://withcache-server:8081/` (Bootstrap 5 + Bootstrap Icons + HTMX, bundled
223
+ offline; matches bty's chrome for a consistent trio) is a five-page dashboard:
224
+ - **Cached** (landing): URL, size, **hits** (times served) and **misses** (times requested before it was cached), SHA-256, fetched-at, each with **Delete** to free space.
225
+ - **Streams**: in-flight stream-through-and-store fetches serving bytes to a client while writing to disk.
226
+ - **Downloads**: live progress bars, `queued/running/completed/cancelled/failed`, **Cancel**, and **Clear finished**. Downloads run in a background worker pool, not in the request, so large pulls never block, modelled on [bty]'s job managers. The subnav Fetch form pre-seeds an artifact before anyone misses it.
223
227
  - **Misses**: auto-fetched by default, or (under `--curate`) each with **Download** (queues a background pull) and **Dismiss**.
224
- - **Downloads**: live progress bars, `queued/running/completed/cancelled/failed`, **Cancel**, and **Clear finished**. Downloads run in a background worker pool, not in the request, so large pulls never block, modelled on [bty]'s job managers.
225
- - **Cached artifacts**: URL, size, **hits** (times served) and **misses** (times requested before it was cached), SHA-256, fetched-at, each with **Delete** to free space.
226
- - **Add from URI**: pre-seed an artifact before anyone misses it.
228
+ - **Catalog**: image catalog fetched from a nosi-style `catalog.toml` (URL configurable via `$WITHCACHE_CATALOG_URL` or the subnav Set&fetch input); pre-seed by URL via the "Add image from oras" input.
227
229
 
228
230
  ## Auth
229
231
 
@@ -2,7 +2,7 @@
2
2
  .name = .withcache_shim,
3
3
  // Zig requires a literal here; keep it in lockstep with the project's
4
4
  // single source (src/withcache/__init__.py) via `make bump` / `make version-check`.
5
- .version = "0.7.2",
5
+ .version = "0.8.1",
6
6
  .fingerprint = 0xd7d96c5ed212ccaa,
7
7
  .minimum_zig_version = "0.16.0",
8
8
  .paths = .{
@@ -17,6 +17,6 @@ All modules are stdlib-only and self-contained.
17
17
  from . import oras
18
18
  from .client import blob_url, cache_base, is_cached, serve_url
19
19
 
20
- __version__ = "0.7.2"
20
+ __version__ = "0.8.1"
21
21
 
22
22
  __all__ = ["__version__", "blob_url", "cache_base", "is_cached", "oras", "serve_url"]