vibeview.renderer_plugins¶
Third-party section renderers for vibe-view (extension API v1).
A renderer package registers one object in the vibeview.renderers entry
point group, named after the section kind it renders. The object is a
RendererSpec or a zero-argument factory returning one. The kind then
classifies as rendered everywhere vibe-view reports a section: the browser
lists it with the plugin’s title and icon and shows the plugin’s HTML in the
details panel, vibe-view info and the startup banner count it as rendered,
a critical section of that kind no longer blocks the open, and the
terminal shows its generic section pane.
Like vibeview.importers, this module is the whole contract and imports
nothing heavy: discovery reads entry-point metadata and loads the plugin
objects, never the viewer stack.
Contract, version 1 (RENDERER_API_VERSION); vibe-view 3.x keeps it
compatible:
RendererSpecfields as declared here. New fields are added only with defaults.The renderer class is constructed as
renderer(section, reader)with theSectionand theQVFReaderthat owns it.load()returns the section’s data, andrender_to_html(), called with no arguments, returns the HTML document the details panel shows. Subclassingvibeview.renderers.BaseRendereris optional.A renderer reads its section through
section.id,section.kind,section.members,section.model_extraand the reader’s verified member methodsread_json_member,read_text_memberandread_binary_member.
Everything else in vibe-view, vibeview.app included, stays internal.
Representations and 3D actors are not part of version 1.
Module Attributes
The sidebar icon a spec gets when it names none. |
|
|
Functions
Return successfully loaded renderer specs in deterministic order. |
|
Clear discovery state after installing a plugin in this process. |
|
Load installed renderer plugins, isolating failures per plugin. |
|
|
Return the installed renderer for |
The section kinds installed plugins render. |
|
One row per discovered entry point, for |
Classes
|
Versioned contract implemented by a third-party section renderer. |
|
One discovered entry point, including isolated load failures. |
Exceptions
A renderer plugin could not be loaded or does not meet the contract. |
- vibeview.renderer_plugins.DEFAULT_PLUGIN_ICON = 'mdi-puzzle-outline'¶
The sidebar icon a spec gets when it names none.
- vibeview.renderer_plugins.PLUGIN_DETAIL = 'via plugin'¶
classify_section’s detail for a kind an installed plugin renders.
- exception vibeview.renderer_plugins.RendererPluginError[source]¶
Bases:
ValueErrorA renderer plugin could not be loaded or does not meet the contract.
- class vibeview.renderer_plugins.RendererSpec(kind, title, renderer, icon='mdi-puzzle-outline', description='', api_version=1)[source]¶
Bases:
objectVersioned contract implemented by a third-party section renderer.
kindis the QVF section kind rendered, and must equal the entry point’s name. A vendor kind (x_<vendor>.<name>) is the usual choice; a kind vibe-view renders itself cannot be claimed.titleis the sidebar and panel title andicona Material Design Icons name (mdi-...).rendereris the class described in the module docstring.
- class vibeview.renderer_plugins.RendererStatus(entry_point, distribution, spec, error=None)[source]¶
Bases:
objectOne discovered entry point, including isolated load failures.
- Parameters:
entry_point (str)
distribution (str | None)
spec (RendererSpec | None)
error (str | None)
- spec: RendererSpec | None¶
- vibeview.renderer_plugins.discover_renderers()[source]¶
Load installed renderer plugins, isolating failures per plugin.
- Return type:
tuple[RendererStatus, …]
- vibeview.renderer_plugins.clear_renderer_cache()[source]¶
Clear discovery state after installing a plugin in this process.
- Return type:
None
- vibeview.renderer_plugins.available_renderers()[source]¶
Return successfully loaded renderer specs in deterministic order.
- Return type:
tuple[RendererSpec, …]
- vibeview.renderer_plugins.get_renderer_plugin(kind)[source]¶
Return the installed renderer for
kind, orNone.- Parameters:
kind (str)
- Return type:
RendererSpec | None