Skip to content

session_state

panel_flowdash.session_state

Per-session shared state built from registry provides/requires declarations.

RegistryEntry dataclass

A registered component/page with its metadata.

app = None class-attribute instance-attribute

app_id instance-attribute

load_error = field(default=None, repr=False, compare=False) class-attribute instance-attribute

metadata instance-attribute

module_name instance-attribute

module_path = None class-attribute instance-attribute

name instance-attribute

page_path instance-attribute

section instance-attribute

spec = field(default=None, repr=False, compare=False) class-attribute instance-attribute

title property

Human-readable title.

from_app(app, *, app_id=None, section=None, name=None) classmethod

Build an entry from an already-imported app object.

Unlike :func:build_registry, which discovers modules on disk and defers importing them, this wraps a live object so load() is a no-op. Used by the programmatic API where components are passed in directly.

Objects without @register metadata are treated as components, since a bare Viewer subclass handed to the editor is only ever meant to be one.

load()

Import the module and return the app object.

Caches the result on self.app. Raises on import failure.

build_session_state_class(registry)

Build a Parameterized subclass with one param per declared state key.

Scans the registry for all provides and requires keys and creates a dynamic class whose parameters represent shared session state.

check_requirements(state, requires)

Check which required keys are unsatisfied on the given state instance.

Returns a list of dicts describing each unsatisfied requirement. An empty list means all requirements are met.