Editor¶
BaseEditor
¶
BaseEditor(options: EditorOptions)
Bases: ABC
Abstract base class for all metapipeline editor backends.
Subclasses register themselves by defining an EDITOR_NAME class
attribute. Registration happens automatically at class-definition time
via __init_subclass__, so a new editor becomes available as soon as
its module is imported, with no changes to the dispatch logic needed.
Example::
class MyEditor(BaseEditor):
EDITOR_NAME = "my-editor"
def start(self): ...
Subclasses should not override __init__. All EditorOptions fields
are available via self.options.
Source code in src/nf_meta/editor/base_editor.py
EditorOptions
dataclass
¶
Runtime options that control how a metapipeline editor is launched.
Attributes:
| Name | Type | Description |
|---|---|---|
editor_name |
str
|
Name of the editor backend to use. Must match a key
registered in |
host |
str
|
Hostname or IP address the editor server binds to. Only used by server-based editors such as the browser editor. |
port |
Optional[int]
|
Port the editor server listens on. When |
Built-in: browser editor¶
BrowserEditor
¶
BrowserEditor(options: EditorOptions)
Bases: BaseEditor
The default editor (EDITOR_NAME = "browser"). Serves the bundled Vue
single-page app via a local FastAPI backend and opens it in a browser tab
once the server is reachable.
With NF_META_DEVMODE=1 set, proxies to a separately-running frontend
dev server (npm run dev under editor/frontend) instead of the bundled
build -- see docs/getting-started/installation.md.