trilium_alchemy.core.note.branches¶
Class index¶
Canonical
Interface to a note’s parent and child branches.  | 
|
Interface to a note’s parent branches.  | 
|
Interface to a note’s child branches.  | 
|
Interface to a note’s parent notes.  | 
|
Interface to a note’s child notes.  | 
Symbols¶
- class trilium_alchemy.core.note.branches.Branches(note)¶
 Bases:
trilium_alchemy.core.note.extension.NoteExtension
trilium_alchemy.core.note.branches.BranchLookupMixinInterface to a note’s parent and child branches.
This object is stateless;
Note.branches.parentsandNote.branches.childrenare the sources of truth for parent and child branches respectively.- property parents: ParentBranches¶
 Getter/setter for parent branches, modeled as a set.
- property children: ChildBranches¶
 Getter/setter for child branches, modeled as a list.
- class trilium_alchemy.core.note.branches.ParentBranches(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.extension.BaseEntitySet
trilium_alchemy.core.note.branches.BranchLookupMixinInterface to a note’s parent branches.
- add(value: EntityT)¶
 Inherited from:
trilium_alchemy.core.note.extension.BaseEntitySetAdd an element.
- discard(value: EntityT)¶
 Inherited from:
trilium_alchemy.core.note.extension.BaseEntitySetRemove an element. Do not raise an exception if absent.
- remove(value)¶
 Inherited from:
collections.abc.MutableSetRemove an element. If not a member, raise a KeyError.
- pop()¶
 Inherited from:
collections.abc.MutableSetReturn the popped value. Raise KeyError if empty.
- clear()¶
 Inherited from:
collections.abc.MutableSetThis is slow (creates N new iterators!) but effective.
- isdisjoint(other)¶
 Inherited from:
collections.abc.SetReturn True if two sets have a null intersection.
- class trilium_alchemy.core.note.branches.ChildBranches(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.extension.BaseEntityList
trilium_alchemy.core.note.branches.BranchLookupMixinInterface to a note’s child branches.
- insert(i: int, value: EntityT)¶
 Inherited from:
trilium_alchemy.core.note.extension.BaseEntityListS.insert(index, value) – insert value before index
- append(value)¶
 Inherited from:
collections.abc.MutableSequenceS.append(value) – append value to the end of the sequence
- clear()¶
 Inherited from:
collections.abc.MutableSequenceS.clear() -> None – remove all items from S
- reverse()¶
 Inherited from:
collections.abc.MutableSequenceS.reverse() – reverse IN PLACE
- extend(values)¶
 Inherited from:
collections.abc.MutableSequenceS.extend(iterable) – extend sequence by appending elements from the iterable
- pop(index=-1)¶
 Inherited from:
collections.abc.MutableSequenceS.pop([index]) -> item – remove and return item at index (default last). Raise IndexError if list is empty or index is out of range.
- remove(value)¶
 Inherited from:
collections.abc.MutableSequenceS.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.
- index(value, start=0, stop=None)¶
 Inherited from:
collections.abc.SequenceS.index(value, [start, [stop]]) -> integer – return first index of value. Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- count(value)¶
 Inherited from:
collections.abc.SequenceS.count(value) -> integer – return number of occurrences of value
- class trilium_alchemy.core.note.branches.ParentNotes(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.extension.NoteExtension
collections.abc.MutableSet
trilium_alchemy.core.note.branches.NoteLookupMixinInterface to a note’s parent notes.
This object is stateless;
Note.branches.parentsis the source of truth for parent branches.- remove(value)¶
 Inherited from:
collections.abc.MutableSetRemove an element. If not a member, raise a KeyError.
- pop()¶
 Inherited from:
collections.abc.MutableSetReturn the popped value. Raise KeyError if empty.
- clear()¶
 Inherited from:
collections.abc.MutableSetThis is slow (creates N new iterators!) but effective.
- isdisjoint(other)¶
 Inherited from:
collections.abc.SetReturn True if two sets have a null intersection.
- class trilium_alchemy.core.note.branches.ChildNotes(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.extension.NoteExtension
collections.abc.MutableSequence
trilium_alchemy.core.note.branches.NoteLookupMixinInterface to a note’s child notes.
This object is stateless;
Note.branches.childrenis the source of truth for child branches.- append(value)¶
 Inherited from:
collections.abc.MutableSequenceS.append(value) – append value to the end of the sequence
- clear()¶
 Inherited from:
collections.abc.MutableSequenceS.clear() -> None – remove all items from S
- reverse()¶
 Inherited from:
collections.abc.MutableSequenceS.reverse() – reverse IN PLACE
- extend(values)¶
 Inherited from:
collections.abc.MutableSequenceS.extend(iterable) – extend sequence by appending elements from the iterable
- pop(index=-1)¶
 Inherited from:
collections.abc.MutableSequenceS.pop([index]) -> item – remove and return item at index (default last). Raise IndexError if list is empty or index is out of range.
- remove(value)¶
 Inherited from:
collections.abc.MutableSequenceS.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.
- index(value, start=0, stop=None)¶
 Inherited from:
collections.abc.SequenceS.index(value, [start, [stop]]) -> integer – return first index of value. Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- count(value)¶
 Inherited from:
collections.abc.SequenceS.count(value) -> integer – return number of occurrences of value