Storage

The SDK provides a solution-scoped ctx.storage filesystem backed by fsspec(opens in new tab). Project source uses the same filesystem interface in local development, tests, and production. Type a route parameter as Context to receive it.

TODO

Environment
Testing
memory backend for isolated in-memory test files.
Development
file backend for inspectable local files.
Production
s3 backend using solution and shared prefixes in one Organization bucket.

Usage

python
from longlink import Context
​
async def write_report(ctx: Context) -> None:
with ctx.storage.open("reports/example.txt", "wb") as f:
f.write(b"hello")