trilium_alchemy.core.branch¶
Class index¶
Canonical
Encapsulates a branch, a parent-child association between notes. |
Symbols¶
- class trilium_alchemy.core.branch.Branch(parent: Note = None, child: Note = None, prefix: str = '', expanded: bool = False, session: Session = None, **kwargs)¶
- Parameters:
Bases:
trilium_alchemy.core.entity.entity.OrderedEntityAliases:
trilium_alchemy.Branch
trilium_alchemy.core.BranchEncapsulates a branch, a parent-child association between notes.
Implicitly created by operations documented in
NoteandBranches. Can also be explicitly created and added to a note using its+=operator:# add child note with prefix note += Branch(child=Note(title="Child note"), prefix="Child branch prefix") # add parent note (cloning the note) with prefix note += Branch(parent=session.root, prefix="Parent branch prefix")
- property position: int¶
Getter for position of this branch.
Note
This is maintained automatically based on the order of this branch in its parent note’s
Note.branches.childrenlist.
- property state: State¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityCurrent state.
- property session: Session¶
Inherited from:
trilium_alchemy.core.entity.BaseEntitySession to which this entity belongs.
- property str_short: str¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityGet a short description of this entity.
- property str_summary: str¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityGet a summary of this entity, including its current state and model values.
- flush()¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityCommit changes to Trilium for this entity and its dependencies.
- invalidate()¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityDiscard cached contents and user-provided data for this object. Upon next access, data will be fetched from Trilium.
- delete()¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityMark this entity for pending delete.
- refresh()¶
Inherited from:
trilium_alchemy.core.entity.BaseEntityUpdate value from Trilium, discarding any local changes.