trilium_alchemy.core.attribute
#
Class index#
Canonical
Symbols#
- class trilium_alchemy.core.attribute.Attribute(name: str, inheritable: bool = False, **kwargs)#
Bases:
trilium_alchemy.core.entity.Entity
abc.ABC
Aliases:
trilium_alchemy.Attribute
trilium_alchemy.core.Attribute
Encapsulates an attribute, a key-value record attached to a note.
Can’t be instantiated directly; use
Label
orRelation
concrete classes.Once instantiated, the attribute needs to be added to a
Note
. See the documentation ofNote.attributes
for details.- inheritable: bool#
-
Whether this attribute is inherited to children and by
template
/inherit
relations.
- note: note#
-
Read-only access to note which owns this attribute.
- position#
-
Read-only access to position of this attribute.
Note
This is maintained automatically based on the order of this attribute in its note’s
Note.attributes
list.
- property state: State#
Inherited from:
trilium_alchemy.core.entity.Entity
Current state.
- property session: Session#
Inherited from:
trilium_alchemy.core.entity.Entity
Session to which this entity belongs.
- property str_short: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a short description of this entity.
- property str_summary: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a summary of this entity, including its current state and model values.
- flush() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Commit changes to Trilium for this entity and its dependencies.
- invalidate() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Discard cached contents and user-provided data for this object. Upon next access, data will be fetched from Trilium.
- delete() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Mark this entity for pending delete.
- class trilium_alchemy.core.attribute.Label(name: str, value: str = '', inheritable: bool = False, session: Session = None, **kwargs)#
- Parameters:
Bases:
trilium_alchemy.core.attribute.Attribute
Aliases:
trilium_alchemy.Label
trilium_alchemy.core.Label
Encapsulates a label.
Once instantiated, the label needs to be added to a
Note
. See the documentation ofNote.attributes
for details.- attribute_id: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to
attributeId
.
- name: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to attribute name.
- inheritable: bool#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Whether this attribute is inherited to children and by
template
/inherit
relations.
- utc_date_modified: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
UTC modified datetime, e.g.
2021-12-31 19:18:11.939Z
.
- note: note#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to note which owns this attribute.
- position#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to position of this attribute.
Note
This is maintained automatically based on the order of this attribute in its note’s
Note.attributes
list.
- property state: State#
Inherited from:
trilium_alchemy.core.entity.Entity
Current state.
- property session: Session#
Inherited from:
trilium_alchemy.core.entity.Entity
Session to which this entity belongs.
- property str_short: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a short description of this entity.
- property str_summary: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a summary of this entity, including its current state and model values.
- flush() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Commit changes to Trilium for this entity and its dependencies.
- invalidate() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Discard cached contents and user-provided data for this object. Upon next access, data will be fetched from Trilium.
- delete() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Mark this entity for pending delete.
- class trilium_alchemy.core.attribute.Relation(name: str, target: Note, inheritable: bool = False, session: Session | None = None, **kwargs)#
- Parameters:
Bases:
trilium_alchemy.core.attribute.Attribute
Aliases:
trilium_alchemy.Relation
trilium_alchemy.core.Relation
Encapsulates a relation.
Once instantiated, the relation needs to be added to a
Note
. See the documentation ofNote.attributes
for details.- attribute_id: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to
attributeId
.
- name: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to attribute name.
- inheritable: bool#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Whether this attribute is inherited to children and by
template
/inherit
relations.
- utc_date_modified: str#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
UTC modified datetime, e.g.
2021-12-31 19:18:11.939Z
.
- note: note#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to note which owns this attribute.
- position#
-
Inherited from:
trilium_alchemy.core.attribute.Attribute
Read-only access to position of this attribute.
Note
This is maintained automatically based on the order of this attribute in its note’s
Note.attributes
list.
- property state: State#
Inherited from:
trilium_alchemy.core.entity.Entity
Current state.
- property session: Session#
Inherited from:
trilium_alchemy.core.entity.Entity
Session to which this entity belongs.
- property str_short: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a short description of this entity.
- property str_summary: str#
Inherited from:
trilium_alchemy.core.entity.Entity
Get a summary of this entity, including its current state and model values.
- flush() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Commit changes to Trilium for this entity and its dependencies.
- invalidate() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Discard cached contents and user-provided data for this object. Upon next access, data will be fetched from Trilium.
- delete() None #
Inherited from:
trilium_alchemy.core.entity.Entity
Mark this entity for pending delete.