v0.2.0
Added
LatencyRangeServer.from_file(path, ...)— serve a single file directly, reachable at its basename, with no containing directory, no temp dir, no symlink, and no copy. It's streamed from disk via aiohttp'sFileResponse(the same machinery directory mode uses), and because only the one pinned path is ever served there's no path-traversal surface (every other key 404s). The result is observationally a one-key directory server:describe(),files(),url(), andstats()behave identically to directory mode.
with LatencyRangeServer.from_file("CMU-1.tiff", latency=LogNormal(mode_ms=40)) as server:
open_and_read(server.url("CMU-1.tiff"))Full changelog: https://github.com/ianhi/snailmail/blob/v0.2.0/CHANGELOG.md