Skip to content

cayu.sessions.access

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu import SessionAccessRule

Conjunction of selectors; unrestricted access must be explicit.

Decorators: @dataclass(frozen=True, slots=True).

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
selectors tuple[SessionAccessSelector, ...] ()
allow_all bool False
SessionAccessRule.matches(labels: Mapping[str, str]) -> bool

Release source · Runtime guarantees · Capability guides

from cayu import SessionAccessScope

Application policy expressed as bounded alternatives for each action.

Empty action grants deny. All keys used by any rule are protected from ordinary label updates, in addition to explicitly protected keys.

Decorators: @dataclass(frozen=True, slots=True).

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
read tuple[SessionAccessRule, ...] ()
create tuple[SessionAccessRule, ...] ()
modify tuple[SessionAccessRule, ...] ()
delete tuple[SessionAccessRule, ...] ()
execute tuple[SessionAccessRule, ...] ()
inspect_state tuple[SessionAccessRule, ...] ()
update_labels tuple[SessionAccessRule, ...] ()
relabel tuple[SessionAccessRule, ...] ()
protected_label_keys tuple[str, ...] ()
SessionAccessScope.matches(action: Action, labels: Mapping[str, str]) -> bool
SessionAccessScope.protected_keys() -> frozenset[str]

Release source · Runtime guarantees · Capability guides

from cayu import SessionAccessSelector

Immutable label requirement using the existing session-query semantics.

Decorators: @dataclass(frozen=True, slots=True).

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
key str required
operator LabelSelectorOperator LabelSelectorOperator.IN
values tuple[str, ...] ()
SessionAccessSelector.matches(labels: Mapping[str, str]) -> bool

Release source · Runtime guarantees · Capability guides