trilium_alchemy.core.entity

Class index

Canonical

BaseEntity

Base class for Trilium entities.

Symbols

class trilium_alchemy.core.entity.BaseEntity(*, entity_id: str | None = None, session: SessionT | None = None, backing_model: BackingT | None = None, create: bool | None = None)

Bases:

alchemizer.BaseEntity
abc.ABC

Base class for Trilium entities.

Should not be instantiated by user, but published for reference.

property state: State

Current state.

property session: Session

Session to which this entity belongs.

property str_short: str

Get a short description of this entity.

property str_summary: str

Get a summary of this entity, including its current state and model values.

flush()

Commit changes to Trilium for this entity and its dependencies.

invalidate()

Discard cached contents and user-provided data for this object.

Upon next access, data will be fetched from Trilium.

delete()

Mark this entity for pending delete.

refresh()

Update value from Trilium, discarding any local changes.