Skip to main content

Async Python client for Obsidian CLI and Local REST API

Project description

aiobsidian

CI PyPI Python License Docs

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

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

MIT

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

aiobsidian-0.3.0.tar.gz (48.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiobsidian-0.3.0-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file aiobsidian-0.3.0.tar.gz.

File metadata

  • Download URL: aiobsidian-0.3.0.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiobsidian-0.3.0.tar.gz
Algorithm Hash digest
SHA256 088438fbc7c7efcc55f01b4952112397607faa1ef3ff30339d2f499852b577fa
MD5 ad4ee14ae30aa21a0cbff259db7499e3
BLAKE2b-256 2b8ce0fa1eea4791eb5dd15d88a57b292da96e497649f194e02b1215db603bfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiobsidian-0.3.0.tar.gz:

Publisher: release.yml on kudato/aiobsidian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiobsidian-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aiobsidian-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiobsidian-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75e9d0a978a179fc12fdd13160dc33f3048883b98ac0fb8835be7873e1f120c9
MD5 eee6fa0940d0e4369a370b9979812da1
BLAKE2b-256 b0bfc591fbd6e648b8d7b7b8d7aaef0f915892d408aef5611b0b8946a4ddf550

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiobsidian-0.3.0-py3-none-any.whl:

Publisher: release.yml on kudato/aiobsidian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page