Pythonic wrapper for LogSeq APIs
This package uses code from gist https://gist.github.com/ksqsf/c3f254545cd8f5e597fc67c1014da9ac
Code available at https://github.com/jmbenedetto/logpyseq.git.
To install the package, use the following command:
pip install logpyseq- The entire LogSeq API is available as methods of the logseq object.
- Some complementary functions are also available as part of the logpyseq module: upsert_page_properties.
from logpyseq import logseq, upsert_page_properties
logseq_token = "your_logseq_token"
mygraph = logseq(logseq_token, host="127.0.0.1", port="12315")mygraph.Editor.createPage("APITest")mygraph.Editor.appendBlockInPage("APITest", "Block 1")
mygraph.Editor.appendBlockInPage("APITest", "Block 2")mygraph.App.showMsg("Hello!")page_uuid = "your_page_uuid"
target_properties = {
"property_name": "property_value",
"property_name2": "property_value2"
}
upsert_page_properties(mygraph, page_uuid, target_properties)
mygraph.Editor.deletePage("APITest")