All docs
Engine·
method
Engine.add
adds an entity to the project and returns the engine for chaining
Python
add(entity: Entity) -> Engine
Returns Engine — the same engine, so `add()` calls chain
Parameters#
| name | type | default | description |
|---|---|---|---|
entity |
Entity |
— | the entity to add to the project |
Example#
Python
from lsdtools import Engine, Entity
engine = Engine("survey.lsd")
engine.add(Entity("sales")).add(Entity("report"))
Notes#
add returns the engine (not the entity), so calls chain — engine.add(a).add(b) stays typed
as Engine. To fetch an entity back by name later, use get.
See also#
API: get · run · save · Engine
Guides: Your first tool
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown