Platform 16–17 · Study guide
Store files on disk (S3-ready API) and cache the route table for ops tooling.
from tpy.storage import Storage
disk = Storage.disk("local")
disk.put("reports/hello.txt", b"hello")
raw = disk.get("reports/hello.txt")
disk.delete("reports/hello.txt")
Local files land under the project storage disk root. The API is intentionally driver-shaped so an S3 disk can plug in later without rewriting callers.
$ tpy serve # app must import cleanly $ tpy route cache --app app.main:app $ tpy route list --cached $ tpy route clear
Writes storage/framework/routes.cache.json by importing your FastAPI app and collecting routes.
tpy optimize for production warm caches.