quick_notes.api.model module
QuickNote base classes.
NotRenderedQuickNoteList: Type returned by the markdown parser.
QuickNoteBase: Type from which every QuickNote is derived from.
QuickNoteList: List of QuickNoteBase.
- class quick_notes.api.model.NotRenderedQuickNoteList(quick_notes: List[Dict[str, Any]])[source]
Bases:
objectDefault class returned by the markdown parser.
This class holds the raw data types parsed by the grammar. One needs to render as an instance of QuickNoteList using the render method.
- Parameters:
quick_notes (List[Dict[str, Any]]) –
- quick_notes: List[Dict[str, Any]]
- render(model_class) QuickNoteList[source]
- Return type:
- class quick_notes.api.model.QuickNoteBase(title: str, text: str)[source]
Bases:
TomlDataClassIOBase class for every QuickNote.
This class contains the ubiquitous quick-note data: title and text. No metadata is stored here.
One should derive from this class to create custom quick-notes.
- Parameters:
title (str) –
text (str) –
- classmethod read_list(stream_in: TextIO) QuickNoteList[source]
Read a toml serialized QuickNoteList.
- Parameters:
stream_in (TextIO) –
- Return type:
- text: str
- title: str
- class quick_notes.api.model.QuickNoteList[source]
Bases:
TomlTableDataClassIOType representing a list of quick-notes.
- static create(quick_note_instance: List[QuickNoteBase]) QuickNoteList[source]
Create a QuickNoteList.
- Parameters:
quick_note_instance (List[QuickNoteBase]) –
- Return type: