mc.storage is a thin wrapper around your private S3 storage area with two
well-known directories:
Incoming/ — files you send in.
Outgoing/ — files placed for you to read.
upload* defaults to Incoming/; download*, list*, and delete default
to Outgoing/ so the natural list-then-act loop targets the same direction.
Override per call with direction="incoming" / direction="outgoing".
Single file
upload returns the relative remote key. download returns the local
Path that was written.
Listing
Each ObjectMeta carries key (relative — pass back to download /
delete as-is), size, last_modified, and etag.
Bulk
Bulk methods run uploads/downloads in parallel — defaults to 8 workers,
tune with max_concurrency=. Order is preserved; the first error in a
batch fails the call.
Credentials
Storage credentials are fetched lazily on first call and cached on the
client. The SDK auto-refreshes them when they’re within ~2 minutes of
expiry, so a long-running process can hold one Minerva() instance and
keep working across hour-long sessions without manual renewal.
Construct one Minerva() per process and reuse it — every fresh
instance pays the credential round-trip again.
Access scope
Storage credentials are scoped to your org’s directory — the underlying
session policy only permits s3:GetObject / s3:PutObject /
s3:DeleteObject on {your_org}/* keys, and s3:ListBucket filtered to
the same prefix. Other orgs’ data is unreachable regardless of what you
pass to the SDK.
The SDK additionally rejects path-traversal-shaped keys
(.. segments, absolute paths, backslashes) at the call site for clean
local errors — but the real isolation is server-side.
Errors
All storage errors derive from MinervaStorageError:
The [storage] extra pulls in boto3 so the base wheel stays small. If
you already have boto3 in your environment, the extra still wires up
the SDK’s lazy-import guard cleanly — install it either way.