DocumentationDocumentation
API reference/Python API

Public types, enums, and results

Look up declarations, objects, callbacks, types, and enums used in public signatures, with links to usage.

How to read these definitions

This is the complete current public API index, preserving source parameters, defaults, fields, and return types. Follow topic links for usage. Protocol describes a method contract, not something to instantiate; dataclass describes a result/declaration; Literal lists allowed values; Callable describes a callback. <factory> denotes a constructor-generated default, not literal input.

Choose types by task

Item Usage and limitations
Entry points and environment bind, WebPlugin, registration, cleanup, and runtime status: Entry-point reference; exceptions and panel helpers: Errors and hints.
Windows and declarations Sources, size, position, multiple regions, browser state, and per-instance results: Window reference.
Actions and context JSON payloads, WebBridgeContext, and attachment consumption: Action reference.
State and fields Queries, field types, item/list, sensitivity, and callbacks: State reference.
Events and resources Transient events: Event reference; image/mesh protocols and file import/export: Resource reference.

Commonly confused values

Item Usage and limitations
WebWindowInstanceAction opened means newly opened; reused means reused. Neither proves all target regions succeeded.
WebAreaScope / WebExistingPolicy current targets the current region; same_type matches regions. Existing instances use error/reuse handling.
WebBrowserStateKind plugin/client/window/ephemeral/named choose browser-data isolation. They do not automatically save application data in the Blender file.
WebWindowOverflowMode none disables position recovery; shift repositions according to layout rules. Neither scales the entire page.
WebWindowPlacementName / Mode / Container Nine anchors and placement/position modes, with area as the container. See the window guide for coordinates and margins.
WebStateFieldType / Shape / Sensitivity Field types define query contracts; item/list define shape; safe_metadata/user_content describe content categories.
WebResourceOverwritePolicy confirm currently returns a name conflict without a host overwrite dialog. Choose overwrite or rename only after clear user intent.

Complete public definition index

NexusWebError
NexusWebError
Public definitions
class NexusWebError(RuntimeError):
  __init__(<signature-unavailable: ValueError>)
WebAreaSummary
WebAreaSummary
Public definitions
class WebAreaSummary (dataclass frozen slots):
  __init__(area_type: 'str | None', space_type: 'str | None', tree_type: 'str | None', is_current: 'bool' = False) -> None
  area_type: str | None
  space_type: str | None
  tree_type: str | None
  is_current: bool = False
WebBridge
WebBridge
Public definitions
class WebBridge (Protocol):
  action(self, name: 'str', handler: 'WebBridgeActionHandler | None' = None, *, invalidates: 'tuple[str, ...]' = (), permissions: 'tuple[str, ...]' = ('nexus_web.action.plugin.call',), state_guard_keys: 'tuple[str, ...]' = ()) -> 'WebBridgeActionHandler | Callable[[WebBridgeActionHandler], WebBridgeActionHandler]'
  dispose(self) -> 'None'
  @property event(self) -> 'WebBridgeEvent'
  remove_action(self, name: 'str') -> 'None'
  @property resource(self) -> 'WebBridgeResource'
  @property state(self) -> 'WebBridgeState'
WebBridgeActionHandler
WebBridgeActionHandler
Public definitions
WebBridgeActionHandler = collections.abc.Callable[[str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue'], nexus_web.public.WebBridgeContext], str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue']]
WebBridgeActionResource
WebBridgeActionResource
Public definitions
class WebBridgeActionResource (Protocol):
  take(self, resource_id: 'str') -> 'WebTakenResource'
WebBridgeContext
WebBridgeContext
Public definitions
class WebBridgeContext (dataclass frozen slots):
  __init__(origin: 'str', user_initiated: 'bool' = True, window_key: 'str | None' = None, resource: 'WebBridgeActionResource' = <factory>) -> None
  origin: str
  user_initiated: bool = True
  window_key: str | None = None
  resource: WebBridgeActionResource = <factory: _unavailable_action_resource>  # repr=False compare=False
WebBridgeEvent
WebBridgeEvent
Public definitions
class WebBridgeEvent (Protocol):
  emit(self, name: 'str', payload: 'WebEventPayload' = None) -> 'None'
WebBridgeResource
WebBridgeResource
Public definitions
class WebBridgeResource (Protocol):
  bytes(self, key: 'str', *, data: 'bytes | bytearray | memoryview', mime: 'str', kind: 'WebResourceFileKind' = 'binary', window_key: 'str | None' = None, ttl_seconds: 'float | None' = None) -> 'WebResourceRef'
  file(self, key: 'str', *, path: 'Path | str', mime: 'str', kind: 'WebResourceFileKind' = 'binary', window_key: 'str | None' = None, ttl_seconds: 'float | None' = None) -> 'WebResourceRef'
  image(self, key: 'str', *, mime: 'str' = 'application/octet-stream', data: 'bytes | bytearray | memoryview | None' = None, path: 'Path | str | None' = None, image: 'WebResourceImageSource | None' = None, source: 'WebResourceImageSource | None' = None, format: 'WebResourceImageFormat' = 'bytes', window_key: 'str | None' = None, ttl_seconds: 'float | None' = None) -> 'WebResourceRef'
  mesh(self, key: 'str', *, object: 'WebResourceMeshObjectSource | None' = None, mesh: 'WebResourceMeshSource | None' = None, depsgraph: 'object | None' = None, object_matrix: 'object | None' = None, max_triangles: 'int' = 500000, window_key: 'str | None' = None, ttl_seconds: 'float | None' = None) -> 'WebResourceRef'
  ref(self, key: 'str', *, window_key: 'str | None' = None) -> 'WebResourceRef'
WebBridgeState
WebBridgeState
Public definitions
class WebBridgeState (Protocol):
  __call__(self, key: 'str', handler: 'WebStateHandler | None' = None, *, shape: 'WebStateShape' = 'item', fields: 'Mapping[str, WebStateFieldSchema] | None' = None, default_fields: 'tuple[str, ...]' = (), filterable: 'tuple[str, ...]' = (), sortable: 'tuple[str, ...]' = (), default_limit: 'int | None' = None, max_limit: 'int | None' = None, permissions: 'tuple[str, ...]' = ('nexus_web.state.plugin.read',), sensitivity: 'WebStateSensitivity' = 'safe_metadata') -> 'WebStateHandler | Callable[[WebStateHandler], WebStateHandler]'
  invalidate(self, key: 'str') -> 'None'
WebBrowser
WebBrowser
Public definitions
class WebBrowser (dataclass frozen slots):
  back(self) -> 'WebWindowState'
  forward(self) -> 'WebWindowState'
  navigate(self, url: 'str') -> 'WebWindowState'
  reload(self) -> 'WebWindowState'
  state(self) -> 'WebWindowState'
  stop(self) -> 'WebWindowState'
WebDragFeedback
WebDragFeedback
Public definitions
class WebDragFeedback (dataclass frozen slots):
  __init__(allowed: 'bool', label: 'str' = '', marker: 'tuple[float, float] | None' = None, bounds: 'tuple[float, float, float, float] | None' = None) -> None
  allowed: bool
  label: str = ''
  marker: tuple[float, float] | None = None
  bounds: tuple[float, float, float, float] | None = None
WebDragPreview
WebDragPreview
Public definitions
class WebDragPreview (dataclass frozen slots):
  __init__(path: 'Path | str', size: 'tuple[float, float]' = (180.0, 180.0), opacity: 'float' = 0.65, offset: 'tuple[float, float]' = (18.0, -18.0)) -> None
  path: Path | str
  size: tuple[float, float] = (180.0, 180.0)
  opacity: float = 0.65
  offset: tuple[float, float] = (18.0, -18.0)
WebDragState
WebDragState
Public definitions
class WebDragState (dataclass frozen slots):
  __init__(drag_id: 'str', phase: "Literal['dragging', 'dropped', 'cancelled']", target: 'WebDragTarget | None' = None, reason: 'str' = '') -> None
  drag_id: str
  phase: Literal['dragging', 'dropped', 'cancelled']
  target: WebDragTarget | None = None
  reason: str = ''
WebDragTarget
WebDragTarget
Public definitions
class WebDragTarget (dataclass frozen slots):
  __init__(window_pointer: 'int', area_pointer: 'int', area_type: 'str', x: 'float', y: 'float', over_web: 'bool' = False, window_key: 'str | None' = None, web_x: 'float | None' = None, web_y: 'float | None' = None, region_pointer: 'int | None' = None) -> None
  window_pointer: int
  area_pointer: int
  area_type: str
  x: float
  y: float
  over_web: bool = False
  window_key: str | None = None
  web_x: float | None = None
  web_y: float | None = None
  region_pointer: int | None = None
WebDragValidator
WebDragValidator
Public definitions
WebDragValidator = collections.abc.Callable[[nexus_web.contracts.drag.WebDragTarget | None], nexus_web.contracts.drag.WebDragFeedback]
WebErrorInfo
WebErrorInfo
Public definitions
class WebErrorInfo (dataclass frozen slots):
  __init__(kind: 'WebErrorKind', message: 'str', hint: 'str | None' = None) -> None
  kind: WebErrorKind
  message: str
  hint: str | None = None
WebErrorKind
WebErrorKind
Public definitions
class WebErrorKind (StrEnum):
  INVALID_INPUT = 'invalid_input'
  PERMISSION_DENIED = 'permission_denied'
  NOT_FOUND = 'not_found'
  ALREADY_EXISTS = 'already_exists'
  RESOURCE_EXHAUSTED = 'resource_exhausted'
  RUNTIME_MISSING = 'runtime_missing'
  RUNTIME_INCOMPATIBLE = 'runtime_incompatible'
  HELPER_FAILED = 'helper_failed'
  RENDER_FAILED = 'render_failed'
  NAVIGATION_BLOCKED = 'navigation_blocked'
  INTERNAL_ERROR = 'internal_error'
WebEventPayload
WebEventPayload
Public definitions
WebEventPayload = str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue']
WebJSONScalar
WebJSONScalar
Public definitions
WebJSONScalar = str | int | float | bool | None
WebJSONValue
WebJSONValue
Public definitions
WebJSONValue = str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue']
WebOperationError
WebOperationError
Public definitions
class WebOperationError(NexusWebError):
  __init__(info: 'WebErrorInfo') -> 'None'
  hint: str | None
  info: WebErrorInfo
  kind: WebErrorKind
WebPlugin
WebPlugin
Public definitions
class WebPlugin:
  begin_drag(self, window_key: 'str', *, preview: 'WebDragPreview', mode: "Literal['release', 'click']" = 'release', hide_source: 'bool' = False, validate_target: 'WebDragValidator | None' = None) -> 'WebDragState'
  bridge(self) -> 'WebBridge'
  browser(self, window_key: 'str') -> 'WebBrowser'
  cancel_drag(self, drag_id: 'str') -> 'WebDragState | None'
  @property client_key(self) -> 'str'
  close_window(self, window_key: 'str', *, reason: 'str' = 'window_close') -> 'WebWindowCloseResult'
  close_windows(self, logical_window_key: 'str', *, reason: 'str' = 'window_close') -> 'WebWindowCloseResult'
  dispose(self) -> 'None'
  @property disposed(self) -> 'bool'
  drag_state(self, drag_id: 'str') -> 'WebDragState | None'
  is_window_hidden(self, window_key: 'str') -> 'bool'
  open_window(self, window_key: 'str', spec: 'WebWindowSpec', *, target: 'WebAreaTarget | None' = None, replace_existing: 'bool' = False) -> 'WebWindowOpenResult'
  @property plugin_id(self) -> 'str'
  @property root(self) -> 'Path | None'
  show_window(self, window_key: 'str') -> 'bool'
WebResourceFileKind
WebResourceFileKind
Public definitions
WebResourceFileKind = typing.Literal['binary', 'text']
WebResourceImageFormat
WebResourceImageFormat
Public definitions
WebResourceImageFormat = typing.Literal['bytes', 'rgba32f']
WebResourceImagePixels
WebResourceImagePixels
Public definitions
class WebResourceImagePixels (Protocol):
  foreach_get(self, target: 'MutableSequence[float]') -> 'None'
WebResourceImageSource
WebResourceImageSource
Public definitions
class WebResourceImageSource (Protocol):
  @property pixels(self) -> 'WebResourceImagePixels'
  @property size(self) -> 'Sequence[int]'
WebResourceMeshObjectSource
WebResourceMeshObjectSource
Public definitions
class WebResourceMeshObjectSource (Protocol):
  evaluated_get(self, depsgraph: 'object') -> 'object'
  @property matrix_world(self) -> 'object'
  to_mesh(self) -> 'object'
  to_mesh_clear(self) -> 'None'
WebResourceMeshSource
WebResourceMeshSource
Public definitions
class WebResourceMeshSource (Protocol):
  calc_loop_triangles(self) -> 'None'
  @property corner_normals(self) -> 'object'
  @property loop_triangles(self) -> 'object'
  @property loops(self) -> 'object'
  @property uv_layers(self) -> 'object'
  @property vertices(self) -> 'object'
WebResourceRef
WebResourceRef
Public definitions
WebResourceRef = dict[str, str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue']]
WebRuntimeStatus
WebRuntimeStatus
Public definitions
class WebRuntimeStatus (dataclass frozen slots):
  __init__(available: 'bool', status: 'str', reason: 'str', hint: 'str | None' = None, can_retry: 'bool' = False) -> None
  available: bool
  status: str
  reason: str
  hint: str | None = None
  can_retry: bool = False
WebStateContext
WebStateContext
Public definitions
class WebStateContext (dataclass frozen slots):
  __init__(origin: 'str', window_key: 'str | None' = None) -> None
  origin: str
  window_key: str | None = None
WebStateFieldSchema
WebStateFieldSchema
Public definitions
class WebStateFieldSchema:
  __init__(<signature-unavailable: ValueError>)
  enum: ForwardRef('NotRequired[tuple[WebJSONScalar, ...]]', module='nexus_web.public')
  nullable: ForwardRef('NotRequired[bool]', module='nexus_web.public')
  permissions: ForwardRef('NotRequired[tuple[str, ...]]', module='nexus_web.public')
  sensitivity: ForwardRef('NotRequired[WebStateSensitivity]', module='nexus_web.public')
  type: ForwardRef('NotRequired[WebStateFieldType]', module='nexus_web.public')
WebStateFieldType
WebStateFieldType
Public definitions
WebStateFieldType = typing.Literal['string', 'number', 'integer', 'boolean', 'object', 'array', 'null']
WebStateHandler
WebStateHandler
Public definitions
WebStateHandler = collections.abc.Callable[[nexus_web.public.WebStateQuery, nexus_web.public.WebStateContext], str | int | float | bool | None | list['WebJSONValue'] | dict[str, 'WebJSONValue']]
WebStateQuery
WebStateQuery
Public definitions
class WebStateQuery (dataclass frozen slots):
  __init__(fields: 'tuple[str, ...]', filter: 'Mapping[str, WebJSONValue]', sort: 'tuple[WebJSONValue, ...]', limit: 'int | None', raw: 'Mapping[str, WebJSONValue]') -> None
  fields: tuple[str, ...]
  filter: Mapping[str, WebJSONValue]
  sort: tuple[WebJSONValue, ...]
  limit: int | None
  raw: Mapping[str, WebJSONValue]
WebStateSensitivity
WebStateSensitivity
Public definitions
WebStateSensitivity = typing.Literal['safe_metadata', 'user_content']
WebStateShape
WebStateShape
Public definitions
WebStateShape = typing.Literal['item', 'list']
WebTakenResource
WebTakenResource
Public definitions
class WebTakenResource (dataclass frozen slots):
  __init__(resource_id: 'str', path: 'Path', mime: 'str', byte_length: 'int') -> None
  resource_id: str
  path: Path
  mime: str
  byte_length: int
WebWindowCloseInstance
WebWindowCloseInstance
Public definitions
class WebWindowCloseInstance (dataclass frozen slots):
  __init__(ok: 'bool', logical_window_key: 'str', window_key: 'str', closed: 'bool', error: 'WebErrorKind | None' = None, message: 'str' = '', hint: 'str | None' = None) -> None
  ok: bool
  logical_window_key: str
  window_key: str
  closed: bool
  error: WebErrorKind | None = None
  message: str = ''
  hint: str | None = None
WebWindowCloseResult
WebWindowCloseResult
Public definitions
class WebWindowCloseResult (dataclass frozen slots):
  __init__(ok: 'bool', window_key: 'str', closed: 'bool', error: 'WebErrorKind | None' = None, message: 'str' = '', hint: 'str | None' = None, logical_window_key: 'str | None' = None, instances: 'tuple[WebWindowCloseInstance, ...]' = ()) -> None
  ok: bool
  window_key: str
  closed: bool
  error: WebErrorKind | None = None
  message: str = ''
  hint: str | None = None
  logical_window_key: str | None = None
  instances: tuple[WebWindowCloseInstance, ...] = ()
WebWindowInstance
WebWindowInstance
Public definitions
class WebWindowInstance (dataclass frozen slots):
  __init__(ok: 'bool', logical_window_key: 'str', window_key: 'str', state: 'WebWindowState | None', target_index: 'int', target: 'WebAreaSummary | None', action: 'WebWindowInstanceAction | None' = None, error: 'WebErrorKind | None' = None, message: 'str' = '') -> None
  ok: bool
  logical_window_key: str
  window_key: str
  state: WebWindowState | None
  target_index: int
  target: WebAreaSummary | None
  action: WebWindowInstanceAction | None = None
  error: WebErrorKind | None = None
  message: str = ''
WebWindowInstanceAction
WebWindowInstanceAction
Public definitions
WebWindowInstanceAction = typing.Literal['opened', 'reused']
WebWindowOpenResult
WebWindowOpenResult
Public definitions
class WebWindowOpenResult (dataclass frozen slots):
  __init__(ok: 'bool', window_key: 'str', state: 'WebWindowState | None', error: 'WebErrorKind | None' = None, message: 'str' = '', hint: 'str | None' = None, logical_window_key: 'str | None' = None, instances: 'tuple[WebWindowInstance, ...]' = ()) -> None
  ok: bool
  window_key: str
  state: WebWindowState | None
  error: WebErrorKind | None = None
  message: str = ''
  hint: str | None = None
  logical_window_key: str | None = None
  instances: tuple[WebWindowInstance, ...] = ()
WebWindowState
WebWindowState
Public definitions
class WebWindowState (dataclass frozen slots):
  __init__(status: 'str', url: 'str | None', title: 'str | None', loading: 'bool', can_go_back: 'bool', can_go_forward: 'bool', error: 'WebErrorKind | None', message: 'str', hint: 'str | None' = None) -> None
  status: str
  url: str | None
  title: str | None
  loading: bool
  can_go_back: bool
  can_go_forward: bool
  error: WebErrorKind | None
  message: str
  hint: str | None = None
bind
bind
Public definitions
def bind(plugin_id: 'str', *, root: 'Path | str | None' = None, client_key: 'str | None' = None) -> 'WebPlugin'
probe_web_runtime_availability
probe_web_runtime_availability
Public definitions
def probe_web_runtime_availability() -> 'WebRuntimeStatus'
register_provider
register_provider
Public definitions
def register_provider() -> 'None'
require_web_runtime_available
require_web_runtime_available
Public definitions
def require_web_runtime_available() -> 'None'
unregister_provider
unregister_provider
Public definitions
def unregister_provider() -> 'None'
web
web
Public definitions
web = <module 'nexus_web.web'>
area_target
area_target
Public definitions
def area_target(scope: 'WebAreaScope' = 'current', *, area_type: 'str | None' = None, space_type: 'str | None' = None, tree_type: 'str | None' = None, existing: 'WebExistingPolicy' = 'error') -> 'WebAreaTarget'
browser_state
browser_state
Public definitions
def browser_state(kind: 'WebBrowserStateKind' = 'plugin', name: 'str | None' = None) -> 'WebBrowserStateSpec'
dev_server
dev_server
Public definitions
def dev_server(url: 'str') -> 'WebDevServerApp'
external_files
external_files
Public definitions
def external_files(*, accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml'), gestures: 'tuple[WebExternalFileGesture, ...]' = ('drop', 'paste'), max_files: 'int' = 16, max_file_bytes: 'int' = 10485760, max_batch_bytes: 'int' = 67108864) -> 'WebExternalFilesSpec'
local_app
local_app
Public definitions
def local_app(path: 'str', *, root: 'Path | str | None' = None, auto_reload: 'bool' = False) -> 'WebLocalApp'
remote_page
remote_page
Public definitions
def remote_page(url: 'str') -> 'WebRemotePageApp'
resource_exports
resource_exports
Public definitions
def resource_exports(*, accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'application/json', 'text/plain', 'application/octet-stream'), max_file_bytes: 'int' = 67108864, max_batch_bytes: 'int' = 201326592, overwrite: 'WebResourceOverwritePolicy' = 'confirm') -> 'WebResourceExportsSpec'
resource_imports
resource_imports
Public definitions
def resource_imports(*, accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml'), sources: 'tuple[WebResourceImportSource, ...]' = ('drop', 'paste_files'), max_files: 'int' = 16, max_file_bytes: 'int' = 10485760, max_batch_bytes: 'int' = 67108864, directory_recursive: 'bool' = False, max_directory_files: 'int' = 256) -> 'WebResourceImportsSpec'
resource_io
resource_io
Public definitions
def resource_io(*, imports: 'WebResourceImportsSpec | None' = None, exports: 'WebResourceExportsSpec | None' = None) -> 'WebResourceIOSpec'
window
window
Public definitions
def window(app: 'WebWindowApp', *, size: 'WebWindowSize', title: 'str | None' = None, placement: 'WebWindowPlacement | None' = None, browser_state: 'WebBrowserStateSpec | None' = None, transparent: 'bool | None' = None, external_files: 'WebExternalFilesSpec | None' = None, resource_io: 'WebResourceIOSpec | None' = None, debug_label: 'str | None' = None) -> 'WebWindowSpec'
window_placement
window_placement
Public definitions
def window_placement(placement: 'str', *, margin: 'int | float | tuple[int | float, int | float]' = 0, offset: 'tuple[int | float, int | float]' = (0, 0), padding: 'int | float' = 8, overflow: 'WebWindowOverflowMode' = 'shift', stick: 'bool' = False) -> 'WebWindowPlacement'
window_position
window_position
Public definitions
def window_position(x: 'int | float', y: 'int | float', *, padding: 'int | float' = 8, overflow: 'WebWindowOverflowMode' = 'shift', stick: 'bool' = False) -> 'WebWindowPlacement'
window_size
window_size
Public definitions
def window_size(initial: 'tuple[int, int]', *, minimum: 'tuple[int, int] | None' = None, maximum: 'tuple[int, int] | None' = None, resizable: 'bool' = False, auto_fit: 'bool' = False) -> 'WebWindowSize'
WebUINotice
WebUINotice
Public definitions
class WebUINotice (dataclass frozen slots):
  __init__(code: 'str', severity: 'WebUINoticeSeverity', message: 'str', title: 'str' = '', retryable: 'bool' = False) -> None
  code: str
  severity: WebUINoticeSeverity
  message: str
  title: str = ''
  retryable: bool = False
WebUINoticeSeverity
WebUINoticeSeverity
Public definitions
WebUINoticeSeverity = typing.Literal['info', 'warning', 'error']
draw_ui_message
draw_ui_message
Public definitions
def draw_ui_message(layout: 'object', message: 'str', *, code: 'str' = 'ui_message', severity: 'WebUINoticeSeverity' = 'info', title: 'str' = '', width: 'int' = 72, max_lines: 'int | None' = None, boxed: 'bool' = True) -> 'bool'
draw_ui_notice
draw_ui_notice
Public definitions
def draw_ui_notice(layout: 'object', notice: 'WebUINotice', *, width: 'int' = 72, max_lines: 'int | None' = None, boxed: 'bool' = True) -> 'bool'
draw_web_runtime_notice
draw_web_runtime_notice
Public definitions
def draw_web_runtime_notice(layout: 'object', status: 'WebRuntimeStatus | None' = None, *, width: 'int' = 72, max_lines: 'int | None' = None, boxed: 'bool' = True) -> 'bool'
ui_notice
ui_notice
Public definitions
def ui_notice(message: 'str', *, code: 'str' = 'ui_notice', severity: 'WebUINoticeSeverity' = 'info', title: 'str' = '', retryable: 'bool' = False) -> 'WebUINotice'
web_runtime_notice
web_runtime_notice
Public definitions
def web_runtime_notice(status: 'WebRuntimeStatus | None' = None) -> 'WebUINotice | None'
wrap_ui_text
wrap_ui_text
Public definitions
def wrap_ui_text(text: 'str', *, width: 'int' = 72, max_lines: 'int | None' = None, placeholder: 'str' = '...') -> 'tuple[str, ...]'
WebDevServerApp
WebDevServerApp
Public definitions
class WebDevServerApp (dataclass frozen slots):
  __init__(url: 'str') -> None
  url: str
WebLocalApp
WebLocalApp
Public definitions
class WebLocalApp (dataclass frozen slots):
  __init__(path: 'str', root: 'Path | str | None' = None, auto_reload: 'bool' = False) -> None
  path: str
  root: Path | str | None = None
  auto_reload: bool = False
WebRemotePageApp
WebRemotePageApp
Public definitions
class WebRemotePageApp (dataclass frozen slots):
  __init__(url: 'str') -> None
  url: str
WebWindowApp
WebWindowApp
Public definitions
WebWindowApp = nexus_web.contracts.source.WebLocalApp | nexus_web.contracts.source.WebDevServerApp | nexus_web.contracts.source.WebRemotePageApp
WebAreaScope
WebAreaScope
Public definitions
WebAreaScope = typing.Literal['current', 'same_type']
WebAreaTarget
WebAreaTarget
Public definitions
class WebAreaTarget (dataclass frozen slots):
  __init__(scope: 'WebAreaScope' = 'current', area_type: 'str | None' = None, space_type: 'str | None' = None, tree_type: 'str | None' = None, existing: 'WebExistingPolicy' = 'error') -> None
  scope: WebAreaScope = 'current'
  area_type: str | None = None
  space_type: str | None = None
  tree_type: str | None = None
  existing: WebExistingPolicy = 'error'
WebBrowserStateKind
WebBrowserStateKind
Public definitions
WebBrowserStateKind = typing.Literal['plugin', 'client', 'window', 'ephemeral', 'named']
WebBrowserStateSpec
WebBrowserStateSpec
Public definitions
class WebBrowserStateSpec (dataclass frozen slots):
  __init__(kind: 'WebBrowserStateKind' = 'plugin', name: 'str | None' = None) -> None
  kind: WebBrowserStateKind = 'plugin'
  name: str | None = None
WebExistingPolicy
WebExistingPolicy
Public definitions
WebExistingPolicy = typing.Literal['error', 'reuse']
WebExternalFileGesture
WebExternalFileGesture
Public definitions
WebExternalFileGesture = typing.Literal['drop', 'paste']
WebExternalFilesSpec
WebExternalFilesSpec
Public definitions
class WebExternalFilesSpec (dataclass frozen slots):
  __init__(accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml'), gestures: 'tuple[WebExternalFileGesture, ...]' = ('drop', 'paste'), max_files: 'int' = 16, max_file_bytes: 'int' = 10485760, max_batch_bytes: 'int' = 67108864) -> None
  accept: tuple[str, ...] = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml')
  gestures: tuple[WebExternalFileGesture, ...] = ('drop', 'paste')
  max_files: int = 16
  max_file_bytes: int = 10485760
  max_batch_bytes: int = 67108864
WebResourceExportsSpec
WebResourceExportsSpec
Public definitions
class WebResourceExportsSpec (dataclass frozen slots):
  __init__(accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'application/json', 'text/plain', 'application/octet-stream'), max_file_bytes: 'int' = 67108864, max_batch_bytes: 'int' = 201326592, overwrite: 'WebResourceOverwritePolicy' = 'confirm') -> None
  accept: tuple[str, ...] = ('image/png', 'image/jpeg', 'application/json', 'text/plain', 'application/octet-stream')
  max_file_bytes: int = 67108864
  max_batch_bytes: int = 201326592
  overwrite: WebResourceOverwritePolicy = 'confirm'
WebResourceIOSpec
WebResourceIOSpec
Public definitions
class WebResourceIOSpec (dataclass frozen slots):
  __init__(imports: 'WebResourceImportsSpec | None' = None, exports: 'WebResourceExportsSpec | None' = None) -> None
  imports: WebResourceImportsSpec | None = None
  exports: WebResourceExportsSpec | None = None
WebResourceImportSource
WebResourceImportSource
Public definitions
WebResourceImportSource = typing.Literal['drop', 'paste_files', 'paste_image', 'pick_files', 'import_directory']
WebResourceImportsSpec
WebResourceImportsSpec
Public definitions
class WebResourceImportsSpec (dataclass frozen slots):
  __init__(accept: 'tuple[str, ...]' = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml'), sources: 'tuple[WebResourceImportSource, ...]' = ('drop', 'paste_files'), max_files: 'int' = 16, max_file_bytes: 'int' = 10485760, max_batch_bytes: 'int' = 67108864, directory_recursive: 'bool' = False, max_directory_files: 'int' = 256) -> None
  accept: tuple[str, ...] = ('image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml')
  sources: tuple[WebResourceImportSource, ...] = ('drop', 'paste_files')
  max_files: int = 16
  max_file_bytes: int = 10485760
  max_batch_bytes: int = 67108864
  directory_recursive: bool = False
  max_directory_files: int = 256
WebResourceOverwritePolicy
WebResourceOverwritePolicy
Public definitions
WebResourceOverwritePolicy = typing.Literal['confirm', 'overwrite', 'rename', 'error']
WebWindowOverflowMode
WebWindowOverflowMode
Public definitions
WebWindowOverflowMode = typing.Literal['none', 'shift']
WebWindowPlacement
WebWindowPlacement
Public definitions
class WebWindowPlacement (dataclass frozen slots):
  __init__(mode: 'WebWindowPlacementMode', placement: 'WebWindowPlacementName | None' = None, position: 'tuple[float, float] | None' = None, container: 'WebWindowPlacementContainer' = 'area', margin: 'tuple[float, float]' = (0.0, 0.0), offset: 'tuple[float, float]' = (0.0, 0.0), padding: 'float' = 8.0, overflow: 'WebWindowOverflowMode' = 'shift', stick: 'bool' = False) -> None
  mode: WebWindowPlacementMode
  placement: WebWindowPlacementName | None = None
  position: tuple[float, float] | None = None
  container: WebWindowPlacementContainer = 'area'
  margin: tuple[float, float] = (0.0, 0.0)
  offset: tuple[float, float] = (0.0, 0.0)
  padding: float = 8.0
  overflow: WebWindowOverflowMode = 'shift'
  stick: bool = False
WebWindowPlacementContainer
WebWindowPlacementContainer
Public definitions
WebWindowPlacementContainer = typing.Literal['area']
WebWindowPlacementMode
WebWindowPlacementMode
Public definitions
WebWindowPlacementMode = typing.Literal['placement', 'position']
WebWindowPlacementName
WebWindowPlacementName
Public definitions
WebWindowPlacementName = typing.Literal['top_left', 'top', 'top_right', 'left', 'center', 'right', 'bottom_left', 'bottom', 'bottom_right']
WebWindowSize
WebWindowSize
Public definitions
class WebWindowSize (dataclass frozen slots):
  __init__(initial: 'tuple[int, int]', minimum: 'tuple[int, int] | None' = None, maximum: 'tuple[int, int] | None' = None, resizable: 'bool' = False, auto_fit: 'bool' = False) -> None
  initial: tuple[int, int]
  minimum: tuple[int, int] | None = None
  maximum: tuple[int, int] | None = None
  resizable: bool = False
  auto_fit: bool = False
WebWindowSpec
WebWindowSpec
Public definitions
class WebWindowSpec (dataclass frozen slots):
  __init__(app: 'WebWindowApp', size: 'WebWindowSize', title: 'str | None' = None, placement: 'WebWindowPlacement | None' = None, browser_state: 'WebBrowserStateSpec | None' = None, transparent: 'bool | None' = None, external_files: 'WebExternalFilesSpec | None' = None, resource_io: 'WebResourceIOSpec | None' = None, debug_label: 'str | None' = None) -> None
  app: WebWindowApp
  size: WebWindowSize
  title: str | None = None
  placement: WebWindowPlacement | None = None
  browser_state: WebBrowserStateSpec | None = None
  transparent: bool | None = None
  external_files: WebExternalFilesSpec | None = None
  resource_io: WebResourceIOSpec | None = None
  debug_label: str | None = None

Callbacks, results, and lifecycle

Action callbacks receive payload/context; state callbacks receive query/context. JSON results must not contain Blender objects or file handles. Inspect per-instance window results. The framework returns public protocol objects. WebPlugin.dispose and bridge cleanup must respect ownership. See Lifecycle tutorial. Frozen page-navigation boundaries also apply to listed WebBrowser and remote_page definitions. Listing a name does not enable new usage.

Back to API reference · All topics