Python for Logseq API and Plugins
from logspyq import LogseqAPI
logseq = LogseqAPI(auth_token="test")
logseq.call("logseq.UI.showMsg", "Hello from Python!")
You can use the API in async code as-is:
import asyncio
from logspyq import LogseqAPI
logseq = LogseqAPI(auth_token="test")
async def main():
await logseq.call("logseq.UI.showMsg", "Hello from Python!")
asyncio.run(main())
References: