Skip to main content
All Python modules · Import and compatibility guidance

Exports

AssetMediaMetadata

Store inspected, non-content media properties safe for policy checks.
Fields (— means no declared default):

AssetNotFoundError

Indicate that an asset is absent or inaccessible to the caller.

AssetQuotaError

Indicate that an asset or store capacity limit was exceeded.

AssetRecord

Describe a stored asset without exposing its binary content.
Fields (— means no declared default):

AssetScope

Bind an asset to one authenticated user and session.
Fields (— means no declared default):

AssetStorage

Persist and retrieve binary assets behind scoped opaque references.

AssetStorage.start

Initialize resources required by the asset store.

AssetStorage.save

Persist streamed bytes and return their scoped asset record.

AssetStorage.stat

Return metadata for an owned asset, or None when unavailable.

AssetStorage.open

Stream the bytes for an asset owned by the supplied scope.

AssetStorage.delete

Delete an owned asset and report whether one was removed.

AssetStorage.delete_scope

Delete every asset in a scope and return the removal count.

AssetStorage.close

Release resources owned by the asset store.

AssetStore

Persist and retrieve binary assets behind scoped opaque references.

AssetStore.start

Initialize resources required by the asset store.

AssetStore.save

Persist streamed bytes and return their scoped asset record.

AssetStore.stat

Return metadata for an owned asset, or None when unavailable.

AssetStore.open

Stream the bytes for an asset owned by the supplied scope.

AssetStore.delete

Delete an owned asset and report whether one was removed.

AssetStore.delete_scope

Delete every asset in a scope and return the removal count.

AssetStore.close

Release resources owned by the asset store.

AssetStoreError

Base error for asset-store operations without sensitive context.

AssetURLStorage

Optional capability for model-call-time temporary URL generation.

AssetURLStorage.signed_url

Create a short-lived URL for an asset owned by the supplied scope.

AssetValidationError

Indicate malformed asset input without reflecting the rejected value.

DEFAULT_MAX_ASSET_BYTES

DEFAULT_MAX_TOTAL_ASSET_BYTES

MemoryAssetStore

Bounded, process-local asset storage intended for development and tests.

MemoryAssetStore.total_bytes

Report committed bytes for development diagnostics.

MemoryAssetStore.start

Satisfy lifecycle ownership without allocating external resources.

MemoryAssetStore.save

Stream an asset into reserved capacity and publish it atomically.

MemoryAssetStore.stat

Return metadata only when the caller owns an unexpired asset.

MemoryAssetStore.open

Yield a stable snapshot while later deletion blocks new readers.

MemoryAssetStore.delete

Delete an owned asset without revealing cross-principal existence.

MemoryAssetStore.delete_scope

Remove all assets owned by a deleted session without cross-scope reads.

MemoryAssetStore.cleanup_expired

Synchronously remove expired assets and return the removal count.

MemoryAssetStore.clear

Deterministically discard all development-store content.

MemoryAssetStore.close

Discard process-local bytes when the owning application stops.

Stored

Persist a media field using one explicitly named asset storage. expires_in controls the model-facing URL lifetime. retention controls stored-byte lifetime; the two durations are deliberately independent.
Fields (— means no declared default):

Stored.retention_seconds

Return the store contract’s numeric retention representation.