trilium_alchemy#

TriliumAlchemy: an SDK and CLI toolkit for Trilium Notes.

Class index#

Imported

Session

core

Interface to Trilium and context in which to store changes to entities.

Note

core.note

Encapsulates a note and provides a base class for declarative notes.

Mixin

core.note

Reusable collection of attributes, children, and fields (note_id, title, type, mime) which can be inherited by a Note.

Attribute

core.attribute

Encapsulates an attribute, a key-value record attached to a note.

Label

core.attribute

Encapsulates a label.

Relation

core.attribute

Encapsulates a relation.

Branch

core.branch

Encapsulates a branch, a parent-child association between notes.

IconMixin

core.declarative

Enables setting the attribute IconMixin.icon to automatically add as value of #iconClass label.

Entity

core.entity

Base class for Trilium entities.

State

core.entity

Entity state. Maintained automatically based on the user’s updates and object’s current state in Trilium.

CodeNote

ext.types

Defines a code note.

CssNote

ext.types

Defines a CSS note.

HtmlNote

ext.types

Defines a HTML note.

JsBackendNote

ext.types

Defines a backend script.

JsFrontendNote

ext.types

Defines a frontend script.

TextNote

ext.types

Defines a text note.

Template

ext.helpers

Defines a template.

WorkspaceTemplate

ext.helpers

Defines a workspace template.

Workspace

ext.helpers

Defines a workspace.

AppCss

ext.helpers

Defines a CSS note with label #appCss.

Theme

ext.helpers

Defines a theme.

Widget

ext.helpers

Defines a widget.

FrontendScript

ext.helpers

Defines a frontend script.

BackendScript

ext.helpers

Defines a backend script.

BaseSystem

ext.helpers

Base class for a “system” note, a collection of various types of infrastructure notes.

BaseRootSystem

ext.helpers

Base class for a root “system” note, additionally containing themes and adding a built-in BaseSystem subclass.

BaseRoot

ext.helpers

Base class for a hierarchy root note.

Function index#

Imported

label

core.declarative

Adds a Label to a Note or Mixin subclass.

relation

core.declarative

Adds a Relation to a Note or Mixin subclass.

label_def

core.declarative

Adds a Label definition (promoted label) to a Note or Mixin subclass.

relation_def

core.declarative

Adds a Relation definition (promoted relation) to a Note or Mixin subclass.

children

core.declarative

Add Note subclasses as children, implicitly creating a Branch.

child

core.declarative

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

Exception index#

Imported

ReadOnlyError

core.exceptions

Raised when user attempts to write a field which is read-only.

ValidationError

core.exceptions

Raised upon flush when changes in unit of work are invalid or incompatible.