trilium_alchemy.core.declarative

Class index

Imported

BaseDeclarativeNote

base

Note to use as subclass for declarative notes, i.e. note classes which automatically sync with the corresponding note if it already exists in Trilium.

BaseDeclarativeMixin

base

Reusable collection of attributes and children which can be inherited by a BaseDeclarativeNote.

Function index

Imported

label

decorators

Adds a Label to a BaseDeclarativeNote or BaseDeclarativeMixin subclass.

relation

decorators

Adds a Relation to a BaseDeclarativeNote or BaseDeclarativeMixin subclass.

label_def

decorators

Adds a Label definition (promoted label) to a BaseDeclarativeNote or BaseDeclarativeMixin subclass.

relation_def

decorators

Adds a Relation definition (promoted relation) to a BaseDeclarativeNote or BaseDeclarativeMixin subclass.

children

decorators

Add BaseDeclarativeNote subclasses as children, implicitly creating a Branch. May use a tuple of (child_cls, prefix) to additionally set branch prefix.

child

decorators

Instantiate provided class and add as child, creating a Branch and setting provided kwargs.