Skip to main content

Find and manipulate any note in your Obsidian vault

Project description

pyobsidian

Overview

pyobsidian is a python library for working with Obsidian vaults. It's allows you to find and manipulate any note in your Obsidian vault.

Installation

pip install pyobsidian

Usage

A common workflow used in this library is define a vault, create a filter and execute it to find notes that match the filter conditions. This workflow can see bellow:

This can be translated to code in a very simple way:

>>> from pyobsidian.vault import Vault
>>> vault = Vault('your/obsidian/vault/path')
>>> new_vault = (
...    vault
...    .find_by('folder', 'some_folder')
...    .find_by('tag', 'some_tag')
...    .execute()
...)
>>> print(vault)
Vault(
    path='your/obsidian/vault/path',
    notes=[],
    filter=Filter(),
)
>>> print(new_vault)
Vault(
    path='your/obsidian/vault/path',
    notes=[Note(path='your/obsidian/vault/path/.../note.md')],
    filter=Filter(
        [
            FilterField(Field(key='folder', value='some_folder', occurrence='file'), mode = 'and'),
            FilterField(Field(key='tag', value='some_tag', occurrence='file'), mode = 'and')
        ]
    )
)
>>> print(new_vault.notes)
[Note(path='your/obsidian/vault/path/.../note.md')]

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

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

pyobsidian-0.1.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

pyobsidian-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file pyobsidian-0.1.1.tar.gz.

File metadata

  • Download URL: pyobsidian-0.1.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.3 Windows/10

File hashes

Hashes for pyobsidian-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6d92f302afcb42b32912667ae868c8cd67424ba2c6a1c3fe5e82271ca6426b57
MD5 7c7f6c13162b0d962ef40693f2f26e01
BLAKE2b-256 55c5b77492d63f3400e064e1f1fd9218495a77c9d2e7135d8f5680400bc25d1a

See more details on using hashes here.

File details

Details for the file pyobsidian-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyobsidian-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.3 Windows/10

File hashes

Hashes for pyobsidian-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e804f379aca9e738ad94b461bb39f6491d6ab3478d0e63c9c5ee08363bddc932
MD5 56607031b2a2ef845627d4ac0df1a41e
BLAKE2b-256 e816a5a698d8fc2a7784da9297dde71a16c0427e49eb542bcfee1c6766063796

See more details on using hashes here.

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