All docs
Docs/ API Reference/ lsdtools reference
API Reference

lsdtools reference

Generated public SDK reference for lsdtools.

SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.

Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.

Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.

text
lsdtools — the **public, stable SDK** for building LSD packages.

Install it into your project's local Python and import everything from here::

    pip install lsdtools
    ...
    from lsdtools import Tool, Engine, Table

The name is deliberately distinct from ``lsd``: if a module imports ``lsdtools``
it is using the **public** API; if it imports anything under ``lsd.*``
(``lsd.core``, ``lsd.flow``, ``lsd.runtime`` …) it is reaching into LSD
**internals**, which are private and may change without notice. So a quick scan
of a package's imports tells you, at a glance, whether it stays on the supported
surface.

This is a small, curated façade: a handful of authoring names (``Tool``,
``Context``, ``StepContext``, the ``View`` interaction model), the data facade
(``Table``, ``Source``), lazy model-query helpers (``models``), deterministic
geostatistical estimation (``geostats``), authenticated neural execution
(``neural``), headless integer-agent decisions (``integeragent``), the
interop/standalone objects (``Entity``, ``Engine``, ``RunResult``), typed
failures, plus the AI bridge (``generate_step``). The *extension seams* — the component registries the charter puts
on every view kind (``register_chart_kind`` / ``register_cell_renderer`` /
``register_param_control`` / ``register_layer_kind``), the symbology seams
(``register_style_asset`` / ``register_default_style``), the data-format registry
(``register_table_reader``), and the raw step/param/event substrate the ``@tool.*`` API
sits on — live in :mod:`lsdtools.extend`, a **declared, charter-enforced** surface you
reach for when the declarative API can't express something.

Authoring vs. running
---------------------
You author against ``lsdtools`` in any local Python (for editor/AI context and,
if you like, local runs). Runtime selection is deliberately not an SDK capability: the native Hub
resolves a project's exact version pin into its authenticated per-user runtime store. Package tests
install an exact package snapshot into an isolated ``LSD_HOME`` and launch the project through the
supported product/testkit entry point; they never search Program Files or execute a guessed runtime.

Quick start
-----------
    from lsdtools import Tool, Engine, Table

    tool = Tool("hello")

    @tool.load
    def numbers(count: int = 3) -> Table:
        return Table({"x": range(count)})

    @tool.shape
    def double(t: Table) -> Table:
        return t.with_column("x", t["x"] * 2)

    if __name__ == "__main__":
        Engine().run(double(t=numbers(count=3))).print()   # [{'x': 0}, {'x': 2}, {'x': 4}]

lsdtools.API_VERSION#

Kind: value. Source: sdk/src/lsdtools/__init__.py:183.

Python
API_VERSION = '1.0'

lsdtools.ActionInputField#

Kind: class. Source: core/lsd/src/lsd/core/view.py:152.

Source docstring:

text
One toolkit-neutral field in a complete View-action input document.

``json`` is the escape hatch for exact arrays and objects whose deeper domain validation
belongs to the action handler. Hidden fields hold immutable versions or review fences and
therefore must also be read-only.

Implementation alias: lsd.core.view.ActionInputField.

lsdtools.ActionInputField.name#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:160.

Python
name: str

lsdtools.ActionInputField.label#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:161.

Python
label: str

lsdtools.ActionInputField.kind#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:162.

Python
kind: str

lsdtools.ActionInputField.description#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:163.

Python
description: str
Python
description = ''

lsdtools.ActionInputField.visibility#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:164.

Python
visibility: str
Python
visibility = 'visible'

lsdtools.ActionInputField.read_only#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:165.

Python
read_only: bool
Python
read_only = False

lsdtools.ActionInputField.choices#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:166.

Python
choices: tuple[Any, ...]
Python
choices = ()

lsdtools.ActionInputField.minimum#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:167.

Python
minimum: float | int | None
Python
minimum = None

lsdtools.ActionInputField.maximum#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:168.

Python
maximum: float | int | None
Python
maximum = None

lsdtools.ActionInputField.step#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:169.

Python
step: float | int | None
Python
step = None

lsdtools.ActionInputField.validate#

Kind: method. Source: core/lsd/src/lsd/core/view.py:240.

Python
validate(self, value: Any) -> Any
Python
self: (unannotated)
value: Any

Source docstring:

text
Return one immutable, detached value after exact kind/range validation.

lsdtools.ActionInputField.to_wire#

Kind: method. Source: core/lsd/src/lsd/core/view.py:273.

Python
to_wire(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return the exact toolkit-neutral 1.0 field declaration.

lsdtools.ActionInputSchema#

Kind: class. Source: core/lsd/src/lsd/core/view.py:291.

Source docstring:

text
A closed 1.0 form whose submission is one complete immutable JSON object.

Implementation alias: lsd.core.view.ActionInputSchema.

lsdtools.ActionInputSchema.fields#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:294.

Python
fields: tuple[ActionInputField, ...]

lsdtools.ActionInputSchema.submit_label#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:295.

Python
submit_label: str
Python
submit_label = 'Apply'

lsdtools.ActionInputSchema.version#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:296.

Python
version: str
Python
version = '1.0'

lsdtools.ActionInputSchema.validate#

Kind: method. Source: core/lsd/src/lsd/core/view.py:320.

Python
validate(self, value: Any) -> FrozenDict
Python
self: (unannotated)
value: Any

Source docstring:

text
Validate an exact complete submission and detach it into immutable JSON.

lsdtools.ActionInputSchema.to_wire#

Kind: method. Source: core/lsd/src/lsd/core/view.py:351.

Python
to_wire(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return the exact toolkit-neutral 1.0 schema.

lsdtools.ChartPayload#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:483.

Python
ChartPayload(self, *, kind: str='', title: str='', tables: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None

Source docstring:

text
A chart delivered to a chart viewer (``viewer/chart/set``).

Spec-only by default: ``ChartPayload(kind="bar", title="Grades", series=[...])`` folds everything
into ``spec`` and carries no tables (pass ``tables=`` if a chart is table-backed).

Implementation alias: lsd.flow.payload.ChartPayload.

Declared bases: ViewerPayload.

lsdtools.ChartPayload.topic#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:490.

Python
topic = 'viewer/chart/set'

lsdtools.ChartPayload.__init__#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:492.

Python
__init__(self, *, kind: str='', title: str='', tables: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None
Python
extra: Any
kind: str
self: (unannotated)
spec: Optional[Dict[str, Any]]
tables: Optional[Dict[str, Any]]
title: str

lsdtools.Chunk#

Kind: class. Source: core/lsd/src/lsd/trip/view.py:101.

Python
Chunk(self, view: 'TripView', index: int, offset: int, stop: int) -> None

Source docstring:

text
One row range of a view: ``c["x"]`` reads, ``c.out["x"]`` writes, ``c.reduce`` folds.

Implementation alias: lsd.trip.view.Chunk.

lsdtools.Chunk.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:106.

Python
__init__(self, view: 'TripView', index: int, offset: int, stop: int) -> None
Python
index: int
offset: int
self: (unannotated)
stop: int
view: 'TripView'

lsdtools.Chunk.count#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:115.

Python
count(self) -> int
Python
self: (unannotated)

lsdtools.Chunk.eid#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:119.

Python
eid(self) -> 'np.ndarray'
Python
self: (unannotated)

lsdtools.Chunk.__getitem__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:122.

Python
__getitem__(self, name: str) -> Any
Python
name: str
self: (unannotated)

lsdtools.Chunk.reduce#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:131.

Python
reduce(self, key: str, value: Any) -> None
Python
key: str
self: (unannotated)
value: Any

Source docstring:

text
Record a per-chunk partial; the scheduler folds partials in chunk order.

lsdtools.Chunk.index#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:109.

Python
index: int
Python
index = index

lsdtools.Chunk.offset#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:110.

Python
offset: int
Python
offset = offset

lsdtools.Chunk.stop#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:111.

Python
stop: int
Python
stop = stop

lsdtools.Chunk.out#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:112.

Python
out: (unannotated)
Python
out = _ChunkOut(view, view._resolved_writes(), offset, stop)

lsdtools.Component#

Kind: class. Source: core/lsd/src/lsd/trip/model.py:161.

Source docstring:

text
One typed column of a Trip.

``dtype`` is the storage type and is fixed for the component's life; ``kind`` is the profile
kind it snapshots under (defaults from the dtype); ``shape`` is ``()`` for a scalar or
``(k,)`` for a fixed-width vector (``fixed_size_list<dtype>[k]`` in Arrow, an ``(n, k)`` numpy
view); ``mirror_of`` names the components this one is a derived, differently-typed image of
(a float32 render mirror of float64 coordinates) so its staleness is checkable;
``field_id`` is the project field identity minted once at the first materialization and
carried through every snapshot.

Implementation alias: lsd.trip.model.Component.

lsdtools.Component.name#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:173.

Python
name: str

lsdtools.Component.dtype#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:174.

Python
dtype: str

lsdtools.Component.kind#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:175.

Python
kind: str
Python
kind = ''

lsdtools.Component.shape#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:176.

Python
shape: Tuple[int, ...]
Python
shape = ()

lsdtools.Component.frozen#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:177.

Python
frozen: bool
Python
frozen = False

lsdtools.Component.mirror_of#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:178.

Python
mirror_of: Tuple[str, ...]
Python
mirror_of = ()

lsdtools.Component.unit#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:179.

Python
unit: Optional[str]
Python
unit = None

lsdtools.Component.field_id#

Kind: attribute. Source: core/lsd/src/lsd/trip/model.py:180.

Python
field_id: Optional[str]
Python
field_id = None

lsdtools.Component.numeric#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:215.

Python
numeric(self) -> bool
Python
self: (unannotated)

lsdtools.Component.width#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:219.

Python
width(self) -> int
Python
self: (unannotated)

Source docstring:

text
Values per row: 1 for a scalar, ``k`` for a ``(k,)`` vector.

lsdtools.Component.with_field_id#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:223.

Python
with_field_id(self, field_id: str) -> 'Component'
Python
field_id: str
self: (unannotated)

lsdtools.Component.element_field_id#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:227.

Python
element_field_id(self, index: int) -> str
Python
index: int
self: (unannotated)

Source docstring:

text
The field identity of element *index* of a vector component.

A vector snapshots as ``k`` scalar columns (the profile layer measures scalars); their
identities derive from the component's own id, not from whichever step happened to
snapshot it, so they are stable for the component's whole life.

lsdtools.Component.element_name#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:241.

Python
element_name(self, index: int) -> str
Python
index: int
self: (unannotated)

Source docstring:

text
The snapshot column name of element *index* (``name.0``, ``name.1``, ...).

lsdtools.Component.to_dict#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:245.

Python
to_dict(self) -> Dict[str, Any]
Python
self: (unannotated)

lsdtools.Component.from_dict#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:253.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'Component'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.Configurable#

Kind: class. Source: core/lsd/src/lsd/core/configurable.py:337.

Python
Configurable(self, *, id: Optional[str]=None, metadata: Optional[Dict[str, Any]]=None, event_bus: Optional['EventBus']=None, **kwargs: Any) -> None

Source docstring:

text
Base class for all configurable objects: Steps, Entities, Engine.

Subclasses declare parameters with ``param()``; serialization, validation,
introspection, and event emission are inherited automatically.

Implementation alias: lsd.core.configurable.Configurable.

lsdtools.Configurable.type_id#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:346.

Python
type_id: ClassVar[str]
Python
type_id = ''

lsdtools.Configurable.serialized_fields#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:347.

Python
serialized_fields: ClassVar[frozenset[str]]
Python
serialized_fields = frozenset()

lsdtools.Configurable.param_group_order#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:350.

Python
param_group_order: ClassVar[List[str]]
Python
param_group_order = []

lsdtools.Configurable.serialized_type_id#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:353.

Python
serialized_type_id(self) -> str
Python
self: (unannotated)

Source docstring:

text
Stable type identity written to and restored from project data.

A live variant instance keeps the identity of the configurable it
replaces.  Consumers that bind declarations to project nodes must use
this public coordinate rather than the concrete provider class or the
private deserialization marker.

lsdtools.Configurable.serialized_field_names#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:368.

Python
serialized_field_names(cls) -> frozenset[str]
Python
cls: (unannotated)

Source docstring:

text
Exact persisted fields understood by this class in the current schema.

lsdtools.Configurable.register_variant#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:425.

Python
register_variant(cls, identity: str, provider: str, klass: type, mode: str='replace') -> None
Python
cls: (unannotated)
identity: str
klass: type
mode: str
provider: str

Source docstring:

text
Register *klass* (from *provider*) as a variant of node *identity* (see the note above).

lsdtools.Configurable.resolve_class#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:459.

Python
resolve_class(cls, type_name: Optional[str], *, variant_state: 'Optional[Dict[str, dict]]'=None) -> Optional[type]
Python
cls: (unannotated)
type_name: Optional[str]
variant_state: 'Optional[Dict[str, dict]]'

Source docstring:

text
Resolve an exact type under an explicit or scoped project selection.

lsdtools.Configurable.variant_providers#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:496.

Python
variant_providers(cls, identity: str) -> 'List[str]'
Python
cls: (unannotated)
identity: str

Source docstring:

text
Provider keys that offer a variant of *identity* (empty if none).

lsdtools.Configurable.validate_variant_state#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:501.

Python
validate_variant_state(cls, state: 'Optional[Dict[str, dict]]') -> 'Dict[str, dict]'
Python
cls: (unannotated)
state: 'Optional[Dict[str, dict]]'

Source docstring:

text
Validate and normalize one project's exact variant selection.

lsdtools.Configurable.variant_scope#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:549.

Python
variant_scope(cls, state: 'Optional[Dict[str, dict]]') -> Generator[None, None, None]
Python
cls: (unannotated)
state: 'Optional[Dict[str, dict]]'

Source docstring:

text
Apply one validated project selection only within the current task/thread.

lsdtools.Configurable.unregister#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:559.

Python
unregister(cls, name: str) -> bool
Python
cls: (unannotated)
name: str

Source docstring:

text
Remove an exact type id from the registry. Returns True if it was present.

Used on package reload/disable so step/entity classes deleted from a
package's source disappear from ``available_steps()`` instead of lingering.
Any variant implemented by the removed class is purged as well.

lsdtools.Configurable.__init__#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:580.

Python
__init__(self, *, id: Optional[str]=None, metadata: Optional[Dict[str, Any]]=None, event_bus: Optional['EventBus']=None, **kwargs: Any) -> None
Python
event_bus: Optional['EventBus']
id: Optional[str]
kwargs: Any
metadata: Optional[Dict[str, Any]]
self: (unannotated)

lsdtools.Configurable.set_parameter#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:692.

Python
set_parameter(self, name: str, value: Any, *, coerce: bool=False) -> List[ValidationError]
Python
coerce: bool
name: str
self: (unannotated)
value: Any

Source docstring:

text
Set a parameter by name. Returns error list (empty = success). Never raises.

lsdtools.Configurable.set_parameters#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:716.

Python
set_parameters(self, values: Dict[str, Any], *, coerce: bool=False) -> List[ValidationError]
Python
coerce: bool
self: (unannotated)
values: Dict[str, Any]

Source docstring:

text
Validate and apply several parameters atomically.

Every name, coercion, and value is checked before the first mutation.
On success values are committed in mapping order and ordinary callers
receive one batch-change event; on validation failure the instance is
unchanged and no event is emitted.  When invoked inside an existing
:meth:`batch_update`, changes join that outer batch.

lsdtools.Configurable.get_parameter#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:776.

Python
get_parameter(self, name: str) -> Any
Python
name: str
self: (unannotated)

lsdtools.Configurable.set_output#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:782.

Python
set_output(self, name: str, value: Any) -> None
Python
name: str
self: (unannotated)
value: Any

Source docstring:

text
Store a computed output value from within run() without firing change events.

Safe to call from background threads. Use for output=True params only.

lsdtools.Configurable.get_outputs#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:797.

Python
get_outputs(self) -> Dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return {name: value} for all output=True params.

Called by the runner after step execution to include in STEP_FINISHED event data.
Any subscriber (UI, CLI, logging) can read computed results from that event.

lsdtools.Configurable.get_parameters#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:811.

Python
get_parameters(self) -> List[ParameterInfo]
Python
self: (unannotated)

Source docstring:

text
Snapshot of all parameters for inspector / CLI generation.

lsdtools.Configurable.parameter_groups#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:836.

Python
parameter_groups(self) -> OrderedDict
Python
self: (unannotated)

Source docstring:

text
Parameters grouped by their ``group`` value.

Returns an ``OrderedDict[group_name, list[ParameterInfo]]``.
Groups appear in ``cls.param_group_order`` order first, then in
first-seen order for any groups not listed there.

lsdtools.Configurable.parameter_schema#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:851.

Python
parameter_schema(cls) -> Dict[str, Any]
Python
cls: (unannotated)

Source docstring:

text
Return a JSON Schema ``object`` for all non-hidden, non-output parameters.

Used by agents to build and validate tool call payloads without source inspection::

    schema = MyStep.parameter_schema()
    # → {"type": "object", "properties": {...}, "required": [...]}

lsdtools.Configurable.validate#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:893.

Python
validate(self) -> ValidationResult
Python
self: (unannotated)

Source docstring:

text
Validate all parameters. Returns structured result, never raises.

lsdtools.Configurable.batch_update#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:905.

Python
batch_update(self) -> Generator[None, None, None]
Python
self: (unannotated)

Source docstring:

text
Suppress per-field events; emit one batch event on exit.

lsdtools.Configurable.to_dict#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:923.

Python
to_dict(self) -> Dict[str, Any]
Python
self: (unannotated)

lsdtools.Configurable.validate_serialized_record#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:951.

Python
validate_serialized_record(cls, data: Dict[str, Any], *, path: str='configurable', validate_parameters: bool=True) -> None
Python
cls: (unannotated)
data: Dict[str, Any]
path: str
validate_parameters: bool

Source docstring:

text
Validate the current persisted contract without constructing an object.

lsdtools.Configurable.from_dict#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:1009.

Python
from_dict(cls, data: Dict[str, Any]) -> 'Configurable'
Python
cls: (unannotated)
data: Dict[str, Any]

Source docstring:

text
Restore one validated current-schema record.

lsdtools.Configurable.set_metadata#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:1029.

Python
set_metadata(self, key: str, value: Any) -> None
Python
key: str
self: (unannotated)
value: Any

lsdtools.Configurable.remove_metadata#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:1045.

Python
remove_metadata(self, key: str) -> None
Python
key: str
self: (unannotated)

lsdtools.Configurable.clear_metadata#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:1059.

Python
clear_metadata(self) -> None
Python
self: (unannotated)

lsdtools.Configurable.get_metadata#

Kind: method. Source: core/lsd/src/lsd/core/configurable.py:1066.

Python
get_metadata(self, key: str, default: Any=None) -> Any
Python
default: Any
key: str
self: (unannotated)

lsdtools.Context#

Kind: class. Source: core/lsd/src/lsd/tools/context.py:277.

Python
Context(self, *, host: Any=None, engine: Any=None, project: Any=None, entity: Any=None, selection: Any=None, ui: Any=None, viewer: Any=None, view_id: Optional[str]=None, panel: Any=None, events: Any=None) -> None

Source docstring:

text
The single injected object interactive handlers receive (actions / commands / panels).

Fields are populated lazily by the runtime for the surface that invoked the handler; unset ones
are ``None``. ``ctx.viewer`` is an exact-target facade over standard serializable viewer actions;
it never exposes the host's Desktop or renderer implementation. Declare the Context by
annotating any parameter ``Context`` (the name is up to you)::

    @tool.action("entity/csv_import/settings")
    def change_settings(ctx: Context):
        ctx.ui.notify("re-importing with the new settings")
        ...

Use :meth:`testing` to build a stub for unit tests.

Implementation alias: lsd.tools.context.Context.

lsdtools.Context.__init__#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:296.

Python
__init__(self, *, host: Any=None, engine: Any=None, project: Any=None, entity: Any=None, selection: Any=None, ui: Any=None, viewer: Any=None, view_id: Optional[str]=None, panel: Any=None, events: Any=None) -> None
Python
engine: Any
entity: Any
events: Any
host: Any
panel: Any
project: Any
selection: Any
self: (unannotated)
ui: Any
view_id: Optional[str]
viewer: Any

lsdtools.Context.testing#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:311.

Python
testing(cls, **fields: Any) -> 'Context'
Python
cls: (unannotated)
fields: Any

Source docstring:

text
Build a Context stub for tests: ``Context.testing(project=fake_project, ui=fake_ui)``.

lsdtools.Context.host#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:299.

Python
host: Any
Python
host = host

lsdtools.Context.engine#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:300.

Python
engine: Any
Python
engine = engine

lsdtools.Context.project#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:301.

Python
project: Any
Python
project = project

lsdtools.Context.entity#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:302.

Python
entity: Any
Python
entity = entity

lsdtools.Context.selection#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:303.

Python
selection: Any
Python
selection = selection

lsdtools.Context.ui#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:304.

Python
ui: Any
Python
ui = ui

lsdtools.Context.viewer#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:305.

Python
viewer: Any
Python
viewer = viewer

lsdtools.Context.view_id#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:306.

Python
view_id: Optional[str]
Python
view_id = view_id

lsdtools.Context.panel#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:307.

Python
panel: Any
Python
panel = panel

lsdtools.Context.events#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:308.

Python
events: Any
Python
events = events

lsdtools.Creates#

Kind: class. Source: core/lsd/src/lsd/trip/view.py:63.

Python
Creates(self, *components: Component) -> None

Source docstring:

text
Components a system adds to the Trip (each a :class:`Component` declaration).

Implementation alias: lsd.trip.view.Creates.

lsdtools.Creates.components#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:65.

Python
components: Tuple[Component, ...]

lsdtools.Creates.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:67.

Python
__init__(self, *components: Component) -> None
Python
components: Component
self: (unannotated)

lsdtools.DomainMode#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:425.

Implementation alias: lsd.project_semantics.DomainMode.

Declared bases: str, Enum.

lsdtools.DomainMode.FIXED#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:426.

Python
FIXED = 'fixed'

lsdtools.DomainMode.REFERENCE_FIELD#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:427.

Python
REFERENCE_FIELD = 'reference-field'

lsdtools.DomainMode.PROJECT_ENVELOPE#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:428.

Python
PROJECT_ENVELOPE = 'project-envelope'

lsdtools.DomainMode.ROBUST_PERCENTILE#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:429.

Python
ROBUST_PERCENTILE = 'robust-percentile'

lsdtools.DomainMode.PER_TABLE#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:430.

Python
PER_TABLE = 'per-table'

lsdtools.DomainPolicy#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:434.

Source docstring:

text
Explicit authority for the data range used by one style assignment.

Implementation alias: lsd.project_semantics.DomainPolicy.

lsdtools.DomainPolicy.mode#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:437.

Python
mode: DomainMode | str

lsdtools.DomainPolicy.minimum#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:438.

Python
minimum: float | None
Python
minimum = None

lsdtools.DomainPolicy.maximum#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:439.

Python
maximum: float | None
Python
maximum = None

lsdtools.DomainPolicy.reference_field_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:440.

Python
reference_field_id: str | None
Python
reference_field_id = None

lsdtools.DomainPolicy.contributor_field_ids#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:441.

Python
contributor_field_ids: tuple[str, ...]
Python
contributor_field_ids = ()

lsdtools.DomainPolicy.lower_percentile#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:442.

Python
lower_percentile: float | None
Python
lower_percentile = None

lsdtools.DomainPolicy.upper_percentile#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:443.

Python
upper_percentile: float | None
Python
upper_percentile = None

lsdtools.DomainPolicy.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:444.

Python
version: int
Python
version = 1

lsdtools.DomainPolicy.fixed#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:501.

Python
fixed(cls, minimum: float, maximum: float) -> 'DomainPolicy'
Python
cls: (unannotated)
maximum: float
minimum: float

lsdtools.DomainPolicy.per_table#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:505.

Python
per_table(cls) -> 'DomainPolicy'
Python
cls: (unannotated)

lsdtools.DomainPolicy.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:509.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'DomainPolicy'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.DomainPolicy.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:524.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.Engine#

Kind: class. Source: core/lsd/src/lsd/runtime/engine.py:323.

Python
Engine(self, workspace: Optional[Workspace]=None, *, artifact_workspace: 'Optional[str | os.PathLike[str]]'=None, name: Optional[str]=None, **kwargs: Any) -> None

Source docstring:

text
Execution runtime over a Workspace-owned entity forest.

``param_group_order`` keeps project-level settings in a logical tab order
for the desktop inspector.

Implementation alias: lsd.runtime.engine.Engine.

Declared bases: Configurable.

lsdtools.Engine.param_group_order#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:330.

Python
param_group_order = ['Project', 'Execution']

lsdtools.Engine.project_path#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:333.

Python
project_path: Optional[str]

lsdtools.Engine.desktop_runtime#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:336.

Python
desktop_runtime: Optional[Dict[str, Any]]

lsdtools.Engine.viewer_provider_bindings#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:337.

Python
viewer_provider_bindings: Dict[str, Dict[str, str]]

lsdtools.Engine.viewer_provider_state#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:338.

Python
viewer_provider_state: Dict[str, Dict[str, dict]]

lsdtools.Engine.viewer_layout#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:339.

Python
viewer_layout: Dict[str, list]

lsdtools.Engine.name#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:342.

Python
name = param(str, default='project', label='Name', group='Project', validators=[_name_not_empty])

lsdtools.Engine.artifact_workspace#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:349.

Python
artifact_workspace = param(str, required=True, label='Artifact workspace', group='Project', widget='dir', description='Execution artifact root; each entity gets a sub-folder')

lsdtools.Engine.max_parallel#

Kind: attribute. Source: core/lsd/src/lsd/runtime/engine.py:357.

Python
max_parallel = param(int, default=1, min=1, label='Max Parallel', group='Execution', visibility='advanced', description='Max simultaneous pipeline runs; >1 runs independent entity branches concurrently in run_all')

lsdtools.Engine.__init__#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:362.

Python
__init__(self, workspace: Optional[Workspace]=None, *, artifact_workspace: 'Optional[str | os.PathLike[str]]'=None, name: Optional[str]=None, **kwargs: Any) -> None
Python
artifact_workspace: 'Optional[str | os.PathLike[str]]'
kwargs: Any
name: Optional[str]
self: (unannotated)
workspace: Optional[Workspace]

lsdtools.Engine.workspace#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:472.

Python
workspace(self) -> Workspace
Python
self: (unannotated)

Source docstring:

text
The domain entity forest and EventBus owner consumed by this engine.

lsdtools.Engine.rejected_package_contract#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:477.

Python
rejected_package_contract(self) -> Optional[str]
Python
self: (unannotated)

Source docstring:

text
Why this Engine is an inspectable, non-writing recovery session.

lsdtools.Engine.set_parameter#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:493.

Python
set_parameter(self, name: str, value: Any, *, coerce: bool=False) -> List[Any]
Python
coerce: bool
name: str
self: (unannotated)
value: Any

Source docstring:

text
Keep artifact path writes wrapped in :class:`ArtifactWorkspace`.

lsdtools.Engine.execution_status#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:533.

Python
execution_status(self) -> ExecutionStatusSnapshot
Python
self: (unannotated)

Source docstring:

text
Return a frozen, runtime-only snapshot of current/recent execution.

The snapshot contains no live Entity/Step objects and mutating a dict
returned by its :meth:`to_dict` helper cannot affect this Engine.

lsdtools.Engine.entity_execution_gate#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:580.

Python
entity_execution_gate(self, entity: Entity)
Python
entity: Entity
self: (unannotated)

Source docstring:

text
Hold this Engine's per-entity execution gate for one live Entity.

The public form of :meth:`_execution_lock_for` for direct callers of
the low-level ``runner.run_pipeline`` — its concurrency note requires
that callers provide the same serialization boundary Engine uses,
because a pipeline mutates its manifest, output paths, and last-run
fields (see ``runner.py`` "Concurrency note"). Same Entity: at most one
execution at a time; distinct entities never block each other.

The gate is a plain (non-reentrant) lock, and pipeline events are
emitted synchronously while it is held — a bus handler must never call
``run``/``run_branch``/this gate for the SAME entity, or it deadlocks.

lsdtools.Engine.add#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:597.

Python
add(self, view: Any) -> 'Engine'
Python
self: (unannotated)
view: Any

Source docstring:

text
Attach a :class:`~lsd.core.view.View` presented by :meth:`show`.

Entity ownership and mutation belong to :attr:`workspace`.

lsdtools.Engine.views#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:626.

Python
views(self) -> List[Any]
Python
self: (unannotated)

Source docstring:

text
All attached views, in insertion order.

lsdtools.Engine.remove_view#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:630.

Python
remove_view(self, view: Any) -> 'Engine'
Python
self: (unannotated)
view: Any

lsdtools.Engine.show#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:641.

Python
show(self, *, mode: str='auto', title: Optional[str]=None, block: bool=True) -> Any
Python
block: bool
mode: str
self: (unannotated)
title: Optional[str]

Source docstring:

text
Present every attached view — a single window hosting them all when a front-end is loaded,
else each view's titled text rendering. The symmetry partner of :meth:`run_all`.

lsdtools.Engine.table_profiles#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:665.

Python
table_profiles(self) -> 'Dict[tuple[str, str, str], Any]'
Python
self: (unannotated)

Source docstring:

text
Latest derived tables indexed by exact producer coordinate.

Keys are ``(entity_id, step_id, output_port)``. No column-name or
display-name merge is performed; observed fields absent from the
project semantics catalog remain visible as unbound observations.

lsdtools.Engine.table_profile#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:693.

Python
table_profile(self, entity_id: str, step_id: str, output_port: str) -> Any
Python
entity_id: str
output_port: str
self: (unannotated)
step_id: str

Source docstring:

text
Return one exact current profile, or ``None`` when unmaterialized.

lsdtools.Engine.run#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:911.

Python
run(self, target: 'str | Entity | Any', *, resume: bool=True, from_step: Optional[str]=None, cancellation_signal: Any=None, run_capabilities: Any=None) -> 'PipelineResult | Any'
Python
cancellation_signal: Any
from_step: Optional[str]
resume: bool
run_capabilities: Any
self: (unannotated)
target: 'str | Entity | Any'

Source docstring:

text
Run a pipeline.

*target* may be:

* a stable **entity id**, a unique entity name, or an **Entity** instance —
  returns a :class:`~lsd.runtime.runner.PipelineResult`;
* a **wired step** or **list of steps** (``engine.run(double(t=numbers()))``) —
  the steps and their upstream closure are wrapped in an implicit entity and run,
  returning a friendly :class:`~lsd.runtime.runner.RunResult` (``.output`` is a
  :class:`~lsd.table.Table`, plus ``.print()``).

``cancellation_signal`` is an optional callable or Event-like signal.
It is checked at runner boundaries and exposed to package code through
``StepContext.cancelled``.

lsdtools.Engine.run_branch#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:968.

Python
run_branch(self, target: 'str | Entity', terminals: Any, *, resume: bool=True, from_step: Optional[str]=None, cancellation_signal: Any=None, run_capabilities: Any=None) -> 'PipelineResult'
Python
cancellation_signal: Any
from_step: Optional[str]
resume: bool
run_capabilities: Any
self: (unannotated)
target: 'str | Entity'
terminals: Any

Source docstring:

text
Run attached terminal steps and their same-entity ``bind_from`` closure.

The existing entity is passed directly to the canonical runner, so step
ownership, workspace, manifest, and event bus are preserved. References
to steps owned by other entities are treated as already-materialized
external inputs and are never executed or re-parented.

Only explicit ``bind_from`` edges define this branch. Implicit sequential
predecessors are not inferred; a branch that needs one must bind it.
Execution still follows the runner's normal Load -> Shape -> Deliver order.

lsdtools.Engine.set_variant#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1074.

Python
set_variant(self, identity: str, *, mode: str='replace', provider: Optional[str]=None) -> int
Python
identity: str
mode: str
provider: Optional[str]
self: (unannotated)

Source docstring:

text
Choose the active provider for a node *identity* in this project and swap live nodes.

``mode="replace"`` makes *provider* win the identity (existing nodes instantly use it);
``mode="coexist"`` reverts the identity to the original (each override stays addable on its
own). Persisted in the ``.lsd`` (``package_state.variants``). Returns the number of live
steps swapped.

lsdtools.Engine.resolve_configurable_class#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1094.

Python
resolve_configurable_class(self, identity: Optional[str]) -> Optional[type]
Python
identity: Optional[str]
self: (unannotated)

Source docstring:

text
Resolve a type using this project's variant selection only.

lsdtools.Engine.variant_scope#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1099.

Python
variant_scope(self)
Python
self: (unannotated)

Source docstring:

text
Scope nested classmethod deserialization to this Engine's exact selection.

lsdtools.Engine.disabled_packages#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1103.

Python
disabled_packages(self) -> 'frozenset[str]'
Python
self: (unannotated)

Source docstring:

text
Packages whose steps are frozen for this project (explicit per-project disables).

Steps owned by these packages serve their cached output and refuse to recompute, so a run
neither loses them nor executes stale/withheld code.

lsdtools.Engine.set_runtime_parallelism#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1151.

Python
set_runtime_parallelism(self, value: Optional[int]) -> None
Python
self: (unannotated)
value: Optional[int]

Source docstring:

text
Override ``max_parallel`` for this session only (``None`` clears it).

A runtime dial, not a project setting: the ``max_parallel`` param is
untouched, so ``to_dict()``/``save()`` output stays byte-identical and
the override never persists into the ``.lsd`` document.

lsdtools.Engine.effective_max_parallel#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1166.

Python
effective_max_parallel(self) -> int
Python
self: (unannotated)

Source docstring:

text
The parallelism ``run_all`` actually uses: the session override when
set, else the persisted ``max_parallel`` param.

lsdtools.Engine.run_all#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1172.

Python
run_all(self, *, resume: bool=True, cancellation_signal: Any=None) -> 'Dict[str, PipelineResult]'
Python
cancellation_signal: Any
resume: bool
self: (unannotated)

Source docstring:

text
Run every entity in dependency order (sources before dependents).

``max_parallel == 1`` (default): strictly sequential.
``max_parallel > 1``: independent branches execute concurrently on a
thread pool; a failed entity's descendants are *blocked* (not launched)
while unrelated branches continue.

``resume=True`` skips unchanged entities via the manifest (incremental
rebuild — composes correctly with both modes).

``cancellation_signal`` stops admitting later entities and is leased to
every active step for cooperative cancellation.

Raises ``CycleError`` if the dependency graph contains a cycle.

lsdtools.Engine.run_upstream_of#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1455.

Python
run_upstream_of(self, target: 'str | Entity', *, resume: bool=True, cancellation_signal: Any=None) -> 'Dict[str, PipelineResult]'
Python
cancellation_signal: Any
resume: bool
self: (unannotated)
target: 'str | Entity'

Source docstring:

text
Run *target* and the transitive closure of entities it depends on.

Useful for targeted rebuilds: if ``report`` depends on ``raw``, then
``engine.run_upstream_of(report.id)`` runs ``raw`` then ``report``
while leaving unrelated entities untouched. Results are keyed by stable
entity id.

``cancellation_signal`` stops admitting later entities and is combined
with the enclosing project task's lifetime signal when one is present.

lsdtools.Engine.plan#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1569.

Python
plan(self, target: 'str | Entity | None'=None) -> Dict[str, Any]
Python
self: (unannotated)
target: 'str | Entity | None'

Source docstring:

text
Dry-run preview: what would execute without running anything.

Returns a serialisable dict describing which steps would run vs. be
skipped (cached). Reads the manifest and current parameters; no writes.

    engine.plan()               # all entities
    engine.plan(sales.id)       # one entity by stable id
    engine.plan(my_entity)      # one entity by instance

lsdtools.Engine.diff#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1645.

Python
diff(self, target: 'str | Entity | None'=None) -> 'List[Dict[str, Any]]'
Python
self: (unannotated)
target: 'str | Entity | None'

Source docstring:

text
Return steps whose parameters changed since the last successful run.

Compares current param values against the ``param_snapshot`` stored in
the manifest after each successful execution.  Returns an empty list when
nothing has changed, or the manifest has no prior snapshot.

    changes = engine.diff("sales")
    # → [{"entity_name", "step_id", "step_class",
    #     "current_params", "old_params"}, ...]

lsdtools.Engine.close#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1825.

Python
close(self) -> None
Python
self: (unannotated)

Source docstring:

text
Release resources owned by this engine. Safe to call repeatedly.

lsdtools.Engine.__enter__#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1870.

Python
__enter__(self) -> 'Engine'
Python
self: (unannotated)

lsdtools.Engine.__exit__#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:1873.

Python
__exit__(self, *_exc: object) -> None
Python
_exc: object
self: (unannotated)

lsdtools.Engine.save#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:2179.

Python
save(self, path: Optional[str]=None, *, document_sections: Optional[Mapping[str, Any]]=None) -> None
Python
document_sections: Optional[Mapping[str, Any]]
path: Optional[str]
self: (unannotated)

Source docstring:

text
Serialize the whole project (engine params + all entities) to JSON.

The first explicit *path* becomes this document's save target; later calls may omit it.
Records ``packages`` as explicit activation roots. Package-owned entity records carry
transitive/implicit provenance themselves. ``document_sections`` lets the application add
opaque,
JSON-compatible top-level sections (for example Desktop's ``"ui"`` block) to this same
atomic snapshot. Such sections cannot replace fields owned by the engine.

lsdtools.Engine.load#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:2346.

Python
load(cls, path: str, *, project_document: Optional[Mapping[str, Any]]=None, workspace: Optional[Workspace]=None, artifact_workspace: 'Optional[str | os.PathLike[str]]'=None, package_manager=None, package_host=None, packages_preloaded: bool=False, inactive_packages: Optional[Dict[str, str]]=None, rejected_package_contract: Optional[str]=None) -> 'Engine'
Python
artifact_workspace: 'Optional[str | os.PathLike[str]]'
cls: (unannotated)
inactive_packages: Optional[Dict[str, str]]
package_host: (unannotated)
package_manager: (unannotated)
packages_preloaded: bool
path: str
project_document: Optional[Mapping[str, Any]]
rejected_package_contract: Optional[str]
workspace: Optional[Workspace]

Source docstring:

text
Restore an engine from a JSON file saved by ``engine.save()``.

Loads the project's declared ``packages`` first so their step/entity classes
are registered before deserialization (a no-op if already loaded).

``workspace`` supplies the domain forest/EventBus owner. ``artifact_workspace``
overrides the serialized execution-artifact directory when a caller needs a
location specific to the current checkout or process.

``project_document`` supplies an already-decoded strict snapshot. The caller retains
ownership of that mapping, so loading works from a deep copy and never rereads ``path``;
the path remains the runtime save/document identity. Omitting it preserves ordinary file
loading exactly.

``packages_preloaded`` is the explicit Desktop handoff: package activation was already
attempted with the Desktop PackageHost, so only metadata is restored here and discovery/
loading is not repeated. Headless callers retain the default load behavior.

``rejected_package_contract`` is a fail-closed Desktop recovery handoff. It is accepted only
with preloaded mode and an ``inactive_packages`` map covering every recoverable package name;
exact/variant state is then ignored and package-owned nodes restore as placeholders.

lsdtools.Engine.ephemeral#

Kind: method. Source: core/lsd/src/lsd/runtime/engine.py:2529.

Python
ephemeral(cls, *, workspace: Optional[Workspace]=None) -> 'Engine'
Python
cls: (unannotated)
workspace: Optional[Workspace]

Source docstring:

text
Engine backed by temporary artifact storage for an optional Workspace.

lsdtools.Entity#

Kind: class. Source: core/lsd/src/lsd/tree/entity.py:46.

Python
Entity(self, name: str, *, id: Optional[str]=None, traits: Optional[Set[str]]=None, metadata: Optional[Dict[str, Any]]=None, event_bus: Optional['EventBus']=None, **kwargs: Any) -> None

Source docstring:

text
A domain node in a Workspace entity hierarchy.

``Entity("name").add(LoadStep(...)).add(ShapeStep(...)).run()``

``**kwargs`` in ``__init__`` accepts declared entity parameters such as
``workspace_dir`` and parameters added by subclasses. Entity classes define
persisted domain state and behaviour only. A package
makes one available to authoring surfaces by mounting an
:class:`lsd.packages.EntityTypeSpec` (normally through ``@tool.entity``).
Labels, icons, creation availability, and tree presentation never live on
the entity model.

Implementation alias: lsd.tree.entity.Entity.

Declared bases: Configurable, Container[Configurable].

lsdtools.Entity.serialized_fields#

Kind: attribute. Source: core/lsd/src/lsd/tree/entity.py:60.

Python
serialized_fields = frozenset({'traits', 'configurables', 'child_entities'})

lsdtools.Entity.name#

Kind: attribute. Source: core/lsd/src/lsd/tree/entity.py:62.

Python
name = param(str, required=True, label='Name', description='Entity name', validators=[_name_not_empty])

lsdtools.Entity.workspace_dir#

Kind: attribute. Source: core/lsd/src/lsd/tree/entity.py:69.

Python
workspace_dir = param(str, default=None, visibility='advanced', label='Workspace', widget='dir', description='Directory for intermediate Parquet files')

lsdtools.Entity.__init__#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:75.

Python
__init__(self, name: str, *, id: Optional[str]=None, traits: Optional[Set[str]]=None, metadata: Optional[Dict[str, Any]]=None, event_bus: Optional['EventBus']=None, **kwargs: Any) -> None
Python
event_bus: Optional['EventBus']
id: Optional[str]
kwargs: Any
metadata: Optional[Dict[str, Any]]
name: str
self: (unannotated)
traits: Optional[Set[str]]

lsdtools.Entity.workspace#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:100.

Python
workspace(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The domain workspace that owns this entity, including descendants.

lsdtools.Entity.engine#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:105.

Python
engine(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The currently associated execution Engine, if the workspace has one.

lsdtools.Entity.add#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:320.

Python
add(self, configurable: Configurable) -> 'Entity'
Python
configurable: Configurable
self: (unannotated)

lsdtools.Entity.configurables#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:351.

Python
configurables(self) -> List[Configurable]
Python
self: (unannotated)

Source docstring:

text
All attached configurables, in display order.

lsdtools.Entity.step#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:355.

Python
step(self, reference: str) -> Optional[Configurable]
Python
reference: str
self: (unannotated)

Source docstring:

text
Find one child by stable id or an unambiguous human alias.

    entity.step("clean_csv")     # a @tool.load def clean_csv  → class CleanCsv
    entity.step("CleanCsv")      # by class name

An exact id always wins. Class and builder-function aliases are
conveniences only: if more than one child matches, use a stable step id.

lsdtools.Entity.parent#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:392.

Python
parent(self) -> 'Optional[Entity]'
Python
self: (unannotated)

Source docstring:

text
The entity that contains this one, or ``None`` if top-level.

lsdtools.Entity.child_entities#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:397.

Python
child_entities(self) -> 'List[Entity]'
Python
self: (unannotated)

Source docstring:

text
Direct child entities (separate from step configurables).

lsdtools.Entity.add_entity#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:401.

Python
add_entity(self, child: 'Entity') -> 'Entity'
Python
child: 'Entity'
self: (unannotated)

Source docstring:

text
Attach *child* as a sub-entity.

Raises ``ValueError`` on a cycle (adding an ancestor or self).
An attached parent asks its Workspace to adopt the complete subtree,
removing an existing root from the workspace roots atomically.
Returns ``self`` for chaining.

lsdtools.Entity.remove_entity#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:447.

Python
remove_entity(self, child: 'Entity') -> None
Python
child: 'Entity'
self: (unannotated)

Source docstring:

text
Detach *child* and its complete subtree from this workspace.

lsdtools.Entity.move_to#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:459.

Python
move_to(self, new_parent: 'Entity') -> None
Python
new_parent: 'Entity'
self: (unannotated)

Source docstring:

text
Re-parent this entity under *new_parent*.

Raises ``ValueError`` if *new_parent* is this entity or a descendant
(which would create a cycle).

lsdtools.Entity.is_ancestor#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:472.

Python
is_ancestor(self, other: 'Entity') -> bool
Python
other: 'Entity'
self: (unannotated)

Source docstring:

text
Return ``True`` if *other* is an ancestor of this entity (i.e. in the parent chain).

lsdtools.Entity.iter_descendants#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:481.

Python
iter_descendants(self) -> 'Generator[Entity, None, None]'
Python
self: (unannotated)

Source docstring:

text
Depth-first pre-order traversal of all descendant entities.

lsdtools.Entity.output#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:490.

Python
output(self) -> 'Any'
Python
self: (unannotated)

Source docstring:

text
This entity's terminal output as an :class:`lsd.table.Table`, or ``None`` if it has not run.

The last configurable that recorded an output path wins (steps run in order, so that is the
entity's terminal result); its ``"output"`` key is preferred, else its first. Reads the Parquet
the run wrote — so it survives a project reopen, where
``Engine._restore_manifest_outputs`` repopulates ``last_output_paths`` from the manifest.

This is the pull side of :meth:`lsd.core.view.View.watch`: a watching view reads it on
``engine/entity/finished`` and whenever it starts watching.

lsdtools.Entity.output_at#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:515.

Python
output_at(self, reference: 'Any', output_port: 'Optional[str]'=None, *, expected: str='table') -> 'Any'
Python
expected: str
output_port: 'Optional[str]'
reference: 'Any'
self: (unannotated)

Source docstring:

text
Read one exact declared step output, or ``None`` when it is unrun/stale.

``reference`` is preferably an :class:`lsd.OutputRef`; ``step_id`` plus
``output_port`` is accepted as concise sugar.  Resolution is deliberately
local and exact: the referenced entity must be ``self``, the configurable
id must identify one of this entity's pipeline steps, and the port must be
declared by that step.  No terminal, first-path, or similarly named port
fallback is performed.

The default ``expected="table"`` reads only a Parquet table.  Use
``expected="path"`` when an explicitly declared port is intentionally a
non-table artifact; a ViewerPayload JSON sidecar never masquerades as a
table.

A Trip-valued port (``lsd.trip``; its recorded value is a ``mem://``
handle) answers ``expected="trip"`` with the resident :class:`lsd.trip.Trip`
(restored from its snapshot when it is no longer resident), and answers
``expected="table"``/``"path"`` with its parquet *snapshot* -- the table
form a run leaves behind -- or ``None`` until the runner has written one.

lsdtools.Entity.declared_output_refs#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:614.

Python
declared_output_refs(self, output_port: 'Optional[str]'=None) -> 'List[Any]'
Python
output_port: 'Optional[str]'
self: (unannotated)

Source docstring:

text
Enumerate exact declared pipeline outputs in configurable order.

``output_port`` is an optional exact filter.  This is the public,
domain-neutral discovery companion to :meth:`output_at`: callers must
still reject zero or multiple matches when their contract requires one.

lsdtools.Entity.viewer_payloads#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:640.

Python
viewer_payloads(self) -> 'List[Dict[str, Any]]'
Python
self: (unannotated)

Source docstring:

text
The persisted viewer payloads (``viewer/layer/set`` / ``chart`` / ``legend`` …) this entity's
deliver steps produced — reconstructed generically, with no per-step code.

For each configurable, this reads the ``*_payload.json`` sidecar a :class:`ViewerPayload`
deliver wrote (found among its :attr:`last_output_paths`), rebases the stored Parquet paths onto
the sidecar's own directory (robust to a moved workspace), and stamps the *current* entity/step
ids. So a watched entity's layers reappear after a project reopen — where the runtime cache is
gone but the workspace survives (``Engine._restore_manifest_outputs`` repopulates
``last_output_paths``) — without re-running.

The sole mechanism is the JSON sidecar: every deliver step that returns a :class:`ViewerPayload`
writes a ``*_payload.json`` beside its Parquet outputs. Empty until the entity runs.

lsdtools.Entity.has_viewer_steps#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:689.

Python
has_viewer_steps(self) -> bool
Python
self: (unannotated)

Source docstring:

text
True if any step *can* deliver a viewer payload — i.e. its class carries a
``viewer_payload_type`` (stamped by ``@tool.deliver`` on a ``-> ViewerPayload`` function).

A **class**-level check (no import of any domain package, no run needed): it answers before the
entity has run, where :meth:`viewer_payloads` is still empty. That is what lets a front-end
accept a drop of an un-run entity onto a viewer — the viewer
:meth:`~lsd.core.view.View.watch`\es it and fills in once the run finishes.

lsdtools.Entity.table_profiles#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:701.

Python
table_profiles(self) -> 'Dict[str, Dict[str, Any]]'
Python
self: (unannotated)

Source docstring:

text
Latest derived profiles by exact ``step_id`` then ``output_port``.

Profiles remain separate observations. They are never merged by an
editable column name, so equally named fields from multiple outputs
cannot silently acquire one another's identity or statistics.

lsdtools.Entity.input_entity_deps#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:717.

Python
input_entity_deps(self) -> Set[str]
Python
self: (unannotated)

Source docstring:

text
Stable ids of entities this entity depends on for execution.

Used by ``Engine.run_all()`` to derive topological run order. Only
``bind_from`` step bindings and exact ``execution_dependencies``
contribute edges; path-only ``bind`` bindings are excluded (they're
external files, not entity dependencies).
A live source reference is authoritative; the persisted
``source_entity_id`` keeps the edge stable across save/load. Display
names are deliberately ignored because they are editable and non-unique.

lsdtools.Entity.add_trait#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:748.

Python
add_trait(self, trait: str) -> None
Python
self: (unannotated)
trait: str

lsdtools.Entity.remove_trait#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:755.

Python
remove_trait(self, trait: str) -> None
Python
self: (unannotated)
trait: str

lsdtools.Entity.has_trait#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:779.

Python
has_trait(self, trait: str) -> bool
Python
self: (unannotated)
trait: str

lsdtools.Entity.has_all_traits#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:782.

Python
has_all_traits(self, *traits: str) -> bool
Python
self: (unannotated)
traits: str

lsdtools.Entity.has_any_trait#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:785.

Python
has_any_trait(self, *traits: str) -> bool
Python
self: (unannotated)
traits: str

lsdtools.Entity.has_metadata#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:790.

Python
has_metadata(self, key: str) -> bool
Python
key: str
self: (unannotated)

lsdtools.Entity.clear_metadata#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:793.

Python
clear_metadata(self) -> None
Python
self: (unannotated)

lsdtools.Entity.to_dict#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:798.

Python
to_dict(self) -> Dict[str, Any]
Python
self: (unannotated)

lsdtools.Entity.from_dict#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:821.

Python
from_dict(cls, data: Dict[str, Any], event_bus: Optional['EventBus']=None, inactive_packages: Optional[Mapping[str, str]]=None) -> 'Entity'
Python
cls: (unannotated)
data: Dict[str, Any]
event_bus: Optional['EventBus']
inactive_packages: Optional[Mapping[str, str]]

Source docstring:

text
Restore from a serialized dict. Types auto-resolved via the registry.

The concrete ``Entity`` subclass is recovered from the serialized
``_type`` field. An unavailable type becomes a lossless
:class:`~lsd.tree.missing.MissingEntity`; it is never silently flattened
into the base class.

lsdtools.Entity.run#

Kind: method. Source: core/lsd/src/lsd/tree/entity.py:1003.

Python
run(self, *, resume: bool=True, from_step: Optional[str]=None, cancellation_signal: Any=None) -> 'PipelineResult'
Python
cancellation_signal: Any
from_step: Optional[str]
resume: bool
self: (unannotated)

Source docstring:

text
Execute the Load -> Shape(s) -> Deliver pipeline on this entity.

Delegates to the parent Engine if one is attached; otherwise creates
a temporary ephemeral engine for this single run.

lsdtools.Events#

Kind: class. Source: core/lsd/src/lsd/core/event_bus.py:406.

Source docstring:

text
Canonical lifecycle event names with their payload fields.

Subscribe via ``bus.on(Events.STEP_FINISHED, handler)`` or with a glob
(e.g. ``bus.on("pipeline/step/**", h)``). Every payload includes the
keys documented here; unknown extra keys are forward-compatible additions.

Payload values are exact JSON — dict/list/str/bool/int/finite-float/None
with string keys; anything else is refused when the Event is constructed.
Live objects never ride an event: emitters convert first (ids, names,
``to_dict()`` snapshots), which is why the ``entity``/``configurable``
payloads below are dicts.

Engine / run_all level
----------------------
RUN_STARTED     run_id, engine_id, order:list[entity_id], entity_names:mapping[id,name],
                parallel:int, entity_count:int
RUN_FINISHED    run_id, engine_id, ok:bool, ran:int, failed:int, blocked:int,
                duration_s:float, error:str|None
ENTITY_STARTED  run_id, name, entity_id
ENTITY_FINISHED run_id, name, entity_id, ok:bool, rows:int, duration_s:float,
                error:str|None
                (``entity_id`` is how a watching View identifies the entity across a
                 rename — see ``lsd.core.view.View.watch``)
ENTITY_BLOCKED  run_id, name, entity_id, upstream:list[entity_id]

Workspace entity forest and Engine view presentation
-----------------------------------------------------
WORKSPACE_ENTITY_ADDED    workspace_id, entity_id, parent_id, name,
                          attached_entity_ids:list[entity_id],
                          entity:dict — the entity's validated ``to_dict()``
                          snapshot, captured before the mutation commits
WORKSPACE_ENTITY_REMOVED  workspace_id, entity_id, parent_id, name,
                          detached_entity_ids, entity:dict
WORKSPACE_ENTITY_MOVED    workspace_id, entity_id, old_parent_id,
                          new_parent_id, name
WORKSPACE_ENTITY_REPLACED workspace_id, entity_id, parent_id, name,
                          detached_entity_ids, attached_entity_ids,
                          entity:dict, replaced_entity:dict (``to_dict()``
                          snapshots of the replacement and replaced subtrees)
WORKSPACE_ENTITY_REORDERED workspace_id, entity_id, parent_id, old_index, new_index
PROJECT_SEMANTICS_CHANGED workspace_id, version:1, expected_revision, revision,
                          variables:dict, symbology:dict
PROJECT_STYLES_CHANGED    workspace_id, version:1, styles:list
PROJECT_SHADERS_CHANGED   workspace_id, version:1, revision, shaders:list
METADATA_CHANGED        type, id, entity_id, workspace_id, key,
                        old_value, new_value
ENTITY_TRAITS_CHANGED   type, id, entity_id, workspace_id, old_traits,
                        new_traits, added, removed
VIEW_ADDED             engine_id, view_id, name
VIEW_REMOVED           engine_id, view_id, name
VIEW_SHOWN             engine_id, count:int, mode:str   (Engine.show over all views)
                       view_id, name, mode:str          (View.show for one view)
CONFIGURABLE_ADDED     entity_id, entity_name, configurable_id,
                       configurable:dict (its ``to_dict()`` snapshot),
                       configurable_type
CONFIGURABLE_REMOVED   entity_id, entity_name, configurable_id,
                       configurable:dict, configurable_type

Pipeline level (one pipeline per entity)
-----------------------------------------
PIPELINE_STARTED   run_id, entity_id, entity_name, step_count:int
PIPELINE_FINISHED  run_id, entity_id, ok:bool, ran:int, skipped:int, rows:int,
                   duration_s:float, error_step:str|None

Step level (all carry ``entity_id`` so consumers attribute steps correctly
when entities run concurrently under ``max_parallel > 1``)
----------
STEP_STARTED   run_id, step_class, step_id, entity_id, index:int, total:int
STEP_PROGRESS  run_id, step_id, entity_id, fraction:float, message:str
STEP_SKIPPED   run_id, step_class, step_id, entity_id, rows:int, output_paths:dict, outputs:dict,
               reason:str — either a cache decision ("cached"), or a GATE reason from
               ``runner._gate_reason``: "package-missing" (a Missing* placeholder),
               "package-disabled" (its package is off for this project), or the package's
               own freeze string (e.g. "seat-exceeded") when the host set one.
STEP_MATERIALIZED run_id, step_class, step_id, entity_id, output_paths:dict
                  - fresh artifacts have been written but their paths have not yet been
                  published to viewer/other consumers. Host-owned materialization transforms
                  run at this boundary, never after publication.
TRIP_UPDATED   run_id, step_class, step_id, entity_id, output_port, trip_id, version_key,
               layout:int, versions:dict, num_rows:int, handle, tick:int, final:bool,
               snapshot:str|None, snapshot_id:str|None
               - a system committed a new Trip value. Nothing was written: the value is
               resident and reachable through ``lsd.trip.registry`` by ``handle``. ``final``
               is False for a preview tick inside a system group; ``snapshot`` is set once
               the runner has written the Trip's parquet snapshot (a second TRIP_UPDATED with
               the same versions), which is the only form that survives a restart.
STEP_FINISHED  run_id, step_class, step_id, entity_id, rows:int, duration_s:float,
               output_paths:dict, outputs:dict
STEP_FAILED    run_id, step_class, step_id, entity_id, error:str, duration_s:float

Structure level (the Workspace-owned facts every tree/inspector consumes)
----------
WORKSPACE_ENTITY_ADDED / _REMOVED / _MOVED / _REPLACED / _REORDERED
CONFIGURABLE_ADDED / _REMOVED / _REORDERED
STEP_INPUT_CHANGED   one step output re-bound to another step's input

Note: STEP_FINISHED/STEP_SKIPPED carry BOTH ``output_paths`` (manifest paths
on disk, dict name->path) and ``outputs`` (the step's declared output values
via ``get_outputs()``). UI consumers (for example ``lsd-view-pipeline``) read
``outputs``; both keys are present on both events.

Implementation alias: lsd.core.event_bus.Events.

lsdtools.Events.RUN_STARTED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:510.

Python
RUN_STARTED = 'engine/run/started'

lsdtools.Events.RUN_FINISHED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:511.

Python
RUN_FINISHED = 'engine/run/finished'

lsdtools.Events.ENTITY_STARTED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:512.

Python
ENTITY_STARTED = 'engine/entity/started'

lsdtools.Events.ENTITY_FINISHED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:513.

Python
ENTITY_FINISHED = 'engine/entity/finished'

lsdtools.Events.ENTITY_BLOCKED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:514.

Python
ENTITY_BLOCKED = 'engine/entity/blocked'

lsdtools.Events.WORKSPACE_ENTITY_ADDED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:517.

Python
WORKSPACE_ENTITY_ADDED = 'workspace/entity/added'

lsdtools.Events.WORKSPACE_ENTITY_REMOVED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:518.

Python
WORKSPACE_ENTITY_REMOVED = 'workspace/entity/removed'

lsdtools.Events.WORKSPACE_ENTITY_MOVED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:519.

Python
WORKSPACE_ENTITY_MOVED = 'workspace/entity/moved'

lsdtools.Events.WORKSPACE_ENTITY_REPLACED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:520.

Python
WORKSPACE_ENTITY_REPLACED = 'workspace/entity/replaced'

lsdtools.Events.WORKSPACE_ENTITY_REORDERED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:521.

Python
WORKSPACE_ENTITY_REORDERED = 'workspace/entity/reordered'

lsdtools.Events.PROJECT_SEMANTICS_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:522.

Python
PROJECT_SEMANTICS_CHANGED = 'workspace/project-semantics/changed'

lsdtools.Events.PROJECT_STYLES_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:526.

Python
PROJECT_STYLES_CHANGED = 'workspace/project-styles/changed'

lsdtools.Events.PROJECT_SHADERS_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:527.

Python
PROJECT_SHADERS_CHANGED = 'workspace/project-shaders/changed'

lsdtools.Events.CONFIGURABLE_ADDED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:528.

Python
CONFIGURABLE_ADDED = 'entity/configurable/added'

lsdtools.Events.CONFIGURABLE_REMOVED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:529.

Python
CONFIGURABLE_REMOVED = 'entity/configurable/removed'

lsdtools.Events.CONFIGURABLE_REORDERED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:530.

Python
CONFIGURABLE_REORDERED = 'entity/configurable/reordered'

lsdtools.Events.STEP_INPUT_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:531.

Python
STEP_INPUT_CHANGED = 'pipeline/step/input/changed'

lsdtools.Events.VIEW_ADDED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:532.

Python
VIEW_ADDED = 'engine/view/added'

lsdtools.Events.VIEW_REMOVED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:533.

Python
VIEW_REMOVED = 'engine/view/removed'

lsdtools.Events.VIEW_SHOWN#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:534.

Python
VIEW_SHOWN = 'engine/view/shown'

lsdtools.Events.PIPELINE_STARTED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:537.

Python
PIPELINE_STARTED = 'pipeline/started'

lsdtools.Events.PIPELINE_FINISHED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:538.

Python
PIPELINE_FINISHED = 'pipeline/finished'

lsdtools.Events.STEP_STARTED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:541.

Python
STEP_STARTED = 'pipeline/step/started'

lsdtools.Events.STEP_PROGRESS#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:542.

Python
STEP_PROGRESS = 'pipeline/step/progress'

lsdtools.Events.STEP_SKIPPED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:543.

Python
STEP_SKIPPED = 'pipeline/step/skipped'

lsdtools.Events.STEP_MATERIALIZED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:544.

Python
STEP_MATERIALIZED = 'pipeline/step/materialized'

lsdtools.Events.TRIP_UPDATED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:546.

Python
TRIP_UPDATED = 'pipeline/trip/updated'

lsdtools.Events.STEP_FINISHED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:547.

Python
STEP_FINISHED = 'pipeline/step/finished'

lsdtools.Events.STEP_FAILED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:548.

Python
STEP_FAILED = 'pipeline/step/failed'

lsdtools.Events.ENTITY_RENAMED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:551.

Python
ENTITY_RENAMED = 'entity/renamed'

lsdtools.Events.ENTITY_TRAITS_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:552.

Python
ENTITY_TRAITS_CHANGED = 'entity/traits/changed'

lsdtools.Events.PACKAGE_VERSION_MISMATCH#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:555.

Python
PACKAGE_VERSION_MISMATCH = 'package/version/mismatch'

lsdtools.Events.FILE_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:558.

Python
FILE_CHANGED = 'file/changed'

lsdtools.Events.PARAMETER_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:561.

Python
PARAMETER_CHANGED = 'configurable/parameter/changed'

lsdtools.Events.PARAMETER_BATCH_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:562.

Python
PARAMETER_BATCH_CHANGED = 'configurable/parameter/batch_changed'

lsdtools.Events.METADATA_CHANGED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:563.

Python
METADATA_CHANGED = 'configurable/metadata/changed'

lsdtools.Events.VIEW_ACTION_INVOKED#

Kind: attribute. Source: core/lsd/src/lsd/core/event_bus.py:566.

Python
VIEW_ACTION_INVOKED = 'view/action/invoked'

lsdtools.FieldDefinition#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:219.

Source docstring:

text
Semantic identity and optional variable binding for one physical field.

Implementation alias: lsd.project_semantics.FieldDefinition.

lsdtools.FieldDefinition.field_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:222.

Python
field_id: str

lsdtools.FieldDefinition.variable_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:223.

Python
variable_id: str | None

lsdtools.FieldDefinition.name#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:224.

Python
name: str

lsdtools.FieldDefinition.kind#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:225.

Python
kind: str

lsdtools.FieldDefinition.producer#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:226.

Python
producer: FieldProducer | Mapping[str, Any]

lsdtools.FieldDefinition.lineage#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:227.

Python
lineage: tuple[str, ...]

lsdtools.FieldDefinition.unit#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:228.

Python
unit: str | None
Python
unit = None

lsdtools.FieldDefinition.support#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:229.

Python
support: str | None
Python
support = None

lsdtools.FieldDefinition.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:230.

Python
version: int
Python
version = 1

lsdtools.FieldDefinition.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:257.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'FieldDefinition'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.FieldDefinition.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:273.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.FieldProducer#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:189.

Source docstring:

text
Stable pipeline output that produces a field across table reruns.

Implementation alias: lsd.project_semantics.FieldProducer.

lsdtools.FieldProducer.entity_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:192.

Python
entity_id: str

lsdtools.FieldProducer.step_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:193.

Python
step_id: str

lsdtools.FieldProducer.output_port#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:194.

Python
output_port: str

lsdtools.FieldProducer.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:202.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'FieldProducer'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.FieldProducer.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:210.

Python
to_dict(self) -> dict[str, str]
Python
self: (unannotated)

lsdtools.FileArtifact#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:261.

Source docstring:

text
One file or directory produced by a :class:`FileSetPayload`.

Package code supplies ``path`` and optional descriptive fields. The framework resolves the path
after ``run()`` returns and fills the integrity fields; callers can read those fields from
``RunResult.artifacts`` or a low-level ``StepResult``. Symlinks and special files are rejected so
a cached artifact always describes self-contained bytes.

Implementation alias: lsd.flow.payload.FileArtifact.

lsdtools.FileArtifact.path#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:270.

Python
path: str

lsdtools.FileArtifact.media_type#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:271.

Python
media_type: str
Python
media_type = ''

lsdtools.FileArtifact.role#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:272.

Python
role: str
Python
role = ''

lsdtools.FileArtifact.sha256#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:273.

Python
sha256: str
Python
sha256 = field(default='', init=False)

lsdtools.FileArtifact.kind#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:274.

Python
kind: str
Python
kind = field(default='', init=False)

lsdtools.FileArtifact.size_bytes#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:275.

Python
size_bytes: int
Python
size_bytes = field(default=0, init=False)

lsdtools.FileArtifact.file_count#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:276.

Python
file_count: int
Python
file_count = field(default=0, init=False)

lsdtools.FileArtifact.to_dict#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:311.

Python
to_dict(self) -> Dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return the JSON-safe persisted artifact record.

lsdtools.FileArtifact.from_dict#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:325.

Python
from_dict(cls, value: Mapping[str, Any]) -> 'FileArtifact'
Python
cls: (unannotated)
value: Mapping[str, Any]

Source docstring:

text
Reconstruct a persisted record without touching the filesystem.

lsdtools.FileRole#

Kind: class. Source: core/lsd/src/lsd/packages/contributions.py:533.

Source docstring:

text
One data slot an :class:`EntityTemplate` consumes (e.g. a drillhole's ``collar`` CSV).

``fields`` are the target columns the wizard maps to; ``aliases`` is the per-field alias table the
auto-mapper (:func:`lsd.core.columnmap.resolve_column_map`) uses to detect them; ``rules`` is
lsd-data validation text (e.g. ``"hole_id unique\nrequire x y z"``). A single-file template needs no
roles — its file is loaded as-is.

Implementation alias: lsd.packages.contributions.FileRole.

lsdtools.FileRole.name#

Kind: attribute. Source: core/lsd/src/lsd/packages/contributions.py:541.

Python
name: str

lsdtools.FileRole.fields#

Kind: attribute. Source: core/lsd/src/lsd/packages/contributions.py:542.

Python
fields: Tuple[str, ...]
Python
fields = ()

lsdtools.FileRole.aliases#

Kind: attribute. Source: core/lsd/src/lsd/packages/contributions.py:543.

Python
aliases: Mapping[str, Tuple[str, ...]]
Python
aliases = field(default_factory=dict)

lsdtools.FileRole.rules#

Kind: attribute. Source: core/lsd/src/lsd/packages/contributions.py:544.

Python
rules: str
Python
rules = ''

lsdtools.FileRole.required#

Kind: attribute. Source: core/lsd/src/lsd/packages/contributions.py:545.

Python
required: bool
Python
required = True

lsdtools.FileSetPayload#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:340.

Python
FileSetPayload(self, artifacts: Mapping[str, FileArtifact | os.PathLike[str] | str], *, metadata: Optional[Mapping[str, Any]]=None) -> None

Source docstring:

text
Tracked external files/directories returned by an ``@tool.deliver`` function.

``artifacts`` maps stable logical names to :class:`FileArtifact` instances or path-like values.
The framework verifies each path, computes its content SHA-256, persists the records, and refuses
cache reuse after a tracked artifact is deleted or changed.

Example::

    return FileSetPayload({
        "project": FileArtifact(project_dir, role="SGeMS project"),
        "parameters": parameter_xml,
    }, metadata={"format": "sgems-review-v1"})

Implementation alias: lsd.flow.payload.FileSetPayload.

lsdtools.FileSetPayload.__init__#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:355.

Python
__init__(self, artifacts: Mapping[str, FileArtifact | os.PathLike[str] | str], *, metadata: Optional[Mapping[str, Any]]=None) -> None
Python
artifacts: Mapping[str, FileArtifact | os.PathLike[str] | str]
metadata: Optional[Mapping[str, Any]]
self: (unannotated)

lsdtools.FileSetPayload.artifacts#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:374.

Python
artifacts: (unannotated)
Python
artifacts = normalized

lsdtools.FileSetPayload.metadata#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:375.

Python
metadata: (unannotated)
Python
metadata = dict(metadata or {})

lsdtools.InputArtifact#

Kind: class. Source: core/lsd/src/lsd/tools/context.py:26.

Source docstring:

text
A declared, cache-tracked upstream file without materializing its table.

``@tool.shape`` and ``@tool.deliver`` parameters annotated ``InputArtifact``
are graph input ports, just like ``Table`` parameters.  The difference is
that the runtime passes the persisted artifact descriptor and leaves the
Parquet file unopened.  This lets a bounded-memory service scan the exact
artifact already produced by LSD::

    @tool.shape
    def summarize(blocks: InputArtifact) -> Table:
        backend = models.open_block_model(blocks)
        ...

The source path, size, and modification time are already part of the step's
resume-cache key.  ``fingerprint`` is a convenient stable identity for
service provenance; it is metadata identity, not a content hash.

Implementation alias: lsd.tools.context.InputArtifact.

Declared bases: os.PathLike[str].

lsdtools.InputArtifact.port#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:45.

Python
port: str

lsdtools.InputArtifact.path#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:46.

Python
path: str

lsdtools.InputArtifact.output_key#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:47.

Python
output_key: str

lsdtools.InputArtifact.source_step_id#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:48.

Python
source_step_id: Optional[str]
Python
source_step_id = None

lsdtools.InputArtifact.source_entity_id#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:49.

Python
source_entity_id: Optional[str]
Python
source_entity_id = None

lsdtools.InputArtifact.size_bytes#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:50.

Python
size_bytes: Optional[int]
Python
size_bytes = None

lsdtools.InputArtifact.mtime_ns#

Kind: attribute. Source: core/lsd/src/lsd/tools/context.py:51.

Python
mtime_ns: Optional[int]
Python
mtime_ns = None

lsdtools.InputArtifact.fingerprint#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:57.

Python
fingerprint(self) -> str
Python
self: (unannotated)

lsdtools.InputArtifact.open_parquet#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:72.

Python
open_parquet(self, *, scan_options: Any=None, filesystem: Any=None, partitioning: Any=None) -> Any
Python
filesystem: Any
partitioning: Any
scan_options: Any
self: (unannotated)

Source docstring:

text
Open this artifact for projected, bounded record-batch scans.

The artifact's cache-tracked fingerprint and producer coordinates are
carried into the returned dataset metadata.  Import stays lazy so a
process that never scans Parquet does not pay PyArrow startup cost.

lsdtools.LayerPayload#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:459.

Python
LayerPayload(self, *, kind: str='', tables: Optional[Dict[str, Any]]=None, style: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None

Source docstring:

text
A 3-D viewer geometry layer (``viewer/layer/set``).

``LayerPayload(kind="lines", tables={"path": lines}, style={"width": 1.5})`` folds ``kind`` /
``style`` (and any extra keyword) into ``spec``; ``tables`` carry the geometry Parquet(s).
A package may explicitly retain a layer-scoped editable dataset at zero
geometry with ``feature_kind=...`` and ``data_layer={"version": 1}`` plus
canonical ``tables={"path": ...}``; Viewer3D validates that closed marker.

Implementation alias: lsd.flow.payload.LayerPayload.

Declared bases: ViewerPayload.

lsdtools.LayerPayload.topic#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:469.

Python
topic = 'viewer/layer/set'

lsdtools.LayerPayload.__init__#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:471.

Python
__init__(self, *, kind: str='', tables: Optional[Dict[str, Any]]=None, style: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None
Python
extra: Any
kind: str
self: (unannotated)
spec: Optional[Dict[str, Any]]
style: Optional[Dict[str, Any]]
tables: Optional[Dict[str, Any]]

lsdtools.LegendPayload#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:503.

Python
LegendPayload(self, *, tables: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None

Source docstring:

text
A strict v1 colour legend (``viewer/legend/set``) — spec-only.

``spec`` contains exactly ``title``, canonical ``symbology``, ``value_col``, and nullable
``project_symbology`` provenance. See :func:`validate_legend_payload_spec` for the closed schema.

Implementation alias: lsd.flow.payload.LegendPayload.

Declared bases: ViewerPayload.

lsdtools.LegendPayload.topic#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:510.

Python
topic = 'viewer/legend/set'

lsdtools.LegendPayload.__init__#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:512.

Python
__init__(self, *, tables: Optional[Dict[str, Any]]=None, spec: Optional[Dict[str, Any]]=None, **extra: Any) -> None
Python
extra: Any
self: (unannotated)
spec: Optional[Dict[str, Any]]
tables: Optional[Dict[str, Any]]

lsdtools.OutputRef#

Kind: class. Source: core/lsd/src/lsd/core/output_ref.py:26.

Source docstring:

text
Versioned identity of one declared output port on one exact entity step.

Display names, step order, column names, and artifact paths are deliberately
absent.  They are mutable observations, not durable routing coordinates.

Implementation alias: lsd.core.output_ref.OutputRef.

lsdtools.OutputRef.entity_id#

Kind: attribute. Source: core/lsd/src/lsd/core/output_ref.py:33.

Python
entity_id: str

lsdtools.OutputRef.step_id#

Kind: attribute. Source: core/lsd/src/lsd/core/output_ref.py:34.

Python
step_id: str

lsdtools.OutputRef.output_port#

Kind: attribute. Source: core/lsd/src/lsd/core/output_ref.py:35.

Python
output_port: str
Python
output_port = 'output'

lsdtools.OutputRef.VERSION#

Kind: attribute. Source: core/lsd/src/lsd/core/output_ref.py:37.

Python
VERSION: ClassVar[int]
Python
VERSION = OUTPUT_REF_VERSION

lsdtools.OutputRef.to_dict#

Kind: method. Source: core/lsd/src/lsd/core/output_ref.py:44.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return the closed, JSON-compatible v1 document.

lsdtools.OutputRef.from_dict#

Kind: method. Source: core/lsd/src/lsd/core/output_ref.py:54.

Python
from_dict(cls, value: Mapping[str, Any]) -> OutputRef
Python
cls: (unannotated)
value: Mapping[str, Any]

Source docstring:

text
Validate and detach one exact v1 output-reference document.

lsdtools.PARQUET_WRITE_POLICY_VERSION#

Kind: value. Source: core/lsd/src/lsd/core/parquet.py:37.

Python
PARQUET_WRITE_POLICY_VERSION = 1

Implementation alias: lsd.core.parquet.PARQUET_WRITE_POLICY_VERSION.

lsdtools.PackageHost#

Kind: class. Source: core/lsd/src/lsd/packages/host.py:30.

Python
PackageHost(self, bus: Any=None, *, services: Optional[Dict[str, Callable]]=None) -> None

Source docstring:

text
Wraps an event bus and exposes optional host services to a package.

Service callables (all optional) are passed in ``services``:
  * ``engine``        : ``() -> Engine | None``     — the current project's engine
  * ``project_dir``   : ``() -> str | None``        — the open project's folder
  * ``notify``        : ``(message: str, level: str) -> None`` — surface a message
  * ``open_in_editor``: ``(path: str | None) -> None`` — open a file/folder in the editor
  * ``request_reload``: ``() -> None``              — ask the host to reload scripts

Implementation alias: lsd.packages.host.PackageHost.

lsdtools.PackageHost.__init__#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:41.

Python
__init__(self, bus: Any=None, *, services: Optional[Dict[str, Callable]]=None) -> None
Python
bus: Any
self: (unannotated)
services: Optional[Dict[str, Callable]]

lsdtools.PackageHost.wrap#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:56.

Python
wrap(cls, obj: Any, services: Optional[Dict[str, Callable]]=None) -> 'PackageHost'
Python
cls: (unannotated)
obj: Any
services: Optional[Dict[str, Callable]]

Source docstring:

text
Return a PackageHost for *obj*. If it's already a host, return it unchanged
(new *services* are added); otherwise wrap the bus.

lsdtools.PackageHost.for_package#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:75.

Python
for_package(self, package: str) -> '_PackageBoundHost'
Python
package: str
self: (unannotated)

Source docstring:

text
Return a permanent package-owned facade for runtime callbacks.

Unlike :meth:`mounting`, this retains ownership after mount returns, so late services and
subscriptions participate in disable, reload, and unmount lifecycle operations.

lsdtools.PackageHost.bus#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:84.

Python
bus(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The underlying event bus (or ``None``).

lsdtools.PackageHost.service#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:88.

Python
service(self, name: str, default: Any=None) -> Any
Python
default: Any
name: str
self: (unannotated)

Source docstring:

text
Resolve a named host service by calling its zero-arg provider.

Returns *default* when the service isn't provided or its provider raises. This is the
generic accessor behind the named properties (``engine``/``project_dir``); front-ends use
it for app-specific capabilities they register — e.g. ``host.service("cache")`` for a
shared package cache. Keeps the core generic (no gui/app names baked into these properties).

The front-end's constructor ``services`` take precedence; a package-registered provider
(:meth:`register_service`) resolves as a fallback.

lsdtools.PackageHost.register_service#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:112.

Python
register_service(self, name: str, provider: Callable, *, package: Optional[str]=None) -> None
Python
name: str
package: Optional[str]
provider: Callable
self: (unannotated)

Source docstring:

text
Register a named host service *provider* (a zero-arg callable) a package supplies.

Symmetric to :meth:`service` (consumption): a package can *provide* a handle other packages
resolve by name (e.g. a shared cache, a domain client). The provider is stored with its owning
*package* so :meth:`unregister_package_services` can drop exactly that package's providers on
disable/reload. One name has one owner and provider; replaying that exact declaration is
idempotent.

lsdtools.PackageHost.unregister_package_services#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:139.

Python
unregister_package_services(self, package: Optional[str]) -> None
Python
package: Optional[str]
self: (unannotated)

Source docstring:

text
Drop every service a *package* registered via :meth:`register_service`.

lsdtools.PackageHost.unmount_package#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:143.

Python
unmount_package(self, package: str) -> None
Python
package: str
self: (unannotated)

Source docstring:

text
Remove every runtime binding owned by *package*.

Disabling is reversible and therefore only gates bindings. Unmounting is the terminal
lifecycle boundary used by reload/removal: callbacks leave the bus, services disappear,
and no inactive marker survives to affect a later fresh mount.

lsdtools.PackageHost.mounting#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:158.

Python
mounting(self, package: str)
Python
package: str
self: (unannotated)

Source docstring:

text
Attribute subscriptions/services created while one package Tool mounts.

lsdtools.PackageHost.set_package_active#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:167.

Python
set_package_active(self, package: str, active: bool) -> None
Python
active: bool
package: str
self: (unannotated)

Source docstring:

text
Atomically gate a package's host services and event handlers.

lsdtools.PackageHost.snapshot_runtime_state#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:174.

Python
snapshot_runtime_state(self) -> dict
Python
self: (unannotated)

Source docstring:

text
Capture package-owned host state for an activation transaction.

lsdtools.PackageHost.restore_runtime_state#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:183.

Python
restore_runtime_state(self, state: dict) -> None
Python
self: (unannotated)
state: dict

Source docstring:

text
Restore the exact handler/service state captured by :meth:`snapshot_runtime_state`.

lsdtools.PackageHost.on#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:202.

Python
on(self, pattern: str, handler: Callable, priority: int=100) -> Any
Python
handler: Callable
pattern: str
priority: int
self: (unannotated)

lsdtools.PackageHost.off#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:225.

Python
off(self, pattern: str, handler: Callable) -> None
Python
handler: Callable
pattern: str
self: (unannotated)

lsdtools.PackageHost.emit#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:250.

Python
emit(self, *args: Any, **kwargs: Any) -> Any
Python
args: Any
kwargs: Any
self: (unannotated)

lsdtools.PackageHost.emit_collect#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:255.

Python
emit_collect(self, *args: Any, **kwargs: Any) -> Any
Python
args: Any
kwargs: Any
self: (unannotated)

lsdtools.PackageHost.engine#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:263.

Python
engine(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The current project's engine, or ``None`` if unavailable.

lsdtools.PackageHost.project_dir#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:275.

Python
project_dir(self) -> Optional[str]
Python
self: (unannotated)

Source docstring:

text
The open project's folder (where its ``.lsd`` and scripts live), or ``None``.

lsdtools.PackageHost.notify#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:286.

Python
notify(self, message: str, level: str='info') -> None
Python
level: str
message: str
self: (unannotated)

Source docstring:

text
Surface a short message to the user (falls back to logging).

lsdtools.PackageHost.open_in_editor#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:297.

Python
open_in_editor(self, path: Optional[str]=None) -> None
Python
path: Optional[str]
self: (unannotated)

Source docstring:

text
Ask the host to open *path* in the code editor (no-op if unsupported).

With no *path*, opens the project folder. A relative path resolves against it.

lsdtools.PackageHost.request_reload#

Kind: method. Source: core/lsd/src/lsd/packages/host.py:311.

Python
request_reload(self) -> None
Python
self: (unannotated)

Source docstring:

text
Ask the host to reload the project's scripts (no-op if unsupported).

lsdtools.ParquetDataset#

Kind: class. Source: core/lsd/src/lsd/core/parquet.py:392.

Python
ParquetDataset(self, source: Any, *, scan_options: ParquetScanOptions=ParquetScanOptions(), filesystem: Any=None, partitioning: Any=None, source_fingerprint: Optional[str]=None) -> None

Source docstring:

text
An unopened-until-scanned, projected and predicate-pushed dataset.

``source`` may be a Parquet file/directory, an :class:`InputArtifact`, or
an already constructed :class:`pyarrow.dataset.Dataset`.  Paths never call
``pyarrow.parquet.read_table`` and therefore never materialize the complete
source table.

Implementation alias: lsd.core.parquet.ParquetDataset.

lsdtools.ParquetDataset.__init__#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:403.

Python
__init__(self, source: Any, *, scan_options: ParquetScanOptions=ParquetScanOptions(), filesystem: Any=None, partitioning: Any=None, source_fingerprint: Optional[str]=None) -> None
Python
filesystem: Any
partitioning: Any
scan_options: ParquetScanOptions
self: (unannotated)
source: Any
source_fingerprint: Optional[str]

lsdtools.ParquetDataset.schema#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:508.

Python
schema(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The Arrow dataset schema, read from metadata without a row scan.

lsdtools.ParquetDataset.scan_batches#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:513.

Python
scan_batches(self, *, columns: Optional[Union[Sequence[str], Mapping[str, Any]]]=None, filter: Any=None, scan_options: Optional[ParquetScanOptions]=None, cancel: Any=None) -> Iterator[Any]
Python
cancel: Any
columns: Optional[Union[Sequence[str], Mapping[str, Any]]]
filter: Any
scan_options: Optional[ParquetScanOptions]
self: (unannotated)

Source docstring:

text
Yield projected record batches with an Arrow filter pushed down.

Build ``filter`` with :func:`pyarrow.dataset.field`; it is forwarded
unchanged so Parquet statistics and partition pruning remain available.
Cancellation is checked before scanner construction and at every batch
boundary.  It accepts ``threading.Event``, ``StepContext``, or a
zero-argument callable.

lsdtools.ParquetDataset.scan_options#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:480.

Python
scan_options: ParquetScanOptions
Python
scan_options = scan_options

lsdtools.ParquetDataset.metadata#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:481.

Python
metadata: (unannotated)
Python
metadata = ParquetSourceMetadata(source=str(Path(source_text).resolve()) if source_kind == 'parquet' and filesystem is None and Path(source_text).exists() else source_text, source_kind=source_kind, schema=dataset.schema, schema_digest=_schema_digest(dataset.schema), source_fingerprint=trusted_fingerprint or derived_fingerprint, source_fingerprint_semantics='LSD InputArtifact cache-tracked source identity; metadata fingerprint, not file content' if artifact_fingerprint is not None and source_fingerprint is None else 'caller-supplied trusted source identity' if source_fingerprint is not None else derived_semantics, fragments=len(fragments), physical_files=physical_files, physical_bytes=physical_bytes, **artifact)

lsdtools.ParquetScanCancelled#

Kind: class. Source: core/lsd/src/lsd/core/parquet.py:40.

Source docstring:

text
Raised at a record-batch boundary after cooperative cancellation.

Implementation alias: lsd.core.parquet.ParquetScanCancelled.

Declared bases: RuntimeError.

lsdtools.ParquetScanOptions#

Kind: class. Source: core/lsd/src/lsd/core/parquet.py:45.

Source docstring:

text
Memory and read-ahead bounds for an Arrow Dataset scan.

Arrow may use worker threads inside these bounds.  Defaults deliberately
retain only one decoded batch and one fragment of read-ahead, making the
contract safe for model-sized artifacts before a caller opts into a wider
throughput window.

Implementation alias: lsd.core.parquet.ParquetScanOptions.

lsdtools.ParquetScanOptions.batch_size#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:54.

Python
batch_size: int
Python
batch_size = 65536

lsdtools.ParquetScanOptions.batch_readahead#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:55.

Python
batch_readahead: int
Python
batch_readahead = 1

lsdtools.ParquetScanOptions.fragment_readahead#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:56.

Python
fragment_readahead: int
Python
fragment_readahead = 1

lsdtools.ParquetScanOptions.use_threads#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:57.

Python
use_threads: bool
Python
use_threads = True

lsdtools.ParquetSourceMetadata#

Kind: class. Source: core/lsd/src/lsd/core/parquet.py:72.

Source docstring:

text
Metadata identity and lineage for one opened Parquet dataset.

``source_fingerprint`` is intentionally explicit about its semantics.  A
local source uses resolved fragment paths, sizes, and mtimes; an
:class:`InputArtifact` uses the runtime's cache-tracked artifact identity.
Neither is advertised as a content hash.

Implementation alias: lsd.core.parquet.ParquetSourceMetadata.

lsdtools.ParquetSourceMetadata.source#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:81.

Python
source: str

lsdtools.ParquetSourceMetadata.source_kind#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:82.

Python
source_kind: str

lsdtools.ParquetSourceMetadata.schema#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:83.

Python
schema: Any

lsdtools.ParquetSourceMetadata.schema_digest#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:84.

Python
schema_digest: str

lsdtools.ParquetSourceMetadata.source_fingerprint#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:85.

Python
source_fingerprint: str

lsdtools.ParquetSourceMetadata.source_fingerprint_semantics#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:86.

Python
source_fingerprint_semantics: str

lsdtools.ParquetSourceMetadata.fragments#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:87.

Python
fragments: int

lsdtools.ParquetSourceMetadata.physical_files#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:88.

Python
physical_files: int

lsdtools.ParquetSourceMetadata.physical_bytes#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:89.

Python
physical_bytes: Optional[int]

lsdtools.ParquetSourceMetadata.artifact_port#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:90.

Python
artifact_port: Optional[str]
Python
artifact_port = None

lsdtools.ParquetSourceMetadata.artifact_output_key#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:91.

Python
artifact_output_key: Optional[str]
Python
artifact_output_key = None

lsdtools.ParquetSourceMetadata.source_step_id#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:92.

Python
source_step_id: Optional[str]
Python
source_step_id = None

lsdtools.ParquetSourceMetadata.source_entity_id#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:93.

Python
source_entity_id: Optional[str]
Python
source_entity_id = None

lsdtools.ParquetSourceMetadata.provenance_dict#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:95.

Python
provenance_dict(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Return a detached, JSON-compatible provenance record.

lsdtools.ParquetWritePolicy#

Kind: class. Source: core/lsd/src/lsd/core/parquet.py:115.

Source docstring:

text
One named, versioned Parquet physical-layout policy.

Logical schemas and public write APIs remain unchanged when the runtime
advances a physical policy.  ``policy_id`` is the stable value to record in
artifact manifests and benchmark results.

Implementation alias: lsd.core.parquet.ParquetWritePolicy.

lsdtools.ParquetWritePolicy.name#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:123.

Python
name: str

lsdtools.ParquetWritePolicy.version#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:124.

Python
version: int
Python
version = PARQUET_WRITE_POLICY_VERSION

lsdtools.ParquetWritePolicy.compression#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:125.

Python
compression: str
Python
compression = 'snappy'

lsdtools.ParquetWritePolicy.compression_level#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:126.

Python
compression_level: Optional[int]
Python
compression_level = None

lsdtools.ParquetWritePolicy.row_group_size#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:127.

Python
row_group_size: int
Python
row_group_size = 131072

lsdtools.ParquetWritePolicy.use_dictionary#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:128.

Python
use_dictionary: Union[bool, tuple[str, ...]]
Python
use_dictionary = True

lsdtools.ParquetWritePolicy.write_statistics#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:129.

Python
write_statistics: Union[bool, tuple[str, ...]]
Python
write_statistics = True

lsdtools.ParquetWritePolicy.use_byte_stream_split#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:130.

Python
use_byte_stream_split: Union[bool, tuple[str, ...]]
Python
use_byte_stream_split = False

lsdtools.ParquetWritePolicy.data_page_version#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:131.

Python
data_page_version: str
Python
data_page_version = '1.0'

lsdtools.ParquetWritePolicy.write_page_index#

Kind: attribute. Source: core/lsd/src/lsd/core/parquet.py:132.

Python
write_page_index: bool
Python
write_page_index = False

lsdtools.ParquetWritePolicy.policy_id#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:166.

Python
policy_id(self) -> str
Python
self: (unannotated)

lsdtools.ParquetWritePolicy.with_overrides#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:169.

Python
with_overrides(self, **changes: Any) -> 'ParquetWritePolicy'
Python
changes: Any
self: (unannotated)

Source docstring:

text
Return a validated policy variant without mutating the registry.

lsdtools.ParquetWritePolicy.write_options#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:174.

Python
write_options(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Arguments shared by ``pyarrow.parquet.write_table`` callers.

lsdtools.ParquetWritePolicy.writer_options#

Kind: method. Source: core/lsd/src/lsd/core/parquet.py:179.

Python
writer_options(self) -> dict[str, Any]
Python
self: (unannotated)

Source docstring:

text
Arguments shared by streaming ``ParquetWriter`` callers.

lsdtools.ProjectSemanticsCatalog#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:684.

Source docstring:

text
One immutable, atomically revisioned project semantics snapshot.

Implementation alias: lsd.project_semantics.ProjectSemanticsCatalog.

lsdtools.ProjectSemanticsCatalog.revision#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:687.

Python
revision: int
Python
revision = 0

lsdtools.ProjectSemanticsCatalog.concepts#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:688.

Python
concepts: tuple[VariableConcept, ...]
Python
concepts = ()

lsdtools.ProjectSemanticsCatalog.fields#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:689.

Python
fields: tuple[FieldDefinition, ...]
Python
fields = ()

lsdtools.ProjectSemanticsCatalog.styles#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:690.

Python
styles: tuple[StyleDefinition, ...]
Python
styles = ()

lsdtools.ProjectSemanticsCatalog.assignments#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:691.

Python
assignments: tuple[StyleAssignment, ...]
Python
assignments = ()

lsdtools.ProjectSemanticsCatalog.uses#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:692.

Python
uses: tuple[SymbologyUse, ...]
Python
uses = ()

lsdtools.ProjectSemanticsCatalog.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:693.

Python
version: int
Python
version = 1

lsdtools.ProjectSemanticsCatalog.empty#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:724.

Python
empty(cls) -> 'ProjectSemanticsCatalog'
Python
cls: (unannotated)

lsdtools.ProjectSemanticsCatalog.from_sections#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:728.

Python
from_sections(cls, variables: Mapping[str, Any] | None, symbology: Mapping[str, Any] | None) -> 'ProjectSemanticsCatalog'
Python
cls: (unannotated)
symbology: Mapping[str, Any] | None
variables: Mapping[str, Any] | None

lsdtools.ProjectSemanticsCatalog.from_document#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:751.

Python
from_document(cls, document: Mapping[str, Any]) -> 'ProjectSemanticsCatalog'
Python
cls: (unannotated)
document: Mapping[str, Any]

lsdtools.ProjectSemanticsCatalog.to_sections#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:756.

Python
to_sections(self) -> tuple[dict[str, Any], dict[str, Any]]
Python
self: (unannotated)

lsdtools.ProjectSemanticsCatalog.replace_contents#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:772.

Python
replace_contents(self, *, concepts: Iterable[VariableConcept] | None=None, fields: Iterable[FieldDefinition] | None=None, styles: Iterable[StyleDefinition] | None=None, assignments: Iterable[StyleAssignment] | None=None, uses: Iterable[SymbologyUse] | None=None) -> 'ProjectSemanticsCatalog'
Python
assignments: Iterable[StyleAssignment] | None
concepts: Iterable[VariableConcept] | None
fields: Iterable[FieldDefinition] | None
self: (unannotated)
styles: Iterable[StyleDefinition] | None
uses: Iterable[SymbologyUse] | None

Source docstring:

text
Build one validated candidate without advancing its base revision.

lsdtools.ProjectSemanticsCatalog.with_concept#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:804.

Python
with_concept(self, value: VariableConcept) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
value: VariableConcept

lsdtools.ProjectSemanticsCatalog.without_concept#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:809.

Python
without_concept(self, variable_id: str) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
variable_id: str

lsdtools.ProjectSemanticsCatalog.with_field#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:814.

Python
with_field(self, value: FieldDefinition) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
value: FieldDefinition

lsdtools.ProjectSemanticsCatalog.without_field#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:819.

Python
without_field(self, field_id: str) -> 'ProjectSemanticsCatalog'
Python
field_id: str
self: (unannotated)

lsdtools.ProjectSemanticsCatalog.with_style#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:824.

Python
with_style(self, value: StyleDefinition) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
value: StyleDefinition

lsdtools.ProjectSemanticsCatalog.without_style#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:829.

Python
without_style(self, style_id: str) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
style_id: str

lsdtools.ProjectSemanticsCatalog.with_assignment#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:834.

Python
with_assignment(self, value: StyleAssignment) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
value: StyleAssignment

lsdtools.ProjectSemanticsCatalog.without_assignment#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:841.

Python
without_assignment(self, assignment_id: str) -> 'ProjectSemanticsCatalog'
Python
assignment_id: str
self: (unannotated)

lsdtools.ProjectSemanticsCatalog.with_use#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:848.

Python
with_use(self, value: SymbologyUse) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
value: SymbologyUse

lsdtools.ProjectSemanticsCatalog.without_use#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:853.

Python
without_use(self, use_id: str) -> 'ProjectSemanticsCatalog'
Python
self: (unannotated)
use_id: str

lsdtools.ProjectSemanticsCatalog.concept#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:856.

Python
concept(self, variable_id: str) -> VariableConcept | None
Python
self: (unannotated)
variable_id: str

lsdtools.ProjectSemanticsCatalog.field_definition#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:859.

Python
field_definition(self, field_id: str) -> FieldDefinition | None
Python
field_id: str
self: (unannotated)

lsdtools.ProjectSemanticsCatalog.style#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:862.

Python
style(self, style_id: str) -> StyleDefinition | None
Python
self: (unannotated)
style_id: str

lsdtools.ProjectSemanticsCatalog.assignment#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:865.

Python
assignment(self, assignment_id: str) -> StyleAssignment | None
Python
assignment_id: str
self: (unannotated)

lsdtools.ProjectSemanticsCatalog.use#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:871.

Python
use(self, use_id: str) -> SymbologyUse | None
Python
self: (unannotated)
use_id: str

lsdtools.ProjectSemanticsRevisionError#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:58.

Source docstring:

text
A Workspace semantic mutation was based on a stale catalog revision.

Implementation alias: lsd.project_semantics.ProjectSemanticsRevisionError.

Declared bases: ValueError.

lsdtools.Reads#

Kind: class. Source: core/lsd/src/lsd/trip/view.py:43.

Python
Reads(self, *names: str) -> None

Source docstring:

text
Components a system reads (read-only views).

Implementation alias: lsd.trip.view.Reads.

lsdtools.Reads.names#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:45.

Python
names: Tuple[str, ...]

lsdtools.Reads.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:47.

Python
__init__(self, *names: str) -> None
Python
names: str
self: (unannotated)

lsdtools.RunResult#

Kind: class. Source: core/lsd/src/lsd/runtime/runner.py:184.

Python
RunResult(self, pipeline: PipelineResult) -> None

Source docstring:

text
The friendly result of ``Engine.run(<wired steps>)`` — wraps a :class:`PipelineResult`.

Exposes the terminal table as an ``lsd.table.Table`` and stays fluent::

    Engine().run(double(t=numbers())).print()          # console preview
    data = Engine().run(pipeline).output                # a Table
    for port, t in Engine().run(fanout).outputs.items(): ...

The wrapped :class:`PipelineResult` is available as :attr:`pipeline` for the
low-level view (``.step_results``, raw ``pa.Table`` via ``.pipeline.output``).

Implementation alias: lsd.runtime.runner.RunResult.

lsdtools.RunResult.__init__#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:199.

Python
__init__(self, pipeline: PipelineResult) -> None
Python
pipeline: PipelineResult
self: (unannotated)

lsdtools.RunResult.ok#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:203.

Python
ok(self) -> bool
Python
self: (unannotated)

lsdtools.RunResult.raise_on_error#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:206.

Python
raise_on_error(self) -> 'RunResult'
Python
self: (unannotated)

lsdtools.RunResult.output#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:211.

Python
output(self)
Python
self: (unannotated)

Source docstring:

text
The last step's primary output as a :class:`~lsd.table.Table` (or ``None``).

lsdtools.RunResult.outputs#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:220.

Python
outputs(self) -> dict
Python
self: (unannotated)

Source docstring:

text
The last producing step's outputs as ``{port: Table}`` (a Trip passes through as-is).

lsdtools.RunResult.artifacts#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:230.

Python
artifacts(self) -> dict
Python
self: (unannotated)

Source docstring:

text
Tracked files/directories delivered by the pipeline, keyed by logical name.

lsdtools.RunResult.print#

Kind: method. Source: core/lsd/src/lsd/runtime/runner.py:235.

Python
print(self, n: int=20) -> 'RunResult'
Python
n: int
self: (unannotated)

Source docstring:

text
Print a compact preview of the result to the console; returns self.

lsdtools.RunResult.pipeline#

Kind: attribute. Source: core/lsd/src/lsd/runtime/runner.py:200.

Python
pipeline: PipelineResult
Python
pipeline = pipeline

lsdtools.SchemaError#

Kind: class. Source: core/lsd/src/lsd/flow/steps.py:256.

Source docstring:

text
Raised when a step's output does not match its declared ``output_schema``.

Implementation alias: lsd.flow.steps.SchemaError.

Declared bases: ValueError.

lsdtools.Source#

Kind: class. Source: core/lsd/src/lsd/tools/source.py:57.

Python
Source(self, spec: str='', step: Any=None) -> None

Source docstring:

text
The source a ``@tool.load`` reads from (see the module docstring).

Implementation alias: lsd.tools.source.Source.

lsdtools.Source.__init__#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:62.

Python
__init__(self, spec: str='', step: Any=None) -> None
Python
self: (unannotated)
spec: str
step: Any

lsdtools.Source.file#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:68.

Python
file(cls, *paths: Any, folder: str='', patterns: str='', combine: str='concat') -> 'Source'
Python
cls: (unannotated)
combine: str
folder: str
paths: Any
patterns: str

lsdtools.Source.sql#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:74.

Python
sql(cls, db: Any, query: str) -> 'Source'
Python
cls: (unannotated)
db: Any
query: str

lsdtools.Source.of#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:79.

Python
of(cls, kind: str, **config: Any) -> 'Source'
Python
cls: (unannotated)
config: Any
kind: str

Source docstring:

text
A source of any registered *kind* with its config fields (e.g. a custom ``rest-api`` kind).

lsdtools.Source.spec#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:85.

Python
spec(self) -> str
Python
self: (unannotated)

Source docstring:

text
The serialized JSON spec (from the bound step's ``source`` param, or this value's).

lsdtools.Source.read#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:91.

Python
read(self) -> Any
Python
self: (unannotated)

Source docstring:

text
Read the source into a :class:`~lsd.table.Table`.

lsdtools.Source.paths#

Kind: method. Source: core/lsd/src/lsd/tools/source.py:102.

Python
paths(self) -> List[str]
Python
self: (unannotated)

Source docstring:

text
Resolved file paths (file kinds) or ``[]``.

lsdtools.StepContext#

Kind: class. Source: core/lsd/src/lsd/tools/context.py:113.

Python
StepContext(self, step: Any) -> None

Source docstring:

text
Declared-input and cache-neutral capabilities available inside a step's ``run``.

Declare it by annotating a ``run`` parameter ``StepContext``::

    @tool.shape
    def heavy(t: Table, ctx: StepContext) -> Table:
        ctx.progress(0.5, "halfway")
        if ctx.cancelled:
            return t
        ...

Implementation alias: lsd.tools.context.StepContext.

lsdtools.StepContext.__init__#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:128.

Python
__init__(self, step: Any) -> None
Python
self: (unannotated)
step: Any

lsdtools.StepContext.require_capability#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:146.

Python
require_capability(self, name: str) -> Any
Python
name: str
self: (unannotated)

Source docstring:

text
Resolve a declared, explicitly supplied run capability while this step runs.

Such steps are never served from cache. The capability is not persisted,
inferred from the project, or inherited from an unrelated execution.

lsdtools.StepContext.progress#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:162.

Python
progress(self, fraction: float, message: str='') -> None
Python
fraction: float
message: str
self: (unannotated)

Source docstring:

text
Report progress in ``[0, 1]`` (best-effort; emits a step-progress event if a bus is set).

lsdtools.StepContext.cancelled#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:194.

Python
cancelled(self) -> bool
Python
self: (unannotated)

Source docstring:

text
True if a cancellation was requested for this run.

lsdtools.StepContext.step_id#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:207.

Python
step_id(self) -> Optional[str]
Python
self: (unannotated)

Source docstring:

text
This step's id (read-only — for keying emitted events, never for reading cached state).

lsdtools.StepContext.entity_id#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:212.

Python
entity_id(self) -> Optional[str]
Python
self: (unannotated)

Source docstring:

text
The owning entity's id (read-only — for keying emitted events).

lsdtools.StepContext.set_output#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:217.

Python
set_output(self, name: str, value: Any) -> None
Python
name: str
self: (unannotated)
value: Any

Source docstring:

text
Record a read-only graph-scalar output (declared via ``@tool.<kind>(graph_outputs=…)``).

These are ``output=True`` params — excluded from the cache key and emitted in STEP_FINISHED,
so setting them never affects resume caching.

lsdtools.StepContext.input_artifact#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:227.

Python
input_artifact(self, port: str='main') -> InputArtifact
Python
port: str
self: (unannotated)

Source docstring:

text
Return a declared bound input without reading its Parquet contents.

Artifact metadata is cache-visible because every bound input is included
in the owning step's parameter hash.  A clear error is raised when the
port is not explicitly bound or its upstream output is unavailable.

lsdtools.StepContext.input_path#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:240.

Python
input_path(self, port: str='main') -> str
Python
port: str
self: (unannotated)

Source docstring:

text
Convenience spelling for ``input_artifact(port).path``.

lsdtools.StepContext.emit#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:245.

Python
emit(self, topic: str, **data: Any) -> None
Python
data: Any
self: (unannotated)
topic: str

Source docstring:

text
Emit an event on the engine's bus (e.g. ``viewer/chart/set``) — a cache-neutral side effect.

Routes through the canonical sync→async bridge; best-effort (never fails the step).

lsdtools.StepContext.output_dir#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:258.

Python
output_dir(self) -> str
Python
self: (unannotated)

Source docstring:

text
The step's workspace output directory (where a deliver writes its artifacts).

lsdtools.StepContext.scratch_dir#

Kind: method. Source: core/lsd/src/lsd/tools/context.py:263.

Python
scratch_dir(self) -> str
Python
self: (unannotated)

Source docstring:

text
A private temporary directory for this step (created lazily).

lsdtools.StyleAssignment#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:590.

Source docstring:

text
One shared variable-to-style binding and its explicit domain policy.

The mapping itself lives in the style's canonical document (literal breaks, stops or
categories); the domain policy records which range authority those breaks were fitted to.

Implementation alias: lsd.project_semantics.StyleAssignment.

lsdtools.StyleAssignment.assignment_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:597.

Python
assignment_id: str

lsdtools.StyleAssignment.variable_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:598.

Python
variable_id: str

lsdtools.StyleAssignment.style_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:599.

Python
style_id: str

lsdtools.StyleAssignment.domain#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:600.

Python
domain: DomainPolicy | Mapping[str, Any]

lsdtools.StyleAssignment.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:601.

Python
version: int
Python
version = 1

lsdtools.StyleAssignment.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:616.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'StyleAssignment'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.StyleAssignment.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:626.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.StyleDefinition#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:538.

Source docstring:

text
Named project appearance: one complete canonical symbology document.

Implementation alias: lsd.project_semantics.StyleDefinition.

lsdtools.StyleDefinition.style_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:541.

Python
style_id: str

lsdtools.StyleDefinition.label#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:542.

Python
label: str

lsdtools.StyleDefinition.symbology#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:543.

Python
symbology: Mapping[str, Any] | Symbology

lsdtools.StyleDefinition.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:544.

Python
version: int
Python
version = 1

lsdtools.StyleDefinition.symbology_document#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:565.

Python
symbology_document(self) -> Symbology
Python
self: (unannotated)

lsdtools.StyleDefinition.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:571.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'StyleDefinition'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.StyleDefinition.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:580.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.SymbologyUse#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:637.

Source docstring:

text
One visualization's field and the shared assignment it draws through.

Implementation alias: lsd.project_semantics.SymbologyUse.

lsdtools.SymbologyUse.use_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:640.

Python
use_id: str

lsdtools.SymbologyUse.field_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:641.

Python
field_id: str

lsdtools.SymbologyUse.assignment_id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:642.

Python
assignment_id: str

lsdtools.SymbologyUse.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:643.

Python
version: int
Python
version = 1

lsdtools.SymbologyUse.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:652.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'SymbologyUse'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.SymbologyUse.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:661.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.Table#

Kind: class. Source: core/lsd/src/lsd/table/table.py:121.

Python
Table(self, data: Any=None, /, **columns: Any) -> None

Source docstring:

text
An immutable, zero-copy view over one ``pyarrow.Table``.

Every verb returns a new ``Table`` (or a ``Column``); nothing mutates in place and nothing
iterates rows in Python. Reach the raw table with :attr:`arrow`.

Implementation alias: lsd.table.table.Table.

lsdtools.Table.__init__#

Kind: method. Source: core/lsd/src/lsd/table/table.py:130.

Python
__init__(self, data: Any=None, /, **columns: Any) -> None
Python
columns: Any
data: Any
self: (unannotated)

Source docstring:

text
Build a Table from *data* — a dict of columns, a ``pa.Table``, a list of row dicts, a
pandas ``DataFrame``, or another ``Table`` (rewrapped, sharing its arrow table). With no
positional arg, keyword columns are used: ``Table(x=[1, 2], y=[3, 4])``.

lsdtools.Table.read_csv#

Kind: method. Source: core/lsd/src/lsd/table/table.py:156.

Python
read_csv(cls, path, delimiter: str=',', header: bool=True) -> 'Table'
Python
cls: (unannotated)
delimiter: str
header: bool
path: (unannotated)

Source docstring:

text
Read a CSV/TSV file into a :class:`Table`.

lsdtools.Table.read_parquet#

Kind: method. Source: core/lsd/src/lsd/table/table.py:164.

Python
read_parquet(cls, path) -> 'Table'
Python
cls: (unannotated)
path: (unannotated)

Source docstring:

text
Read a Parquet file into a :class:`Table`.

lsdtools.Table.arrow#

Kind: method. Source: core/lsd/src/lsd/table/table.py:171.

Python
arrow(self)
Python
self: (unannotated)

Source docstring:

text
The underlying ``pyarrow.Table`` (zero-copy).

lsdtools.Table.schema#

Kind: method. Source: core/lsd/src/lsd/table/table.py:176.

Python
schema(self)
Python
self: (unannotated)

lsdtools.Table.columns#

Kind: method. Source: core/lsd/src/lsd/table/table.py:180.

Python
columns(self) -> list
Python
self: (unannotated)

lsdtools.Table.__getitem__#

Kind: method. Source: core/lsd/src/lsd/table/table.py:189.

Python
__getitem__(self, name: str) -> Column
Python
name: str
self: (unannotated)

lsdtools.Table.with_column#

Kind: method. Source: core/lsd/src/lsd/table/table.py:193.

Python
with_column(self, name: str, value: Any) -> 'Table'
Python
name: str
self: (unannotated)
value: Any

Source docstring:

text
Add or replace column *name* with *value* (a ``Column`` or a pyarrow array).

lsdtools.Table.filter#

Kind: method. Source: core/lsd/src/lsd/table/table.py:200.

Python
filter(self, mask: Any) -> 'Table'
Python
mask: Any
self: (unannotated)

Source docstring:

text
Keep rows where *mask* (a bool ``Column``) is True.

lsdtools.Table.select#

Kind: method. Source: core/lsd/src/lsd/table/table.py:204.

Python
select(self, *names: Any) -> 'Table'
Python
names: Any
self: (unannotated)

Source docstring:

text
Keep only the named columns (in the given order).

lsdtools.Table.drop#

Kind: method. Source: core/lsd/src/lsd/table/table.py:209.

Python
drop(self, *names: str) -> 'Table'
Python
names: str
self: (unannotated)

Source docstring:

text
Drop the named columns.

lsdtools.Table.rename#

Kind: method. Source: core/lsd/src/lsd/table/table.py:214.

Python
rename(self, mapping: Mapping[str, str]) -> 'Table'
Python
mapping: Mapping[str, str]
self: (unannotated)

Source docstring:

text
Rename columns via ``{old: new}`` (unlisted columns are unchanged).

lsdtools.Table.sort#

Kind: method. Source: core/lsd/src/lsd/table/table.py:218.

Python
sort(self, by: Any, descending: bool=False) -> 'Table'
Python
by: Any
descending: bool
self: (unannotated)

Source docstring:

text
Sort by one column name or a list of them.

lsdtools.Table.head#

Kind: method. Source: core/lsd/src/lsd/table/table.py:224.

Python
head(self, n: int=5) -> 'Table'
Python
n: int
self: (unannotated)

Source docstring:

text
The first *n* rows.

lsdtools.Table.join#

Kind: method. Source: core/lsd/src/lsd/table/table.py:228.

Python
join(self, other: 'Table', on: Any, how: str='inner') -> 'Table'
Python
how: str
on: Any
other: 'Table'
self: (unannotated)

Source docstring:

text
Join with *other* on a key column (or list of them).

lsdtools.Table.group_by#

Kind: method. Source: core/lsd/src/lsd/table/table.py:233.

Python
group_by(self, *keys: Any) -> _GroupBy
Python
keys: Any
self: (unannotated)

Source docstring:

text
Group by one or more columns; chain :meth:`_GroupBy.agg`.

lsdtools.Table.null_report#

Kind: method. Source: core/lsd/src/lsd/table/table.py:238.

Python
null_report(self) -> 'Table'
Python
self: (unannotated)

Source docstring:

text
A small table of ``column | nulls | pct`` — one row per column.

lsdtools.Table.to_pylist#

Kind: method. Source: core/lsd/src/lsd/table/table.py:249.

Python
to_pylist(self) -> list
Python
self: (unannotated)

Source docstring:

text
A list of row dicts (materializes into Python — preview/small tables only).

lsdtools.Table.to_dicts#

Kind: attribute. Source: core/lsd/src/lsd/table/table.py:253.

Python
to_dicts = to_pylist

lsdtools.Table.write_parquet#

Kind: method. Source: core/lsd/src/lsd/table/table.py:255.

Python
write_parquet(self, path, compression: str='snappy')
Python
compression: str
path: (unannotated)
self: (unannotated)

lsdtools.Table.write_csv#

Kind: method. Source: core/lsd/src/lsd/table/table.py:260.

Python
write_csv(self, path)
Python
path: (unannotated)
self: (unannotated)

lsdtools.Table.print#

Kind: method. Source: core/lsd/src/lsd/table/table.py:265.

Python
print(self, n: int=20) -> 'Table'
Python
n: int
self: (unannotated)

Source docstring:

text
Print a compact preview of the first *n* rows to the console; returns self.

lsdtools.Table.preview#

Kind: method. Source: core/lsd/src/lsd/table/table.py:270.

Python
preview(self, n: int=20) -> str
Python
n: int
self: (unannotated)

Source docstring:

text
The aligned-ASCII preview of the first *n* rows (header + rule + rows + "… N more rows").

The canonical headless/text form of a table — used by the console ``print()`` and by the
table widget's ``to_text()``.

lsdtools.ToDisk#

Kind: class. Source: core/lsd/src/lsd/flow/trip_steps.py:407.

Source docstring:

text
Project a Trip back to a table (the tier's explicit exit -- profiled and written).

A plain Shape: its output is an ordinary table port, profiled and written to parquet exactly
like any Shape, so everything downstream sees an ordinary table again.  It reads the Trip off
the sequential ``trip`` port; vector components become scalar columns (``name.0`` ...).

Named for the boundary, not the conversion: what matters to a reader is that the data stops
being resident here.  A deliver reading the Trip directly is the other exit, and does not.

Implementation alias: lsd.flow.trip_steps.ToDisk.

Declared bases: ShapeStep.

lsdtools.ToDisk.input_ports#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:418.

Python
input_ports: ClassVar[List[str]]
Python
input_ports = [TRIP_PORT]

lsdtools.ToDisk.output_ports#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:419.

Python
output_ports: ClassVar[List[str]]
Python
output_ports = [OUTPUT_KEY]

lsdtools.ToDisk.columns#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:421.

Python
columns = param(str, default='', label='Columns', description='Comma-separated components to project (blank = all).')

lsdtools.ToDisk.run#

Kind: method. Source: core/lsd/src/lsd/flow/trip_steps.py:424.

Python
run(self, inputs: Tables) -> Any
Python
inputs: Tables
self: (unannotated)

lsdtools.ToMemory#

Kind: class. Source: core/lsd/src/lsd/flow/trip_steps.py:354.

Source docstring:

text
Bridge a loaded table into an in-memory Trip (the tier's entry point).

Its input is an ordinary ``main`` table (not a Trip); it declares no component access.  It
reads the table, mints a Trip, and hands it on -- so ``Load -> ToMemory -> System* -> ToDisk``
is one ordinary entity whose middle steps never touch the disk.

Implementation alias: lsd.flow.trip_steps.ToMemory.

Declared bases: SystemStep.

lsdtools.ToMemory.input_ports#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:363.

Python
input_ports: ClassVar[List[str]]
Python
input_ports = ['main']

lsdtools.ToMemory.output_ports#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:364.

Python
output_ports: ClassVar[List[str]]
Python
output_ports = [TRIP_PORT]

lsdtools.ToMemory.id_column#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:366.

Python
id_column = param(str, default='', label='Id column', description='Integer column to use as the entity id (blank = the row index).')

lsdtools.ToMemory.components#

Kind: attribute. Source: core/lsd/src/lsd/flow/trip_steps.py:368.

Python
components = param(str, default='', label='Components', description='Comma-separated columns to carry (blank = all).')

lsdtools.Tool#

Kind: class. Source: core/lsd/src/lsd/tools/tool.py:826.

Python
Tool(self, name: str, *, label: Optional[str]=None) -> None

Source docstring:

text
Declares a package's node types via decorators. Create one at module scope.

Implementation alias: lsd.tools.tool.Tool.

lsdtools.Tool.__init__#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:829.

Python
__init__(self, name: str, *, label: Optional[str]=None) -> None
Python
label: Optional[str]
name: str
self: (unannotated)

lsdtools.Tool.load#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:928.

Python
load(self, fn: Optional[Callable]=None, *, outputs: Optional[List[str]]=None, graph_outputs: Optional[dict]=None, source_kinds: Optional[tuple]=None, overrides: Optional[str]=None, override_mode: str='replace', addable: bool=True, capabilities: tuple[str, ...]=())
Python
addable: bool
capabilities: tuple[str, ...]
fn: Optional[Callable]
graph_outputs: Optional[dict]
outputs: Optional[List[str]]
override_mode: str
overrides: Optional[str]
self: (unannotated)
source_kinds: Optional[tuple]

Source docstring:

text
Declare a data-loading step (produces a ``Table`` from nothing / a file / a source).

``outputs=["a", "b"]`` declares named output ports (the function returns ``{"a": Table, …}``,
selected downstream via ``step.output("a")``). ``graph_outputs={"n_rows": int}`` declares
read-only scalars set via ``ctx.set_output(...)``. A ``src: Source`` parameter injects a reader;
``source_kinds=("file", "sql", …)`` narrows the source picker to those kinds.
``overrides="pkg.node"`` makes this a drop-in variant of another package's node (``override_mode``
``"replace"`` = win the identity by default; ``"coexist"`` = both stay available).
``addable=False`` keeps an internal node registered for restore/run while omitting it from
shared Add Step catalogs.

lsdtools.Tool.source#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:949.

Python
source(self, kind: str, *, label: str='', config: Any=None)
Python
config: Any
kind: str
label: str
self: (unannotated)

Source docstring:

text
Register a custom source kind on ``read(cfg)``::

    @tool.source("rest-api", config={"url": param(str), "token": param(str, widget="password")})
    def read_rest(cfg): ...   # cfg is {"url": ..., "token": ...}

``config`` is a ``{name: param(...)}`` mapping (or a ``Configurable`` subclass); its field
values are passed to the function as a dict, and it returns a ``Table``. The kind then appears
in every source picker (and a load can offer it via ``source_kinds=(...)``).

lsdtools.Tool.shape#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:964.

Python
shape(self, fn: Optional[Callable]=None, *, outputs: Optional[List[str]]=None, graph_outputs: Optional[dict]=None, overrides: Optional[str]=None, override_mode: str='replace', addable: bool=True)
Python
addable: bool
fn: Optional[Callable]
graph_outputs: Optional[dict]
outputs: Optional[List[str]]
override_mode: str
overrides: Optional[str]
self: (unannotated)

Source docstring:

text
Declare a transform step (one or more ``Table`` input ports → a ``Table`` or named outputs).

``overrides="pkg.node"`` makes this a drop-in variant of another package's node
(``override_mode`` ``"replace"`` wins the identity by default; ``"coexist"`` keeps both).
``addable=False`` keeps an internal node registered for restore/run while omitting it from
shared Add Step catalogs.

lsdtools.Tool.deliver#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:980.

Python
deliver(self, fn: Optional[Callable]=None, *, outputs: Optional[List[str]]=None, graph_outputs: Optional[dict]=None, overrides: Optional[str]=None, override_mode: str='replace', addable: bool=True, capabilities: tuple[str, ...]=())
Python
addable: bool
capabilities: tuple[str, ...]
fn: Optional[Callable]
graph_outputs: Optional[dict]
outputs: Optional[List[str]]
override_mode: str
overrides: Optional[str]
self: (unannotated)

Source docstring:

text
Declare a delivery/export step (a ``Table`` input port → a side effect or artifact).

A deliver may return a :class:`~lsd.flow.payload.FileSetPayload` to content-hash and
cache-track exported files/directories. It may instead return a
:class:`~lsd.flow.payload.ViewerPayload` to SHOW a result: the framework persists it (a
``*_payload.json`` sidecar) and emits it to whatever view
:meth:`~lsd.core.view.View.watch`\es the entity. The three viewer built-ins are
``LayerPayload`` (3-D geometry), ``ChartPayload`` (a chart), and ``LegendPayload`` (a
legend); an untracked side-effect deliver returns nothing.

``overrides="pkg.node"`` makes this a drop-in variant of another package's node.
``addable=False`` keeps an internal node registered for restore/run while omitting it from
shared Add Step catalogs.

lsdtools.Tool.system#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1003.

Python
system(self, fn: Optional[Callable]=None, *, reads: 'tuple | list | str'=(), writes: 'tuple | list | str'=(), creates: 'tuple | list'=(), inplace: bool=False, chunk_rows: int=65536, parallel: str='none', addable: bool=True)
Python
addable: bool
chunk_rows: int
creates: 'tuple | list'
fn: Optional[Callable]
inplace: bool
parallel: str
reads: 'tuple | list | str'
self: (unannotated)
writes: 'tuple | list | str'

Source docstring:

text
Declare a high-performance **Trip system** (``lsd.trip``): the advanced tier.

A system transforms declared components of an in-memory Trip with no parquet between
systems.  The first parameter is the surface::

    @tool.system(reads=("x", "vx"), writes=("x",), parallel="threads")
    def integrate(c: Chunk, dt: float = 0.1) -> None:
        c.out["x"][:] = c["x"] + dt * c["vx"]     # a chunk kernel, run chunk-parallel

    @tool.system(reads=("x",), writes=("x",))
    def clamp(view: TripView) -> None:            # a whole-Trip system
        view.out("x")[:] = view["x"].clip(0.0, 1.0)

``reads``/``writes`` name existing components; ``creates`` declares new ones (each a
:class:`Component`, e.g. a float32 render mirror); ``inplace=True`` writes the Trip's own
buffer.  Wire it into an entity between the two bridge steps — ``ToMemory`` after a
``@tool.load``, then any number of systems, then ``ToDisk`` (or a ``@tool.deliver`` that
takes a ``Trip`` parameter, which reads it straight from memory and never writes it).

``parallel`` defaults to ``"none"`` **on purpose**.  A streaming kernel (the common ECS
shape: read a couple of components, write one) is memory-bandwidth bound, and one core
already saturates most of the bus -- measured, threads make it *2.4x slower*.  Pass
``parallel="threads"`` only when the kernel does heavy arithmetic per byte (transcendental
or iterative math), where it measures ~2.9x faster.  See ``lsd.trip.scheduler`` for the
numbers and ``benchmarks/trip_v1.py`` to re-measure on your machine.

lsdtools.Tool.group#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1066.

Python
group(self, *members: Any, name: str='system_group', label: Optional[str]=None, addable: bool=True)
Python
addable: bool
label: Optional[str]
members: Any
name: str
self: (unannotated)

Source docstring:

text
Compose member systems into one :class:`SystemGroupStep` (DOTS' SystemGroup).

``physics = tool.group(integrate, mirror)`` builds a step that runs ``integrate`` then
``mirror`` once per ``tick`` over one Trip.  The members are ``@tool.system`` factories.

EXPERIMENTAL, and not part of the published Trip surface: nothing in the product
authors a group yet, so this verb and :class:`SystemGroupStep` (its only constructor)
are unreleased.  It is deliberately absent from ``lsd``'s and ``lsdtools``' exports —
the live-preview path (``preview_every``) in particular has never had a subscriber.
Treat the shape as provisional until a Trip lane adopts it.

lsdtools.Tool.entity#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1100.

Python
entity(self, target: Any=None, *, label: Optional[str]=None, icon: str='lsd-folder-symbolic')
Python
icon: str
label: Optional[str]
self: (unannotated)
target: Any

Source docstring:

text
Declare a creatable entity type.

On a **builder function** ``def drillholes(collar: str, survey: str) -> <terminal step>`` the
signature becomes the entity's declarative parameters; the body runs once at creation to wire
the child steps. On a **hand-written ``Entity`` subclass** it just registers the type
(attribution + wizard interop), returning it unchanged.

lsdtools.Tool.command#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1126.

Python
command(self, name: str, *, help: str='')
Python
help: str
name: str
self: (unannotated)

Source docstring:

text
Declare a global ``lsd <name>`` CLI command from a typed function (zero argparse).

lsdtools.Tool.action#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1133.

Python
action(self, route: str)
Python
route: str
self: (unannotated)

Source docstring:

text
Register a semantic Tool route (``entity/<type>/<verb>`` or a private route).

The function is ``(ctx: Context, **values)`` and is reachable through
:meth:`dispatch`. A :class:`TreeCommandSpec` may bind the route into an
entity-tree surface; compact app-logo commands use :meth:`menu_item`, and
wire actions use ``lsd_actions``.

lsdtools.Tool.template#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1147.

Python
template(self, template_id: str, *, label: str, extensions: tuple, roles: Any=(), params: Optional[type]=None, preview: str='auto', priority: int=0, icon: Optional[str]=None, sniff: Optional[Callable]=None, present_in: Optional[str]=None, present_command: Optional[str]=None)
Python
extensions: tuple
icon: Optional[str]
label: str
params: Optional[type]
present_command: Optional[str]
present_in: Optional[str]
preview: str
priority: int
roles: Any
self: (unannotated)
sniff: Optional[Callable]
template_id: str

Source docstring:

text
Declare a data-import template: dropped file(s) → a pre-wired entity (the wizard's unit).

The build function is ``(ctx: Context, files, name=None) -> Entity`` — ``files["role"]`` /
``files.main`` are the dropped files; typically it calls an ``@tool.entity`` factory's
``.build(...)``. ``roles=[FileRole(...)]`` declares the data slots (columns the wizard maps).
``present_in`` optionally names a stable main-view kind for best-effort Desktop presentation
after commit; it has no effect on headless imports and never activates that view's package.
``present_command`` optionally names a command action owned by that view. Desktop invokes it
once, after the imported entity's first geometry layer is present in the exact bound view.

lsdtools.Tool.viewer_extension#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1172.

Python
viewer_extension(self, spec: ViewerExtensionSpec) -> ViewerExtensionSpec
Python
self: (unannotated)
spec: ViewerExtensionSpec

Source docstring:

text
Contribute one frozen viewer-extension contract.

This is intentionally a direct declaration rather than a decorator:
factories and handlers belong inside ``spec``, and the qualified ids make
its package ownership explicit.  :meth:`mount` validates that ownership
against the package manifest before anything reaches the live registry.

lsdtools.Tool.dataset_editor#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1190.

Python
dataset_editor(self, spec: DatasetEditorSpec) -> DatasetEditorSpec
Python
self: (unannotated)
spec: DatasetEditorSpec

Source docstring:

text
Contribute one frozen, callback-free dataset editor contract.

Packages declare entity/output identity, typed columns, stable keys,
and an adapter operation.  Desktop and data views own the editing
runtime; this Tool only mounts the declaration into the project-scoped
contribution catalog.

lsdtools.Tool.object_type#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1208.

Python
object_type(self, spec: ObjectTypeSpec) -> ObjectTypeSpec
Python
self: (unannotated)
spec: ObjectTypeSpec

Source docstring:

text
Contribute one canonical, renderer-neutral selected-object type.

lsdtools.Tool.object_property_section#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1221.

Python
object_property_section(self, spec: ObjectPropertySectionSpec) -> ObjectPropertySectionSpec
Python
self: (unannotated)
spec: ObjectPropertySectionSpec

Source docstring:

text
Contribute one callback-free section to an exact object type.

The target object type may be owned by a dependency.  The section id
itself must belong to this Tool's mounting package, which is validated
by :meth:`mount`.

lsdtools.Tool.object_explorer#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1242.

Python
object_explorer(self, spec: ObjectExplorerSpec) -> ObjectExplorerSpec
Python
self: (unannotated)
spec: ObjectExplorerSpec

Source docstring:

text
Contribute one callback-free tab for an exact object type.

lsdtools.Tool.object_context_action#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1255.

Python
object_context_action(self, spec: ObjectContextActionSpec) -> ObjectContextActionSpec
Python
self: (unannotated)
spec: ObjectContextActionSpec

Source docstring:

text
Contribute a context placement for an exact same-package Viewer command.

The declaration remains callback-free.  The active Viewer extension
plan resolves the exact command id before the Object Explorer exposes
it, so declaration order does not select a winner.

lsdtools.Tool.tree_extension#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1276.

Python
tree_extension(self, spec: TreeExtensionSpec) -> TreeExtensionSpec
Python
self: (unannotated)
spec: TreeExtensionSpec

Source docstring:

text
Contribute one frozen entity-tree extension contract.

A tree command may name an existing :meth:`action` route instead of
carrying a presentation callback.  It is bound here once to the Tool's
semantic handler, leaving ``Entity`` free of UI placement metadata.

lsdtools.Tool.status_extension#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1321.

Python
status_extension(self, spec: StatusExtensionSpec) -> StatusExtensionSpec
Python
self: (unannotated)
spec: StatusExtensionSpec

Source docstring:

text
Contribute one frozen, renderer-neutral status/content contract.

lsdtools.Tool.main_view#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1333.

Python
main_view(self, kind: str, title: Optional[str]=None, *, icon: Optional[str]=None, instance_policy: str='reusable', binding_cardinality: str='none', accepts_entity: Optional[Callable[[Any], bool]]=None, route_parameter: Optional[str]=None, default_open: bool=False, deliver_entity: Optional[Callable[..., Any]]=None)
Python
accepts_entity: Optional[Callable[[Any], bool]]
binding_cardinality: str
default_open: bool
deliver_entity: Optional[Callable[..., Any]]
icon: Optional[str]
instance_policy: str
kind: str
route_parameter: Optional[str]
self: (unannotated)
title: Optional[str]

Source docstring:

text
Contribute a main-view **kind** (an editor-area view template) → a :class:`MainViewType`.

The decorated factory is ``(host, *, entity=None, view_id: str) -> widget | View |``
``ViewPresentation`` (gui-side; it
imports GTK lazily in its body — the sanctioned escape hatch, like :meth:`contribute`). Unlike
:meth:`view`, this returns a raw toolkit widget, not a ``View`` — it is how a package registers
a whole main-view kind (a 3-D viewer, a code editor). ``ViewPresentation`` pairs a bespoke
widget with the ordinary ``View`` parameter/action model. ``instance_policy`` is ``"single"``,
``"reusable"`` (the default), or ``"per_entity"``; it is the complete identity/reuse
contract. A ``per_entity`` view may declare one required ``route_parameter``; the manager
encodes that string after the entity id and passes it to the factory by keyword.
``accepts_entity`` is the sole entity-applicability predicate and is independent
of binding cardinality. A non-``"none"`` ``binding_cardinality`` enables live-binding drops;
``deliver_entity=(widget, entity) -> None`` is the mutually exclusive one-shot drop hook for
cardinality-``"none"`` views. ``default_open`` is the only activation-time opening signal.
Active non-``"per_entity"`` kinds appear as plain Activity Bar **Add View** commands;
repeated additions allocate fresh instances only when the declared policy is ``"reusable"``.

lsdtools.Tool.sidebar_view#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1371.

Python
sidebar_view(self, view_id: str, title: Optional[str]=None, *, icon: Optional[str]=None, position: int=0, primary: bool=False, default_open: bool=True, side: str='left', accepts_entity: Optional[Callable[[Any], bool]]=None, deliver_entity: Optional[Callable[..., Any]]=None)
Python
accepts_entity: Optional[Callable[[Any], bool]]
default_open: bool
deliver_entity: Optional[Callable[..., Any]]
icon: Optional[str]
position: int
primary: bool
self: (unannotated)
side: str
title: Optional[str]
view_id: str

Source docstring:

text
Contribute a docked **sidebar view** (RFC-0002) → a :class:`SidebarViewContribution`.

The decorated factory is ``(host) -> widget | View | ViewPresentation`` (gui-side; imports
GTK lazily in its body — the
sanctioned escape hatch, like :meth:`contribute`). Sidebar views always belong to the
shell sidebar; ``side`` selects its initial ``"left"`` or ``"right"`` dock and
``position`` orders sections on that side. Every active declaration is a plain
command in the Activity Bar's right-click **Add View** catalog independently of attachment;
invoking it reopens/focuses the exact singleton section and never shows checked state.
Supplying ``deliver_entity(target, entity)`` makes the exact sidebar id a tree-selection
route; ``accepts_entity`` optionally filters which entities it receives.

lsdtools.Tool.menu_item#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1402.

Python
menu_item(self, command_id: str, label: Optional[str]=None, *, menu: str, section: str='', order: int=0, icon: Optional[str]=None, accelerator: Optional[str]=None)
Python
accelerator: Optional[str]
command_id: str
icon: Optional[str]
label: Optional[str]
menu: str
order: int
section: str
self: (unannotated)

Source docstring:

text
Contribute a stable **app-logo command** → a :class:`MenuItem`.

The decorated callback is invoked when the item fires; it may take a ``Context`` (built from
the host) or no argument. ``command_id`` is package-local semantic identity; labels and menu
placement may change without retargeting the command. ``menu`` names a group inside
Desktop's compact contribution-only app-logo popover; ``section``/``order`` place it within
that group and ``accelerator`` binds a key. Empty groups are absent, so this decorator never
creates a classic menu bar or permanent command skeleton. The shell-owned Settings gear is
the package-management bootstrap and is intentionally not a contribution.

lsdtools.Tool.contribute#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1443.

Python
contribute(self, *items: Any) -> 'Tool'
Python
items: Any
self: (unannotated)

Source docstring:

text
Register hand-built contribution objects the declarative API can't express — the escape
hatch for a custom main/sidebar declaration. Flushed and attributed at :meth:`mount`.

lsdtools.Tool.view#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1450.

Python
view(self, view_id: str, title: Optional[str]=None, *, location: str='editor', icon: Optional[str]=None, instance_policy: str='single', binding_cardinality: str='none', accepts_entity: Optional[Callable[[Any], bool]]=None, default_open: bool=False)
Python
accepts_entity: Optional[Callable[[Any], bool]]
binding_cardinality: str
default_open: bool
icon: Optional[str]
instance_policy: str
location: str
self: (unannotated)
title: Optional[str]
view_id: str

Source docstring:

text
Contribute a **view**: the decorated factory is ``(ctx)`` or ``(ctx, entity=None) -> View``.

A View is a params-and-actions **panel** or a **data view** (``views.table`` / ``chart`` /
``flowchart`` or a custom ``View`` subclass). ``location`` places it in the desktop shell:
``"editor"`` (a tab) or ``"sidebar"`` (docked). Content inside a viewer is declared through
:meth:`viewer_extension` with ``ViewerExtensionSpec.surfaces``. The front-end resolves the
GTK shell (a data view's ``gtk`` module) or the generic form (a panel); a headless host uses
``to_text()`` / ``to_image()``. Editor views become ``MainViewType`` declarations and use the
same explicit ``instance_policy`` and entity-acceptance/binding contract. ``default_open`` is
the only activation-time opening signal for an editor view. Sidebar views are one docked
surface and cannot use entity acceptance or bindings.

lsdtools.Tool.mount#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1498.

Python
mount(self, host: Any=None, *, package: Optional[str]=None) -> list
Python
host: Any
package: Optional[str]
self: (unannotated)

Source docstring:

text
Register this Tool's declared surfaces into the host catalog.

Each contribution is attributed to *package* (default ``self.name``) so
``remove_package(...)`` cleanly unmounts it — the loader passes the manifest's package id.
Steps/entities are already registered at decoration time. Runtime callbacks capture this
mount's host; the Tool itself remains a host-neutral declaration catalog.

lsdtools.Tool.dispatch#

Kind: method. Source: core/lsd/src/lsd/tools/tool.py:1666.

Python
dispatch(self, route: str, ctx: Any=None, **values: Any) -> Any
Python
ctx: Any
route: str
self: (unannotated)
values: Any

Source docstring:

text
Invoke an action with an explicit Context, or headlessly when none is supplied.

lsdtools.Tool.name#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:830.

Python
name: (unannotated)
Python
name = str(name)

lsdtools.Tool.label#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:831.

Python
label: (unannotated)
Python
label = label or self.name

lsdtools.Tool.factories#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:832.

Python
factories: List[_StepFactory]
Python
factories = []

lsdtools.Tool.commands#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:834.

Python
commands: List[dict]
Python
commands = []

lsdtools.Tool.templates#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:835.

Python
templates: List[dict]
Python
templates = []

lsdtools.Tool.views#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:836.

Python
views: List[dict]
Python
views = []

lsdtools.Tool.dataset_editors#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:837.

Python
dataset_editors: List[DatasetEditorSpec]
Python
dataset_editors = []

lsdtools.Tool.object_types#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:838.

Python
object_types: List[ObjectTypeSpec]
Python
object_types = []

lsdtools.Tool.object_property_sections#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:839.

Python
object_property_sections: List[ObjectPropertySectionSpec]
Python
object_property_sections = []

lsdtools.Tool.object_explorers#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:840.

Python
object_explorers: List[ObjectExplorerSpec]
Python
object_explorers = []

lsdtools.Tool.object_context_actions#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:841.

Python
object_context_actions: List[ObjectContextActionSpec]
Python
object_context_actions = []

lsdtools.Tool.viewer_extensions#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:842.

Python
viewer_extensions: List[ViewerExtensionSpec]
Python
viewer_extensions = []

lsdtools.Tool.tree_extensions#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:843.

Python
tree_extensions: List[TreeExtensionSpec]
Python
tree_extensions = []

lsdtools.Tool.status_extensions#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:844.

Python
status_extensions: List[StatusExtensionSpec]
Python
status_extensions = []

lsdtools.Tool.main_views#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:845.

Python
main_views: List[dict]
Python
main_views = []

lsdtools.Tool.sidebar_views#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:846.

Python
sidebar_views: List[dict]
Python
sidebar_views = []

lsdtools.Tool.menu_items#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:847.

Python
menu_items: List[dict]
Python
menu_items = []

lsdtools.Tool.raw_contributions#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:848.

Python
raw_contributions: List[Any]
Python
raw_contributions = []

lsdtools.Tool.routes#

Kind: attribute. Source: core/lsd/src/lsd/tools/tool.py:849.

Python
routes: Dict[str, _HandlerSpec]
Python
routes = {}

lsdtools.Trip#

Kind: class. Source: core/lsd/src/lsd/trip/model.py:468.

Python
Trip(self, table: Any, components: Sequence[Component], *, trip_id: str, versions: Mapping[str, int], layout: int, origin: Optional[str], next_eid: int, attrs: Mapping[str, Any], mirrors: Mapping[str, Mapping[str, int]], owned: Mapping[str, Any], lineage: _Lineage) -> None

Source docstring:

text
One immutable value of a Trip: a single-chunk table plus versions, identity, and lineage.

Build one with :meth:`from_table` (the bridge from a step's table), :meth:`build` (from numpy
arrays -- the fast path for a loader or a test), or :func:`lsd.trip.snapshot.read_snapshot`.
Transform it through a :class:`lsd.trip.view.TripView`, whose ``commit`` returns the next
value.  Values sharing a lineage share the staging pool, attachments, and component homes.

Implementation alias: lsd.trip.model.Trip.

lsdtools.Trip.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:482.

Python
__init__(self, table: Any, components: Sequence[Component], *, trip_id: str, versions: Mapping[str, int], layout: int, origin: Optional[str], next_eid: int, attrs: Mapping[str, Any], mirrors: Mapping[str, Mapping[str, int]], owned: Mapping[str, Any], lineage: _Lineage) -> None
Python
attrs: Mapping[str, Any]
components: Sequence[Component]
layout: int
lineage: _Lineage
mirrors: Mapping[str, Mapping[str, int]]
next_eid: int
origin: Optional[str]
owned: Mapping[str, Any]
self: (unannotated)
table: Any
trip_id: str
versions: Mapping[str, int]

lsdtools.Trip.from_table#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:508.

Python
from_table(cls, table: Any, *, id_column: Optional[str]=None, components: Optional[Sequence[str]]=None, fill: Optional[Mapping[str, Any]]=None, trip_id: Optional[str]=None, coordinate: Optional[Tuple[str, str]]=None, declared: Optional[Sequence[Component]]=None) -> 'Trip'
Python
cls: (unannotated)
components: Optional[Sequence[str]]
coordinate: Optional[Tuple[str, str]]
declared: Optional[Sequence[Component]]
fill: Optional[Mapping[str, Any]]
id_column: Optional[str]
table: Any
trip_id: Optional[str]

Source docstring:

text
Bridge a table into a Trip (the ``ToMemory`` step's core).

``id_column`` names an integer column to become ``eid`` (must be unique); otherwise
``eid`` is the row index.  ``components`` selects columns (default: all).  ``fill`` maps a
column name to the value that replaces its nulls; a column with nulls and no fill is
refused.  Field identities are reused from the table's profile stamp when present and
minted at ``coordinate`` (``(entity_id, step_id)``) otherwise.  ``declared`` lets the
caller fix ``frozen``/``mirror_of`` on known components.

lsdtools.Trip.build#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:600.

Python
build(cls, columns: Mapping[str, Any], *, components: Optional[Sequence[Component]]=None, eid: Optional[Any]=None, trip_id: Optional[str]=None, coordinate: Optional[Tuple[str, str]]=None, attrs: Optional[Mapping[str, Any]]=None) -> 'Trip'
Python
attrs: Optional[Mapping[str, Any]]
cls: (unannotated)
columns: Mapping[str, Any]
components: Optional[Sequence[Component]]
coordinate: Optional[Tuple[str, str]]
eid: Optional[Any]
trip_id: Optional[str]

Source docstring:

text
Build a Trip from numpy arrays (owned, writable buffers -- the zero-copy fast path).

Each numeric array becomes a component whose buffer the Trip owns, so in-place systems
may write it without a copy.  ``components`` declares dtypes/shapes/flags explicitly;
otherwise they are inferred from the arrays.  Strings/categoricals are accepted as Arrow
arrays or Python lists.

lsdtools.Trip.trip_id#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:696.

Python
trip_id(self) -> str
Python
self: (unannotated)

lsdtools.Trip.layout#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:700.

Python
layout(self) -> int
Python
self: (unannotated)

lsdtools.Trip.versions#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:704.

Python
versions(self) -> Mapping[str, int]
Python
self: (unannotated)

lsdtools.Trip.version_key#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:708.

Python
version_key(self) -> str
Python
self: (unannotated)

lsdtools.Trip.handle#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:712.

Python
handle(self) -> str
Python
self: (unannotated)

lsdtools.Trip.origin#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:716.

Python
origin(self) -> Optional[str]
Python
self: (unannotated)

Source docstring:

text
The snapshot id of the table this Trip was bridged from, if it had one.

lsdtools.Trip.next_eid#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:721.

Python
next_eid(self) -> int
Python
self: (unannotated)

lsdtools.Trip.attrs#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:725.

Python
attrs(self) -> Mapping[str, Any]
Python
self: (unannotated)

Source docstring:

text
Small JSON-safe values that travel with the Trip (a render origin, a frame id).

lsdtools.Trip.components#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:730.

Python
components(self) -> Mapping[str, Component]
Python
self: (unannotated)

lsdtools.Trip.names#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:734.

Python
names(self) -> Tuple[str, ...]
Python
self: (unannotated)

lsdtools.Trip.num_rows#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:738.

Python
num_rows(self) -> int
Python
self: (unannotated)

lsdtools.Trip.arrow#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:745.

Python
arrow(self) -> 'pa.Table'
Python
self: (unannotated)

Source docstring:

text
The underlying single-chunk ``pa.Table`` (read-only by convention).

Vector components are ``fixed_size_list`` columns here; use :meth:`to_table` for a flat
scalar table a profiler or an ordinary table consumer can read.

lsdtools.Trip.to_table#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:753.

Python
to_table(self, columns: Optional[Sequence[str]]=None) -> 'pa.Table'
Python
columns: Optional[Sequence[str]]
self: (unannotated)

Source docstring:

text
A flat ``pa.Table`` with vector components split into scalar columns (``name.0`` ...).

``eid`` is always included.  This is the table form a Trip presents when it leaves the
tier (``ToDisk``) or is inspected -- the profile layer measures scalars.

lsdtools.Trip.nbytes#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:784.

Python
nbytes(self) -> int
Python
self: (unannotated)

lsdtools.Trip.lineage#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:788.

Python
lineage(self) -> _Lineage
Python
self: (unannotated)

lsdtools.Trip.record#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:791.

Python
record(self, *, snapshot: Optional[str]=None, snapshot_id: Optional[str]=None) -> TripRecord
Python
self: (unannotated)
snapshot: Optional[str]
snapshot_id: Optional[str]

lsdtools.Trip.component#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:802.

Python
component(self, name: str) -> Component
Python
name: str
self: (unannotated)

lsdtools.Trip.column#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:808.

Python
column(self, name: str) -> 'pa.Array'
Python
name: str
self: (unannotated)

Source docstring:

text
The single Arrow chunk of one component.

lsdtools.Trip.numpy#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:813.

Python
numpy(self, name: str) -> 'np.ndarray'
Python
name: str
self: (unannotated)

Source docstring:

text
A read-only, zero-copy numpy view of one numeric component (``(n,)`` or ``(n, k)``).

lsdtools.Trip.eid#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:831.

Python
eid(self) -> 'np.ndarray'
Python
self: (unannotated)

lsdtools.Trip.owns#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:834.

Python
owns(self, name: str) -> bool
Python
name: str
self: (unannotated)

Source docstring:

text
Whether this value holds a writable buffer for *name* (in-place writes are legal).

lsdtools.Trip.mirrored_versions#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:838.

Python
mirrored_versions(self, name: str) -> Mapping[str, int]
Python
name: str
self: (unannotated)

lsdtools.Trip.mirror_is_current#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:841.

Python
mirror_is_current(self, name: str) -> bool
Python
name: str
self: (unannotated)

Source docstring:

text
Whether a mirror component still reflects the versions of the components it mirrors.

lsdtools.Trip.home#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:853.

Python
home(self, name: str) -> str
Python
name: str
self: (unannotated)

Source docstring:

text
Where the authoritative copy of a component lives: ``"host"`` or a device name.

lsdtools.Trip.set_home#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:858.

Python
set_home(self, name: str, where: str) -> None
Python
name: str
self: (unannotated)
where: str

lsdtools.Trip.attach#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:862.

Python
attach(self, key: str, value: Any) -> Any
Python
key: str
self: (unannotated)
value: Any

Source docstring:

text
Attach an opaque object to the Trip's lineage (a device session); closed with it.

lsdtools.Trip.attachment#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:868.

Python
attachment(self, key: str, factory: Any=None) -> Any
Python
factory: Any
key: str
self: (unannotated)

lsdtools.Trip.close#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:878.

Python
close(self) -> None
Python
self: (unannotated)

Source docstring:

text
Close every attachment that has a ``close()``; the values themselves stay readable.

lsdtools.Trip.with_attrs#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:909.

Python
with_attrs(self, **attrs: Any) -> 'Trip'
Python
attrs: Any
self: (unannotated)

Source docstring:

text
A new value with these attrs set (JSON-safe values only); versions are untouched.

lsdtools.Trip.append#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:1003.

Python
append(self, columns: Mapping[str, Any]) -> 'Trip'
Python
columns: Mapping[str, Any]
self: (unannotated)

Source docstring:

text
A new value with rows appended (fresh eids); bumps ``layout`` and every version.

Every non-``eid`` component must be supplied with the same number of rows.  Vector
components take ``(m, k)`` arrays.  This copies every component once; it is the rare
structural operation, not a per-tick one.

lsdtools.Trip.compact#

Kind: method. Source: core/lsd/src/lsd/trip/model.py:1062.

Python
compact(self, alive: str='alive') -> 'Trip'
Python
alive: str
self: (unannotated)

Source docstring:

text
A new value without the rows whose *alive* component is zero; bumps ``layout``.

lsdtools.TripView#

Kind: class. Source: core/lsd/src/lsd/trip/view.py:139.

Python
TripView(self, trip: Trip, *, reads: Any=(), writes: Any=(), creates: Any=(), inplace: bool=False, chunk_rows: int=DEFAULT_CHUNK_ROWS, coordinate: Optional[Tuple[str, str]]=None) -> None

Source docstring:

text
A system's declared window onto one Trip value.

``reads``/``writes`` name existing components; ``creates`` declares new ones.  Reads and
writes overlap freely (a system that integrates ``x`` reads it too).  ``eid`` is always
readable, never writable; frozen components are never writable.  Every array the view returns
is a zero-copy view of the Trip's buffers or of a pooled staging buffer.

Implementation alias: lsd.trip.view.TripView.

lsdtools.TripView.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:148.

Python
__init__(self, trip: Trip, *, reads: Any=(), writes: Any=(), creates: Any=(), inplace: bool=False, chunk_rows: int=DEFAULT_CHUNK_ROWS, coordinate: Optional[Tuple[str, str]]=None) -> None
Python
chunk_rows: int
coordinate: Optional[Tuple[str, str]]
creates: Any
inplace: bool
reads: Any
self: (unannotated)
trip: Trip
writes: Any

lsdtools.TripView.trip#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:213.

Python
trip(self) -> Trip
Python
self: (unannotated)

lsdtools.TripView.count#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:217.

Python
count(self) -> int
Python
self: (unannotated)

lsdtools.TripView.reads#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:221.

Python
reads(self) -> frozenset
Python
self: (unannotated)

lsdtools.TripView.writes#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:225.

Python
writes(self) -> Tuple[str, ...]
Python
self: (unannotated)

lsdtools.TripView.creates#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:229.

Python
creates(self) -> Tuple[Component, ...]
Python
self: (unannotated)

lsdtools.TripView.inplace#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:233.

Python
inplace(self) -> bool
Python
self: (unannotated)

lsdtools.TripView.chunk_rows#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:237.

Python
chunk_rows(self) -> int
Python
self: (unannotated)

lsdtools.TripView.eid#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:241.

Python
eid(self) -> 'np.ndarray'
Python
self: (unannotated)

lsdtools.TripView.__getitem__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:244.

Python
__getitem__(self, name: str) -> Any
Python
name: str
self: (unannotated)

Source docstring:

text
A read-only view of a declared read or write (``pa.Array`` for non-numeric).

lsdtools.TripView.out#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:255.

Python
out(self, name: str) -> 'np.ndarray'
Python
name: str
self: (unannotated)

Source docstring:

text
The writable array for a declared write (staging, or live when in place) or create.

lsdtools.TripView.stage_all#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:279.

Python
stage_all(self) -> None
Python
self: (unannotated)

Source docstring:

text
Acquire every declared write/create buffer now (before chunk threads start).

lsdtools.TripView.chunk_bounds#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:312.

Python
chunk_bounds(self, rows: Optional[int]=None) -> List[Tuple[int, int]]
Python
rows: Optional[int]
self: (unannotated)

lsdtools.TripView.chunks#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:319.

Python
chunks(self, rows: Optional[int]=None) -> Iterator[Chunk]
Python
rows: Optional[int]
self: (unannotated)

lsdtools.TripView.reductions#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:327.

Python
reductions(self, key: str) -> List[Any]
Python
key: str
self: (unannotated)

Source docstring:

text
Every partial recorded under *key*, in chunk order (a fixed reduction order).

lsdtools.TripView.commit#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:335.

Python
commit(self) -> Trip
Python
self: (unannotated)

Source docstring:

text
Fold the staged arrays into the next Trip value; a view commits exactly once.

lsdtools.ValidationError#

Kind: class. Source: core/lsd/src/lsd/core/configurable.py:191.

Implementation alias: lsd.core.configurable.ValidationError.

lsdtools.ValidationError.parameter#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:192.

Python
parameter: str

lsdtools.ValidationError.message#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:193.

Python
message: str

lsdtools.ValidationError.value#

Kind: attribute. Source: core/lsd/src/lsd/core/configurable.py:194.

Python
value: Any

lsdtools.VariableConcept#

Kind: class. Source: core/lsd/src/lsd/project_semantics.py:145.

Source docstring:

text
One stable project meaning, independent of any physical Arrow column.

Implementation alias: lsd.project_semantics.VariableConcept.

lsdtools.VariableConcept.id#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:148.

Python
id: str

lsdtools.VariableConcept.label#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:149.

Python
label: str

lsdtools.VariableConcept.kind#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:150.

Python
kind: str

lsdtools.VariableConcept.unit#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:151.

Python
unit: str | None
Python
unit = None

lsdtools.VariableConcept.description#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:152.

Python
description: str
Python
description = ''

lsdtools.VariableConcept.version#

Kind: attribute. Source: core/lsd/src/lsd/project_semantics.py:153.

Python
version: int
Python
version = 1

lsdtools.VariableConcept.from_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:166.

Python
from_dict(cls, data: Mapping[str, Any]) -> 'VariableConcept'
Python
cls: (unannotated)
data: Mapping[str, Any]

lsdtools.VariableConcept.to_dict#

Kind: method. Source: core/lsd/src/lsd/project_semantics.py:177.

Python
to_dict(self) -> dict[str, Any]
Python
self: (unannotated)

lsdtools.View#

Kind: class. Source: core/lsd/src/lsd/core/view.py:449.

Python
View(self, *, name: str='', icon: Optional[str]=None, **config: Any) -> None

Source docstring:

text
A presentable surface: ``param()`` fields + ``@action`` operations + optional data.

Subclass it for a **panel** (params + actions). Set a ``kind`` and override ``feed`` /
``to_text`` / ``to_image`` for a **data view** (table / chart / flowchart / custom).

Implementation alias: lsd.core.view.View.

Declared bases: Configurable.

lsdtools.View.kind#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:455.

Python
kind: ClassVar[str]
Python
kind = ''

lsdtools.View.ctx#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:461.

Python
ctx: ClassVar[Any]
Python
ctx = None

lsdtools.View.title#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:463.

Python
title = param(str, default='', label='Title')

lsdtools.View.location#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:464.

Python
location = param(str, default='editor', choices=['editor', 'sidebar'], label='Location', visibility='hidden')

lsdtools.View.__init__#

Kind: method. Source: core/lsd/src/lsd/core/view.py:485.

Python
__init__(self, *, name: str='', icon: Optional[str]=None, **config: Any) -> None
Python
config: Any
icon: Optional[str]
name: str
self: (unannotated)

lsdtools.View.engine#

Kind: method. Source: core/lsd/src/lsd/core/view.py:506.

Python
engine(self) -> Any
Python
self: (unannotated)

Source docstring:

text
The :class:`~lsd.runtime.engine.Engine` this view is attached to (``engine.add(view)``),
or ``None`` — the symmetry partner of :attr:`Entity.engine`.

lsdtools.View.watch#

Kind: method. Source: core/lsd/src/lsd/core/view.py:512.

Python
watch(self, *targets: Any) -> 'View'
Python
self: (unannotated)
targets: Any

Source docstring:

text
Hold the output of each :class:`~lsd.tree.entity.Entity` in *targets*, and refresh on re-run.

Each target is an ``Entity``, a stable entity id, or an unambiguous display name (sugar).
Returns ``self``, so
``views.table().watch(assays)`` reads as one phrase. **Any order works**:

* *add-then-watch*, *watch-then-add* (view or entity first) — all equivalent;
* a missing string reference is kept **pending** and resolves when that entity is added;
* **auto-pull** — watching an entity that has *already* run delivers its output immediately,
  which is what makes drag-and-drop and reopened projects feel instant.

Watches are stored by entity **id**, so they survive a rename and a project reload; removal
from the Workspace auto-unwatches them. Delivery goes through :meth:`on_output` (default:
``feed(output)``) on ``engine/entity/finished`` with ``ok=True``.

lsdtools.View.watch_output#

Kind: method. Source: core/lsd/src/lsd/core/view.py:551.

Python
watch_output(self, *references: OutputRef) -> 'View'
Python
references: OutputRef
self: (unannotated)

Source docstring:

text
Watch exact named step outputs and refresh them after successful runs.

Each reference contains only stable ``entity_id`` + ``step_id`` +
declared ``output_port`` coordinates.  A structurally valid reference
may be registered before its entity is attached; once the entity is
present, a missing step or undeclared port is rejected and never falls
back to :attr:`Entity.output`.

lsdtools.View.unwatch_output#

Kind: method. Source: core/lsd/src/lsd/core/view.py:629.

Python
unwatch_output(self, *references: OutputRef) -> 'View'
Python
references: OutputRef
self: (unannotated)

Source docstring:

text
Stop watching exact output references; unknown references are ignored.

lsdtools.View.unwatch#

Kind: method. Source: core/lsd/src/lsd/core/view.py:637.

Python
unwatch(self, *targets: Any) -> 'View'
Python
self: (unannotated)
targets: Any

Source docstring:

text
Stop watching each entity (or entity name) in *targets*. Unknown targets are ignored.
Already-delivered data stays — unwatching breaks the link, it does not clear the view.

lsdtools.View.watched#

Kind: method. Source: core/lsd/src/lsd/core/view.py:660.

Python
watched(self) -> List[str]
Python
self: (unannotated)

Source docstring:

text
The names of the entities this view watches — live (a renamed entity reports its new name),
plus any names still pending an entity. Watch order is preserved.

lsdtools.View.watched_outputs#

Kind: method. Source: core/lsd/src/lsd/core/view.py:671.

Python
watched_outputs(self) -> List[OutputRef]
Python
self: (unannotated)

Source docstring:

text
Exact output references in watch order (a detached copy).

lsdtools.View.on_output#

Kind: method. Source: core/lsd/src/lsd/core/view.py:675.

Python
on_output(self, entity: Any, output: Any) -> None
Python
entity: Any
output: Any
self: (unannotated)

Source docstring:

text
Called with a watched *entity*'s fresh output. The default hands it to :meth:`feed`.

Override for a view that watches several entities at once (e.g. a 3-D viewer keying layers by
``entity.id``), where last-write-wins ``feed`` is not what you want.

lsdtools.View.on_output_ref#

Kind: method. Source: core/lsd/src/lsd/core/view.py:682.

Python
on_output_ref(self, entity: Any, reference: OutputRef, output: Any) -> None
Python
entity: Any
output: Any
reference: OutputRef
self: (unannotated)

Source docstring:

text
Receive one exact named output; defaults to :meth:`on_output`.

Multi-output views may override this method to retain ``reference`` as
the semantic key while legacy views continue to override ``on_output``.

lsdtools.View.get_actions#

Kind: method. Source: core/lsd/src/lsd/core/view.py:988.

Python
get_actions(self) -> List[ActionInfo]
Python
self: (unannotated)

Source docstring:

text
Snapshot of all actions, in declaration order — for a renderer / CLI to build controls.

lsdtools.View.set_action_input_initial#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1013.

Python
set_action_input_initial(self, name: str, value: Mapping[str, Any] | None) -> None
Python
name: str
self: (unannotated)
value: Mapping[str, Any] | None

Source docstring:

text
Replace one complete action-form snapshot, or make that form unavailable.

This is runtime presentation state, never persisted View configuration. A caller must
supply every declared field, including hidden versions and optimistic fences. Removing a
snapshot disables the form; it never turns an input action into a zero-input command.

lsdtools.View.set_action_input_initials#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1037.

Python
set_action_input_initials(self, values: Mapping[str, Mapping[str, Any]]) -> None
Python
self: (unannotated)
values: Mapping[str, Mapping[str, Any]]

Source docstring:

text
Atomically replace every currently available typed-action form snapshot.

lsdtools.View.invoke#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1064.

Python
invoke(self, name: str, *, input: Any=_NO_ACTION_INPUT) -> Any
Python
input: Any
name: str
self: (unannotated)

Source docstring:

text
Run an action by name and return its result. The single dispatch entry for every
front-end. Emits ``view/action/invoked``. Unknown name → ``AttributeError``; a disabled
action is a logged no-op.

lsdtools.View.feed#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1096.

Python
feed(self, data: Any) -> 'View'
Python
data: Any
self: (unannotated)

Source docstring:

text
Give the view its data (a Table, a payload dict, a graph…). Data views store it and call
:meth:`_data_changed`; a params-and-actions panel has no data, so the base raises.

lsdtools.View.on_view_event#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1119.

Python
on_view_event(self, event: str, cb: Callable[..., None]) -> None
Python
cb: Callable[..., None]
event: str
self: (unannotated)

lsdtools.View.off_view_event#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1122.

Python
off_view_event(self, event: str, cb: Callable[..., None]) -> None
Python
cb: Callable[..., None]
event: str
self: (unannotated)

lsdtools.View.emit_view_event#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1127.

Python
emit_view_event(self, event: str, **data: Any) -> None
Python
data: Any
event: str
self: (unannotated)

lsdtools.View.to_text#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1135.

Python
to_text(self) -> str
Python
self: (unannotated)

Source docstring:

text
A plain-text rendering (agents / CLI / logs). Data views override; the base (a panel) is a
params + actions summary.

lsdtools.View.to_image#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1148.

Python
to_image(self, path: Optional[str]=None, *, width: int=1024, height: int=768) -> 'bytes | str'
Python
height: int
path: Optional[str]
self: (unannotated)
width: int

Source docstring:

text
Render to a PNG — returns the bytes, or writes to *path* and returns it. Data views that
can draw override this (lazily importing cairo); the base signals it is unsupported.

lsdtools.View.get_state#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1155.

Python
get_state(self) -> dict
Python
self: (unannotated)

Source docstring:

text
A JSON-able snapshot: the config param values plus the ``watch`` links (data views extend
with data/selection). ``watch`` is ``{"ids": {entity id: name}, "pending": [name]}`` — ids,
so a restored view re-links to the same entities across a rename and a project reload.

lsdtools.View.apply_state#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1174.

Python
apply_state(self, state: dict) -> None
Python
self: (unannotated)
state: dict

lsdtools.View.show#

Kind: method. Source: core/lsd/src/lsd/core/view.py:1271.

Python
show(self, mode: str='auto') -> Any
Python
mode: str
self: (unannotated)

Source docstring:

text
Present the view. ``mode``: ``"window"`` opens a front-end window (needs a presenter),
``"text"`` prints the console rendering, ``"auto"`` (default) is a window if a presenter is
registered (a front-end is loaded), else text.

lsdtools.ViewPresentation#

Kind: class. Source: core/lsd/src/lsd/core/view.py:1287.

Source docstring:

text
Pair one native front-end widget with its renderer-neutral :class:`View` model.

A package sometimes needs a purpose-built GTK editor while still exposing the same typed
parameters and semantic actions as an abstract ``View``. Returning this immutable value from
a main/sidebar view factory keeps those responsibilities explicit: ``widget`` is mounted and
painted by the owning application, while ``model`` is the only capability surface read by
generic control planes. The widget is never inspected for callbacks or reverse-engineered
from pointer/pixel events.

``ViewPresentation`` is deliberately declaration-neutral. The ordinary Desktop manager and
the authority-side participant runtime normalize it through the same realization function, so
it does not create a collaboration-specific package contract.

``input_targets`` optionally names up to 256 actual native child widgets with stable ids.
The front end validates their ownership at realization and publishes their current native
bounds for input automation. This is an immutable identity declaration, not a callback or
a second UI. Hidden, insensitive, or detached targets are unavailable until they return.

Implementation alias: lsd.core.view.ViewPresentation.

lsdtools.ViewPresentation.widget#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:1307.

Python
widget: Any

lsdtools.ViewPresentation.model#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:1308.

Python
model: View

lsdtools.ViewPresentation.input_targets#

Kind: attribute. Source: core/lsd/src/lsd/core/view.py:1309.

Python
input_targets: Mapping[str, Any]
Python
input_targets = field(default_factory=dict)

lsdtools.ViewerPayload#

Kind: class. Source: core/lsd/src/lsd/flow/payload.py:385.

Python
ViewerPayload(self, spec: Optional[Dict[str, Any]]=None, tables: Optional[Dict[str, Any]]=None) -> None

Source docstring:

text
A viewer artifact a deliver step returns: a JSON ``spec`` plus zero or more data ``tables``.

* ``spec`` — any JSON-serializable mapping (``kind`` / ``style`` / ``title`` / … — anything the
  target viewer understands). It is persisted verbatim and carried on the emitted event under the
  ``"spec"`` key.
* ``tables`` — ``{name: pa.Table | InputArtifact}``; **may be empty** (a spec-only
  chart/legend). Arrow tables are written to Parquet in the step's workspace. An
  ``InputArtifact`` aliases the exact output of a Shape/Load step in the same entity so the
  viewer and downstream bound consumers share one editable materialization. The
  emitted/persisted payload always carries the *paths*, not the tables/descriptors.

Subclass to define a new viewer topic (set the class attribute ``topic`` and, optionally, a
convenience constructor), then :func:`register_payload` it so generic restore can find it.

Implementation alias: lsd.flow.payload.ViewerPayload.

lsdtools.ViewerPayload.topic#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:402.

Python
topic: str
Python
topic = ''

lsdtools.ViewerPayload.__init__#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:404.

Python
__init__(self, spec: Optional[Dict[str, Any]]=None, tables: Optional[Dict[str, Any]]=None) -> None
Python
self: (unannotated)
spec: Optional[Dict[str, Any]]
tables: Optional[Dict[str, Any]]

lsdtools.ViewerPayload.payload_dict#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:414.

Python
payload_dict(self, paths: Dict[str, str], *, entity_id: str='', step_id: str='', layer: str='', view: str='', target: str='') -> Dict[str, Any]
Python
entity_id: str
layer: str
paths: Dict[str, str]
self: (unannotated)
step_id: str
target: str
view: str

Source docstring:

text
The dict that is both emitted (as event data) and persisted.

*paths* maps each ``tables`` key to the Parquet file written for it. Routing (``layer`` /
``view`` / ``target``) and the stamped ``entity_id`` / ``step_id`` are included only when
non-empty — an empty value would defeat the central ``_emit_event`` set-default backstop.

lsdtools.ViewerPayload.from_persisted#

Kind: method. Source: core/lsd/src/lsd/flow/payload.py:442.

Python
from_persisted(cls, spec_json: Dict[str, Any]) -> 'ViewerPayload'
Python
cls: (unannotated)
spec_json: Dict[str, Any]

Source docstring:

text
Rebuild a typed payload from a persisted ``*_payload.json`` dict.

``tables`` come back empty — the data lives on disk at the ``"paths"`` in the dict — so this is
for callers that want the typed object + its ``spec``; the raw persisted dict (with paths) is
what :meth:`lsd.tree.entity.Entity.viewer_payloads` yields for the front-end.

lsdtools.ViewerPayload.spec#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:406.

Python
spec: Dict[str, Any]
Python
spec = dict(spec or {})

lsdtools.ViewerPayload.tables#

Kind: attribute. Source: core/lsd/src/lsd/flow/payload.py:409.

Python
tables: Dict[str, Any]
Python
tables = {k: getattr(v, 'arrow', v) for k, v in (tables or {}).items()}

lsdtools.Writes#

Kind: class. Source: core/lsd/src/lsd/trip/view.py:52.

Python
Writes(self, *names: str, inplace: bool=False) -> None

Source docstring:

text
Components a system writes; ``inplace=True`` writes the Trip's own buffer.

Implementation alias: lsd.trip.view.Writes.

lsdtools.Writes.names#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:54.

Python
names: Tuple[str, ...]

lsdtools.Writes.inplace#

Kind: attribute. Source: core/lsd/src/lsd/trip/view.py:55.

Python
inplace: bool
Python
inplace = False

lsdtools.Writes.__init__#

Kind: method. Source: core/lsd/src/lsd/trip/view.py:57.

Python
__init__(self, *names: str, inplace: bool=False) -> None
Python
inplace: bool
names: str
self: (unannotated)

lsdtools.action#

Kind: function. Source: core/lsd/src/lsd/core/view.py:422.

Python
action(fn: Optional[Callable]=None, *, label: str='', icon: Optional[str]=None, style: Optional[str]=None, enabled: bool=True, description: str='', input_schema: ActionInputSchema | None=None) -> ActionDescriptor
Python
description: str
enabled: bool
fn: Optional[Callable]
icon: Optional[str]
input_schema: ActionInputSchema | None
label: str
style: Optional[str]

Source docstring:

text
Declare a zero-input or typed-input action on a :class:`View`.

Bare/configured actions receive only the View. Supplying ``input_schema`` declares a form and
the handler receives ``(view, immutable_input)``. The action is unavailable until the instance
publishes a complete initial document with :meth:`View.set_action_input_initial`. ``style`` is
``None`` | ``"suggested"`` | ``"destructive"``.

Implementation alias: lsd.core.view.action.

lsdtools.apply_column_map#

Kind: function. Source: core/lsd/src/lsd/core/columnmap.py:134.

Python
apply_column_map(table: pa.Table, resolved: Mapping[str, str], *, keep_unmapped: bool=False) -> pa.Table
Python
keep_unmapped: bool
resolved: Mapping[str, str]
table: pa.Table

Source docstring:

text
Select the mapped source columns and rename them to their targets.

With *keep_unmapped*, source columns not referenced by the map are appended unchanged (after the
mapped ones), skipping any whose name would collide with a target.

Implementation alias: lsd.core.columnmap.apply_column_map.

lsdtools.autoselect_largecsv_source#

Kind: function. Source: core/lsd/src/lsd/core/largecsv.py:43.

Python
autoselect_largecsv_source(source_json: str, *, accepted_kinds, threshold_bytes: Optional[int]=None) -> str
Python
accepted_kinds: (unannotated)
source_json: str
threshold_bytes: Optional[int]

Source docstring:

text
Rewrite a single-file CSV/TSV ``file`` source → a ``largecsv`` source when the file is big enough.

Returns *source_json* unchanged unless: the loader accepts ``largecsv``; the source is a ``file`` kind
resolving to exactly one ``.csv``/``.tsv``; and that file is ≥ the size threshold. The streamed file's
delimiter is inferred from its extension. Centralised so every loader/template auto-picks uniformly.

Implementation alias: lsd.core.largecsv.autoselect_largecsv_source.

lsdtools.columnmap_param#

Kind: function. Source: core/lsd/src/lsd/core/columnmap.py:30.

Python
columnmap_param(targets: Sequence[str]=(), **kwargs) -> ParameterDescriptor
Python
kwargs: (unannotated)
targets: Sequence[str]

Source docstring:

text
A ``str`` param carrying a column map. *targets* seed the editor's rows (e.g. ``["x","y","z"]``).

The widget hint is ``"columnmap:<t1,t2,…>"`` so the UI can pre-list the expected target columns;
blank ``targets`` gives a free-form editor.

Implementation alias: lsd.core.columnmap.columnmap_param.

lsdtools.describe_api#

Kind: function. Source: core/lsd/src/lsd/describe.py:53.

Python
describe_api() -> Dict[str, Any]

Source docstring:

text
Describe the registered steps/entities/views + the public surface as a JSON-ready dict.

Shape::

    {
      "api_version": "1.0",
      "lsd_version": "1.0.0",
      "public_api": ["Engine", "Table", "Tool", "View", ...],  # lsdtools.__all__
      "steps":    {"MyShape": {"kind": "shape", "params": [...], "input_ports": [...], ...}},
      "entities": {"package.Dataset": {"title": "Dataset", "params": [...], ...}},
      "views":    {"table": {"class": "TableView", "params": [...], ...}},  # data-view kinds
    }

Implementation alias: lsd.describe.describe_api.

lsdtools.extend#

Kind: module. Source: sdk/src/lsdtools/extend.py:1.

Source docstring:

text
``lsdtools.extend`` — the extension surface: the registries and substrate a package calls to
teach the product a new capability without forking it.

The top-level :mod:`lsdtools` names (``Tool``, ``Context``, ``Table``, ``View``, ``param`` …) are all
a package needs to *build a pipeline and a panel*. This module is the door to the *extension seams* —
the component registries the charter puts on every view kind (``register_chart_kind``,
``register_cell_renderer``, ``register_param_control``, ``register_layer_kind``, the diagram
``register_diagram_layout`` / ``register_diagram_preset``), the symbology seams (contributed
style assets through ``register_style_asset`` / ``StyleAssetSpec`` and the standard style for a
package's own data through ``register_default_style``), the data-format
registry (``register_table_reader``), the file-import template/source seams — plus the raw engine
substrate (``LoadStep`` / ``EventBus`` / ``ParameterInfo`` / contribution plumbing …) the declarative
``@tool.*`` API sits on.

It replaces the old ``lsdtools.advanced``: same surface (the substrate below the curated top level) but
an honest name and — unlike ``advanced`` — **declared and charter-enforced**. Every seam that lives in a
view/service package is reached lazily through a whitelisted bridge (see ``LAZY_BRIDGES`` in
``core/lsd/tests/test_architecture_charter.py``); the ``_EXPORTS`` table below IS that surface, and the
charter asserts each entry maps to a foundation (`lsd`) or a bridge. Importing this module loads
nothing; resolving a name imports its owner on demand.

One law still holds: a package imports ``lsdtools`` and its submodules — never a product-internal
package directly. ``from lsd_view_chart import register_chart_kind`` is the old, ungoverned path;
``from lsdtools.extend import register_chart_kind`` is the governed one.

lsdtools.generate_step#

Kind: function. Source: sdk/src/lsdtools/__init__.py:155.

Python
generate_step(prompt: str, **kwargs)
Python
kwargs: (unannotated)
prompt: str

Source docstring:

text
Generate an LSD step from a natural-language *prompt* using AI.

The public entry point to AI step generation. It bridges to the private ``lsd-agent``
engine (which calls Claude) and, by default, writes the step into your project's
``steps.py`` so the desktop hot-reloads it. Requires the ``lsd-agent`` package and an
``ANTHROPIC_API_KEY`` (or pass a ``completer=`` for testing/custom backends).

    from lsdtools import generate_step
    generate_step("a deliver step that writes its input Table to a parquet file",
                  project_dir=".")

Keyword args (forwarded): ``project_dir`` (default "."), ``into`` (default "steps.py"),
``apply`` (default True), ``completer``, ``context``. Returns the generated code.

lsdtools.geostats#

Kind: module. Source: sdk/src/lsdtools/geostats.py:1.

Source docstring:

text
Lazy public facade for LSD deterministic geostatistical estimation.

Importing this module does not import NumPy, load native artifacts, initialize
CUDA, or import the product runtime. External packages should use this module
instead of importing ``lsd_geostats_runtime`` directly.

lsdtools.groundwater#

Kind: module. Source: sdk/src/lsdtools/groundwater.py:1.

Source docstring:

text
Lazy public facade for LSD saturated-groundwater execution.

Importing this module does not import NumPy, initialize CUDA, or import the
scientific runtime.  First-party and Store packages exchange versioned,
JSON-safe documents through this boundary instead of importing
``lsd_groundwater`` directly.

lsdtools.integeragent#

Kind: module. Source: sdk/src/lsdtools/integeragent.py:1.

Source docstring:

text
Lazy public facade for LSD integer-agent deployment and inference.

Importing this module does not import NumPy, the private inference engine, a
gym, CUDA, a mine adapter, or the product runtime.

lsdtools.models#

Kind: module. Source: sdk/src/lsdtools/models.py:1.

Source docstring:

text
Lazy public access to LSD's SDF, block-model, and field-model services.

Domain packages should import this module through ``from lsdtools import models``
instead of naming product service distributions directly.  The bridge is deliberately
lazy: importing :mod:`lsdtools` or :mod:`lsdtools.models` does not import NumPy,
PyArrow, or any model service.

The services meet at one backend-neutral regional contract::

    from lsdtools import models

    candidate = models.oriented_box(
        center=(1000, 2000, -300),
        half_size=(15, 30, 4),
        axes=((1, 0, 0), (0, 0, 1), (0, -1, 0)),
    )
    query = models.regional_query(
        query_id="trial-17",
        region_id="study-worker-0",
        sdf=candidate,
        value_field="nsr_per_m3",
    )
    result = models.evaluate_region(backend, query)

Scalar service objects and result records are returned unchanged.  Batched
evaluation is normalized into :class:`RegionalBatchEvaluation`, so optimizers
can use native page-major block-model execution or an ordered scalar fallback
without importing either implementation package.  Optional services remain lazy
and missing or incompatible installations are mapped to
:class:`ModelServiceUnavailable`.

Structural discovery is normalized too: :func:`source_fields` returns typed
numeric field metadata without exposing Arrow, while
:func:`source_support_region` returns one validated physical-support frame.

lsdtools.neural#

Kind: module. Source: sdk/src/lsdtools/neural.py:1.

Source docstring:

text
Lazy public facade for authenticated neural execution.

Importing this module does not import NumPy, load a native artifact, initialize
CUDA, or import the product runtime. Domain packages use this facade instead of
importing :mod:`lsd_neural_engine` directly.

lsdtools.open_parquet_dataset#

Kind: function. Source: core/lsd/src/lsd/core/parquet.py:570.

Python
open_parquet_dataset(source: Any, *, scan_options: ParquetScanOptions=ParquetScanOptions(), filesystem: Any=None, partitioning: Any=None, source_fingerprint: Optional[str]=None) -> ParquetDataset
Python
filesystem: Any
partitioning: Any
scan_options: ParquetScanOptions
source: Any
source_fingerprint: Optional[str]

Source docstring:

text
Open the public bounded Parquet contract for a path or InputArtifact.

Implementation alias: lsd.core.parquet.open_parquet_dataset.

lsdtools.param#

Kind: function. Source: core/lsd/src/lsd/core/configurable.py:260.

Python
param(param_type: type, *, default: Any=_MISSING, default_factory: Optional[Callable[[], Any]]=None, label: str='', description: str='', required: bool=False, choices: Optional[List[Any]]=None, min: Optional[Any]=None, max: Optional[Any]=None, step: Optional[float]=None, digits: Optional[int]=None, widget: Optional[str]=None, visibility: str='normal', group: str='General', graph: bool=False, output: bool=False, hashed: bool=True, validators: Optional[List[Callable[[Any], Optional[str]]]]=None) -> ParameterDescriptor
Python
choices: Optional[List[Any]]
default: Any
default_factory: Optional[Callable[[], Any]]
description: str
digits: Optional[int]
graph: bool
group: str
hashed: bool
label: str
max: Optional[Any]
min: Optional[Any]
output: bool
param_type: type
required: bool
step: Optional[float]
validators: Optional[List[Callable[[Any], Optional[str]]]]
visibility: str
widget: Optional[str]

Source docstring:

text
Declare a configurable parameter on a Configurable subclass.

Examples::

    class LoadFromDB(LoadStep):
        param_group_order = ["Connection", "Query"]

        host  = param(str, default="localhost", group="Connection")
        port  = param(int, default=5432,        group="Connection")
        query = param(str, required=True,       group="Query")

Implementation alias: lsd.core.configurable.param.

lsdtools.parquet_write_policy#

Kind: function. Source: core/lsd/src/lsd/core/parquet.py:202.

Python
parquet_write_policy(policy: Union[str, ParquetWritePolicy, None]=None) -> ParquetWritePolicy
Python
policy: Union[str, ParquetWritePolicy, None]

Source docstring:

text
Resolve the current runtime policy, a stable policy id, or an instance.

Implementation alias: lsd.core.parquet.parquet_write_policy.

lsdtools.parse_column_map#

Kind: function. Source: core/lsd/src/lsd/core/columnmap.py:43.

Python
parse_column_map(spec: str) -> Dict[str, str]
Python
spec: str

Source docstring:

text
Parse ``"x=Easting, y=Northing"`` (or ``:`` separators) → ``{"x": "Easting", "y": "Northing"}``.

Blank entries are ignored so a trailing comma is harmless, but an entry that is not a
``target=source`` pair raises. Dropping it instead would build a *partial* map and import
fewer columns than the user asked for, with nothing to distinguish that from a map they
wrote correctly — in a coordinate map, a silently truncated geometry.

Two different sources for one target likewise raise: that is a contradiction in the spec,
not a preference for whichever was written last.

Implementation alias: lsd.core.columnmap.parse_column_map.

lsdtools.parse_source#

Kind: function. Source: core/lsd/src/lsd/core/source.py:297.

Python
parse_source(spec: str, *, base_dir: Optional[str]=None) -> ResolvedSource
Python
base_dir: Optional[str]
spec: str

Source docstring:

text
Parse source JSON into the runtime value used by a load step.

When *base_dir* is supplied, explicit relative paths in the built-in file
source are resolved against it. The parsed config is ephemeral, so the
project keeps its portable spelling while reads, watches and fingerprints
all address the same absolute file. Callers without a persisted project
omit *base_dir* and retain process-CWD semantics.

Implementation alias: lsd.core.source.parse_source.

lsdtools.profiling#

Kind: module. Source: sdk/src/lsdtools/profiling.py:1.

Source docstring:

text
Stable package-author facade for LSD profiling.

Package code should import this module instead of reaching into product internals. The
implementation is the stdlib-only :mod:`lsd_profiler` leaf, so importing this facade
does not construct an Engine, UI, worker, or sampler thread.

lsdtools.publish#

Kind: module. Source: sdk/src/lsdtools/publish.py:1.

Source docstring:

text
Immutable, transport-neutral descriptors for published LSD sites.

Package code owns the bytes in a static site directory.  This module validates and hashes those
bytes into the exact ``lsd.publish/v1`` manifest understood by the publish service, but deliberately
does not select a URL, implement HTTP, or start infrastructure.  Uploading is delegated to a public
client supplied by the caller (or, when the product provides one, by
``lsdtools.server.publish_client``).

The directory walk is fail-closed: only regular files and ordinary directories are accepted;
symbolic links, junctions/reparse points, traversal paths, and special files are rejected.  Limits
mirror the v1 service defaults so a package cannot spend unbounded work constructing a manifest the
service will refuse.

lsdtools.resolve_column_map#

Kind: function. Source: core/lsd/src/lsd/core/columnmap.py:94.

Python
resolve_column_map(columns: Sequence[str], mapping: Mapping[str, str], *, required: Iterable[str]=(), aliases: Optional[Mapping[str, Sequence[str]]]=None, keep_unmapped: bool=False) -> Tuple[Dict[str, str], List[str]]
Python
aliases: Optional[Mapping[str, Sequence[str]]]
columns: Sequence[str]
keep_unmapped: bool
mapping: Mapping[str, str]
required: Iterable[str]

Source docstring:

text
Resolve a (possibly partial) column map against the actual *columns*.

Explicit *mapping* entries win; any *required* / *aliases* target not mapped is auto-detected via
:func:`_match`. Returns ``(resolved {target: source}, missing_required)``. Explicit sources that
don't exist in *columns* are dropped from the result and (if required) reported as missing.

With *keep_unmapped*, source columns no target claimed are added to the result under their own
names, so applying this map preserves them — the same intent as the flag of the same name on
:func:`apply_column_map`, and setting either one produces the same table.

Implementation alias: lsd.core.columnmap.resolve_column_map.

lsdtools.server#

Kind: module. Source: sdk/src/lsdtools/server.py:1.

Source docstring:

text
Public package-facing access to LSD server services.

Packages use this module instead of selecting localhost/production URLs or
starting infrastructure themselves. In a source checkout the application
runtime asks the sibling ``lsd-server`` checkout to ensure its local gateway;
an installed runtime is locked to ``https://lsd.tools``.

lsdtools.validators#

Kind: module. Source: core/lsd/src/lsd/core/validators.py:1.

Source docstring:

text
Reusable parameter validators — the checks that don't map onto a ``ParameterDef`` field.

``required`` / ranges / choices are already expressed by ``param(required=…, min=…, max=…,
choices=…)``; these cover the rest. Each factory returns a validator with the ``ParameterDef``
contract — ``Callable[[Any], Optional[str]]``: return ``None`` when the value is acceptable, else a
human-readable error string. Like the built-in checks, an empty value passes (pair with
``required=True`` to forbid blanks)::

    from lsdtools import param, validators

    email = param(str, validators=[validators.matches(r"[^@]+@[^@]+")])
    out   = param(str, validators=[validators.suffix(".csv", ".parquet")])

Implementation alias: lsd.core.validators.

lsdtools.views#

Kind: module. Source: sdk/src/lsdtools/views.py:1.

Source docstring:

text
``lsdtools.views`` — the data-view façade. Lazy imports (the ``generate_step`` pattern): importing
``lsdtools`` never drags a view package (or cairo/GTK) into the process; each factory imports its
package on first use and raises a clear error if it is not installed.

    from lsdtools import views
    v = views.table(my_table)                    # a TableView, fed
    c = views.chart(kind="line", title="Loss")
    f = views.flowchart("A\n  B\n  C")
    print(v.to_text()); c.to_image("chart.png")

A custom data view registers its GTK drawing shell here — the one sanctioned place a package writes
GTK. In your view's ``gtk`` module (loaded via the ``lsd.view_gtk`` entry point)::

    from lsdtools.views import set_view_shell
    set_view_shell("my.kind", build_my_shell)     # build_my_shell(view) -> a Gtk.Widget

lsdtools.write_parquet_table#

Kind: function. Source: core/lsd/src/lsd/core/parquet.py:270.

Python
write_parquet_table(table: Any, where: Any, *, policy: Union[str, ParquetWritePolicy, None]=None, **overrides: Any) -> Any
Python
overrides: Any
policy: Union[str, ParquetWritePolicy, None]
table: Any
where: Any

Source docstring:

text
Write one Arrow table under a centralized physical-layout policy.

``overrides`` exists for compatibility at established APIs such as
``Table.write_parquet(..., compression=...)``.  New runtime writers should
select a policy and avoid ad-hoc option sets.

Implementation alias: lsd.core.parquet.write_parquet_table.

By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close