Pythonic wrapper for LogSeq API
Project description
logpyseq
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.
Installation
To install the package, use the following command:
pip install logpyseq
Usage
- 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.
Connecting to LogSeq graph
from logpyseq import logseq, upsert_page_properties
logseq_token = "your_logseq_token"
mygraph = logseq(logseq_token, host="127.0.0.1", port="12315")
Create a new page
mygraph.Editor.createPage("APITest")
Append blocks to the page
mygraph.Editor.appendBlockInPage("APITest", "Block 1")
mygraph.Editor.appendBlockInPage("APITest", "Block 2")
Show a message
mygraph.App.showMsg("Hello!")
Upsert page properties
page_uuid = "your_page_uuid"
target_properties = {
"property_name": "property_value",
"property_name2": "property_value2"
}
upsert_page_properties(mygraph, page_uuid, target_properties)
Delete a page
mygraph.Editor.deletePage("APITest")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logpyseq-0.1.1.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file logpyseq-0.1.1.tar.gz
.
File metadata
- Download URL: logpyseq-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9eb239287378f6a30b6a4f6edbbc13b6fab1459b5981d44e99a29385f76e4602
|
|
MD5 |
a886ffb47cb5634a27265a0a8af8ebf7
|
|
BLAKE2b-256 |
8661d03cb92a081c39b1614f53b8d212187850b121147804064c61af172588d1
|
File details
Details for the file logpyseq-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: logpyseq-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3308f2397ceb0aa832c5fe5c921269ee0bc945e473f75ad3a2c5fc3419e928c3
|
|
MD5 |
e0dbe5aac6127823e019515aa6bf726f
|
|
BLAKE2b-256 |
7afd011e9697343d90b159a3894ef977f1ab3e6edd378f01eec5ef9de099dead
|