Async Python client for Obsidian Local REST API
Project description
aiobsidian
Async Python client for the Obsidian Local REST API plugin.
Installation
pip install aiobsidian
Or with uv:
uv add aiobsidian
Quick start
import asyncio
from aiobsidian import ObsidianClient
async def main():
async with ObsidianClient("your-api-key") as client:
# Server status
status = await client.system.status()
print(status.versions.obsidian)
# Read a note
content = await client.vault.get("notes/hello.md")
print(content)
# Create a note
await client.vault.update("notes/new.md", "# New Note\n\nContent here.")
# Search
results = await client.search.simple("hello")
for r in results:
print(r.filename, r.score)
# Execute a command
await client.commands.execute("daily-notes")
asyncio.run(main())
Features
-
Full async/await support via httpx
-
Complete API coverage — all Obsidian Local REST API endpoints:
Resource Description Vault CRUD operations on any file Active Operations on the currently open file Periodic Daily, weekly, monthly, quarterly, yearly notes Commands List and execute Obsidian commands Search Simple text search, Dataview DQL, JsonLogic Open Open files in Obsidian UI System Server status, OpenAPI spec -
Pydantic v2 models for type-safe responses
-
Custom exception hierarchy with error codes
-
Bring-your-own
httpx.AsyncClientsupport -
Context manager lifecycle management
Configuration
client = ObsidianClient(
"your-api-key",
host="127.0.0.1", # default
port=27124, # default (HTTPS)
scheme="https", # default
timeout=30.0, # default
verify_ssl=False, # default (self-signed cert)
)
External HTTP client
You can provide your own httpx.AsyncClient for full control over transport settings:
import httpx
from aiobsidian import ObsidianClient
async with httpx.AsyncClient(timeout=60.0, verify=False) as http:
async with ObsidianClient("your-api-key", http_client=http) as client:
status = await client.system.status()
When an external client is provided, aiobsidian will not close it — you manage its lifecycle.
Documentation
Full documentation is available at kudato.github.io/aiobsidian.
Contributing
Contributions are welcome! Please see the Contributing Guide for details.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiobsidian-0.1.4.tar.gz.
File metadata
- Download URL: aiobsidian-0.1.4.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c6c2ff2e2b17e69761886856faf0f40f34c78ee3830523ef8ad206b1de48d59
|
|
| MD5 |
5a4f0ec9f54b11cda932a9d09d65fff7
|
|
| BLAKE2b-256 |
9973213fa9dc6dca0694c0db57ea9c85d42848c1b4efe1c25ea2f959c7b18636
|
Provenance
The following attestation bundles were made for aiobsidian-0.1.4.tar.gz:
Publisher:
release.yml on kudato/aiobsidian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiobsidian-0.1.4.tar.gz -
Subject digest:
8c6c2ff2e2b17e69761886856faf0f40f34c78ee3830523ef8ad206b1de48d59 - Sigstore transparency entry: 960114400
- Sigstore integration time:
-
Permalink:
kudato/aiobsidian@a1d04cdbf2965fc5f6609ed6db29403db2ac1a43 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/kudato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1d04cdbf2965fc5f6609ed6db29403db2ac1a43 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiobsidian-0.1.4-py3-none-any.whl.
File metadata
- Download URL: aiobsidian-0.1.4-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c3916ffa5f52694bbcffed8e43f427bac39fc5d8aa395fd32fa01c1a466f6dd
|
|
| MD5 |
69518d78a1ba0a37debc01a2faf24391
|
|
| BLAKE2b-256 |
bf1a57159871c7176836d48cda28163bf5ffe09e73b250bb265de3c1c4fb7ce2
|
Provenance
The following attestation bundles were made for aiobsidian-0.1.4-py3-none-any.whl:
Publisher:
release.yml on kudato/aiobsidian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiobsidian-0.1.4-py3-none-any.whl -
Subject digest:
6c3916ffa5f52694bbcffed8e43f427bac39fc5d8aa395fd32fa01c1a466f6dd - Sigstore transparency entry: 960114459
- Sigstore integration time:
-
Permalink:
kudato/aiobsidian@a1d04cdbf2965fc5f6609ed6db29403db2ac1a43 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/kudato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a1d04cdbf2965fc5f6609ed6db29403db2ac1a43 -
Trigger Event:
push
-
Statement type: