Async Python client for Obsidian CLI and Local REST API
Project description
aiobsidian
Async Python client for Obsidian. CLI-first: works out of the box with the Obsidian CLI (v1.12+). Optional REST support via the Local REST API plugin.
Installation
pip install aiobsidian
For REST API support (requires httpx):
pip install aiobsidian[rest]
Quick start
CLI (primary)
import asyncio
from aiobsidian import ObsidianCLI
async def main():
async with ObsidianCLI("MyVault") as cli:
# Read a note
content = await cli.vault.read("notes/hello.md")
print(content)
# Search the vault
results = await cli.search.query("python")
# List tags
tags = await cli.tags.list()
# Daily note
await cli.daily.append("- [ ] New task")
asyncio.run(main())
REST (optional)
import asyncio
from aiobsidian import ObsidianClient
async def main():
async with ObsidianClient("your-api-key") as client:
status = await client.system.status()
print(status.versions.obsidian)
content = await client.vault.get("notes/hello.md")
print(content)
asyncio.run(main())
Features
CLI resources
| Resource | Access | Description |
|---|---|---|
| vault | cli.vault |
Read, create, append, prepend, move, rename, delete, list |
| daily | cli.daily |
Daily note operations |
| search | cli.search |
Full-text search |
| properties | cli.properties |
YAML frontmatter properties |
| tags | cli.tags |
Tag listing, lookup, rename |
| links | cli.links |
Outgoing links, backlinks, unresolved, orphans |
| tasks | cli.tasks |
Task listing, creation, completion, toggle |
| commands | cli.commands |
List and execute Obsidian commands |
| templates | cli.templates |
List, read, insert templates |
| bookmarks | cli.bookmarks |
List and add bookmarks |
| plugins | cli.plugins |
Plugin management |
| themes | cli.themes |
Theme management |
| snippets | cli.snippets |
CSS snippet management |
| sync | cli.sync |
Obsidian Sync operations |
| publish | cli.publish |
Obsidian Publish operations |
| history | cli.history |
Local file history |
| workspaces | cli.workspaces |
Workspace management |
| hotkeys | cli.hotkeys |
Hotkey operations |
| outline | cli.outline |
Document outline (headings) |
| random | cli.random |
Random note |
| aliases | cli.aliases |
Note aliases |
| bases | cli.bases |
Obsidian Bases / databases |
| system | cli.system |
Version, reload, restart, vaults |
| tabs | cli.tabs |
Tab management, recents |
| web | cli.web |
Open URLs in web viewer |
| dev | cli.dev |
Developer/debugging tools |
REST resources
| Resource | Access | Description |
|---|---|---|
| vault | client.vault |
CRUD operations on any file |
| active | client.active |
Operations on the currently open file |
| periodic | client.periodic |
Daily, weekly, monthly, quarterly, yearly notes |
| commands | client.commands |
List and execute Obsidian commands |
| search | client.search |
Simple text search, Dataview DQL, JsonLogic |
| open | client.open |
Open files in Obsidian UI |
| system | client.system |
Server status, OpenAPI spec |
General
- Full async/await support
- Pydantic v2 models for type-safe responses
- Custom exception hierarchy for both CLI and REST errors
- Context manager lifecycle management
- No external dependencies for CLI (only stdlib)
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.4.0.tar.gz.
File metadata
- Download URL: aiobsidian-0.4.0.tar.gz
- Upload date:
- Size: 102.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 |
31117baaa63315d0962426adfefd74b2360a099ad1dfcbb0ee08c8a8671e8fb9
|
|
| MD5 |
ecde5f3c9edc3825bfaf717ac9f47088
|
|
| BLAKE2b-256 |
b866161e70560c0e4f60b7decea9d52491ab3f13dd03ce010f15aacf04b0773d
|
Provenance
The following attestation bundles were made for aiobsidian-0.4.0.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.4.0.tar.gz -
Subject digest:
31117baaa63315d0962426adfefd74b2360a099ad1dfcbb0ee08c8a8671e8fb9 - Sigstore transparency entry: 1194093942
- Sigstore integration time:
-
Permalink:
kudato/aiobsidian@8ae2232493cf31d8ed8c9ec80bc3360e90f526bd -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/kudato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ae2232493cf31d8ed8c9ec80bc3360e90f526bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiobsidian-0.4.0-py3-none-any.whl.
File metadata
- Download URL: aiobsidian-0.4.0-py3-none-any.whl
- Upload date:
- Size: 42.8 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 |
ca4009044c51f5d5d2a10dc178bc6abcaf5fc6493606faa6da48cf160102b2aa
|
|
| MD5 |
902dda51d356966f6616d03c3097b3af
|
|
| BLAKE2b-256 |
49212094a461eeb6f96c1731c8de90f0d27aa3649a1d62a9cad4fd4bb621dc7f
|
Provenance
The following attestation bundles were made for aiobsidian-0.4.0-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.4.0-py3-none-any.whl -
Subject digest:
ca4009044c51f5d5d2a10dc178bc6abcaf5fc6493606faa6da48cf160102b2aa - Sigstore transparency entry: 1194093957
- Sigstore integration time:
-
Permalink:
kudato/aiobsidian@8ae2232493cf31d8ed8c9ec80bc3360e90f526bd -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/kudato
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ae2232493cf31d8ed8c9ec80bc3360e90f526bd -
Trigger Event:
push
-
Statement type: