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.0.tar.gz (9.8 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.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyobsidian-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 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.0.tar.gz
Algorithm Hash digest
SHA256 8450416391a8756e67babc6d43c09cb0aa78024b6756ee7b30067db8b7622822
MD5 093ee5ef37c8ece7452dd0840f2de0d0
BLAKE2b-256 f4ff51889d7b072293c4a1c707c1355bf9e186e2d2329cd9bc9353d5329b39d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyobsidian-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55f82c05d719db836e6eb806ae5e7119e5512d5499c701a85a882795687d2d86
MD5 a9d312e83a899c979d3083fcce96c8f0
BLAKE2b-256 5a9374371790017c7053ce8266f126593559e0569213b7b68c5d3f49dbe92ee5

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