Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Python lab

cristianvasquezcristianvasquez

An interface to experiment with Python scripts and more.

  • Overview
  • Scorecard
  • Updates6

The Obsidian Python lab is just a collection of dumb interfaces to enable python developers to use/test functionality within Obsidian.

Motivation

Say you have a terrific script to:

  • Find similar notes to the current one.
  • Translate a text.
  • Write the summary of a note.
  • ....

And you want to quickly see if it's helpful in Obsidian, just using some python.

That is the purpose of this plugin!.

Why this plugin? Why not program all in Javascript?

Sometimes is quicker to experiment in Python and later, if you want, make it work in Javascript. This is especially true when using Natural Language Processing libraries.

How it works?

The plugin is just a GUI to make calls to a server of your choice. Currently, the plugin has implemented the following operations:

  1. Insert new text.
  2. Replace the current text.
  3. Show elements in a panel.
  4. Have a chat conversation

Use it

Plugin-Server interaction

  1. When the user runs one of the plugin's commands, for example, 'replacing fancy text,' the plugin makes a POST call to your server with some context data, such as the current note, what was selected, etc.

Say your terrific script returns a list of random notes of your vault. Then the plugin does:

POST: http://127.0.0.1:5000/scripts/some_list

With some context data

{
  "vaultPath": "/home/cvasquez/obsidian/development",
  "notePath": "snippets-plugin/Test1.md"
}

It then returns a JSON response, which the plugin uses to show something in a Widget

Response

{
  "contents": [
    {
      "info": { "score": "0.9820077811564822" },
      "path": { "path": "/path/to/the/note 1.md" }
    },
    {
      "info": { "score": "0.9365154046414078" },
      "path": { "path": "/path/to/the/note 2.md" }
    }
  ]
}

Quickstart

  1. Install the plugin. (Maybe you already did)

  2. Write a script somewhere

def hello():
    return {
        'contents': f'Hello world!'
    }
  1. Run the application to expose the script.

Server

  1. The script should be now be detected by the plugin. Then the operation needs to be configured to specify how it interacts with the user. Any change in the options will persist in the plugin configuration.

Options

  1. Use it!

Example widget

Example python server

I wrote a minimal server, obsidian-lab-py, that exposes some scripts. It might be useful to look at. I use something different each time, like this example.

Build the plugin

This is not necessary if the plugin is installed from the store. However, it is built like all the other plugins,

  1. Clone this repo into

/{vault}/.obsidian/plugins

  1. Install the dependencies

    yarn install

  2. build the app

    yarn build

This will build the main file; that Obsidian should detect. Activate the plugin from inside Obsidian, in community plugins

Forum

This repo has github discussions enabled.

Status

This is still a proof of concept; please send any feedback :)

Contributing

Pull requests are both welcome and appreciated.

HealthFair
ReviewNot scanned
About
Connect Obsidian to a Python server and call your scripts to process notes, insert or replace text, show results in a panel, or run chat-style interactions. Send note context as JSON and receive structured responses to render widgets, lists, or content replacements directly in your vault.
IntegrationsAutomationEditing
Details
Last updated
5 years ago
Created
5 years ago
Updates
6 releases
Compatible with
Obsidian 0.11.6+
Platforms
Desktop, Mobile
License
GPL-3.0
Report bugRequest featureReport plugin
Author
cristianvasquezcristianvasquez
github.com/cristianvasquez
GitHubcristianvasquez
  1. Community
  2. Plugins
  3. Integrations
  4. Python lab

Related plugins

BRAT

Easily install a beta version of a plugin for testing.

Readwise Official

Sync highlights from Readwise to your vault.

LanguageTool Integration

advanced spell/grammar checks with the help of language-tool.

Todoist Sync

Materialize Todoist tasks within your notes.

Shell commands

Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications.

MetaEdit

Manage your metadata.

Advanced Tables

Improved table navigation, formatting, and manipulation.

Local REST API & MCP Server

Unlock your automation needs by interacting with your notes over a secure REST API.

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.