trilium_alchemy.core.note.attributes¶
Class index¶
Canonical
Interface to a note’s owned and inherited attributes.  | 
|
Interface to a note’s owned attributes.  | 
|
Interface to a note’s inherited attributes.  | 
|
Accessor for labels, filtered by owned vs inherited.  | 
|
Accessor for owned labels.  | 
|
Accessor for inherited labels.  | 
|
Accessor for relations, filtered by owned vs inherited.  | 
|
Accessor for owned relations.  | 
|
Accessor for inherited relations.  | 
Symbols¶
- class trilium_alchemy.core.note.attributes.Attributes(note)¶
 Bases:
trilium_alchemy.core.note.extension.NoteExtension
trilium_alchemy.core.note.attributes._filters.BaseFilteredAttributes
collections.abc.SequenceInterface to a note’s owned and inherited attributes.
This object is stateless;
Note.attributes.ownedandNote.attributes.inheritedare the sources of truth for owned and inherited attributes respectively.For type-safe accesses, use
Note.labelsorNote.relations.- Raises:
 ReadOnlyError – Upon attempt to modify
- property owned: OwnedAttributes¶
 Getter/setter for owned attributes. Same interface as
Note.attributesbut filtered by owned attributes.
- property inherited: InheritedAttributes¶
 Getter for inherited attributes. Same interface as
Note.attributesbut filtered by inherited attributes.
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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.attributes.OwnedAttributes(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseFilteredAttributes
trilium_alchemy.core.note.extension.BaseEntityListInterface to a note’s owned attributes.
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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.attributes.InheritedAttributes(entity: BaseEntity)¶
 Bases:
trilium_alchemy.core.note.extension.NoteStatefulExtension
trilium_alchemy.core.note.attributes._filters.BaseFilteredAttributes
collections.abc.SequenceInterface to a note’s inherited attributes.
- Raises:
 ReadOnlyError – Upon attempt to modify
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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.attributes.Labels(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseCombinedFilteredAttributes
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinAccessor for labels, filtered by owned vs inherited.
- property owned: OwnedLabels¶
 
- property inherited: InheritedLabels¶
 
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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
- set_value(name: str, val: str, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinSet value of first label with provided name, creating if it doesn’t exist.
- set_values(name: str, vals: list[str], inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinSet values of all labels with provided name, creating or deleting labels as necessary.
- append_value(name: str, val: str = '', inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinCreate and append new label.
- class trilium_alchemy.core.note.attributes.OwnedLabels(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseOwnedFilteredAttributes
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinAccessor for owned labels.
- insert(i: int, val: AttributeT)¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.BaseOwnedFilteredAttributesS.insert(index, value) – insert value before index
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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
- set_value(name: str, val: str, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinSet value of first label with provided name, creating if it doesn’t exist.
- set_values(name: str, vals: list[str], inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinSet values of all labels with provided name, creating or deleting labels as necessary.
- append_value(name: str, val: str = '', inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.labels.BaseWriteableLabelMixinCreate and append new label.
- class trilium_alchemy.core.note.attributes.InheritedLabels(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseInheritedFilteredAttributes
trilium_alchemy.core.note.attributes.labels.BaseReadableLabelMixinAccessor for inherited labels.
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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.attributes.Relations(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseCombinedFilteredAttributes
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinAccessor for relations, filtered by owned vs inherited.
- property owned: OwnedRelations¶
 
- property inherited: InheritedRelations¶
 
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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
- set_target(name: str, val: Note, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinSet target of first relation with provided name, creating if it doesn’t exist.
- set_targets(name: str, vals: list[Note], inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinSet targets of all relations with provided name, creating or deleting relations as necessary.
- append_target(name: str, val: Note, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinCreate and append new relation with provided target.
- class trilium_alchemy.core.note.attributes.OwnedRelations(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseOwnedFilteredAttributes
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinAccessor for owned relations.
- insert(i: int, val: AttributeT)¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.BaseOwnedFilteredAttributesS.insert(index, value) – insert value before index
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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
- set_target(name: str, val: Note, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinSet target of first relation with provided name, creating if it doesn’t exist.
- set_targets(name: str, vals: list[Note], inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinSet targets of all relations with provided name, creating or deleting relations as necessary.
- append_target(name: str, val: Note, inheritable: bool = False)¶
 Inherited from:
trilium_alchemy.core.note.attributes.relations.BaseWriteableRelationMixinCreate and append new relation with provided target.
- class trilium_alchemy.core.note.attributes.InheritedRelations(note: Note)¶
 Bases:
trilium_alchemy.core.note.attributes._filters.BaseInheritedFilteredAttributes
trilium_alchemy.core.note.attributes.relations.BaseReadableRelationMixinAccessor for inherited relations.
- get(name: str) AttributeT | None¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet first attribute with provided name, or
Noneif none exist.
- get_all(name: str) list[AttributeT]¶
 Inherited from:
trilium_alchemy.core.note.attributes._filters.AttributeListMixinGet all attributes with provided name.
- 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