Skip to content

cayu.sessions.replace_session_user_metadata

Part of cayu.sessions.base. Read the Python API overview and install the required extra.

from cayu.sessions import replace_session_user_metadata

Combine validated user metadata with the current runtime-owned entries.

Callers perform this merge while holding the store’s session lock. Runtime metadata participates in recovery and policy enforcement, so it must be read and retained in the same transaction that writes the replacement.

replace_session_user_metadata(current: dict[str, Any], replacement: dict[str, Any]) -> dict[str, Any]

Release source · Runtime guarantees · Capability guides