kalahari-plugin-system

Community

Build powerful Python plugins, effortlessly.

Authorbartoszwarzocha
Version1.0.0
Installs0

System Documentation

What problem does it solves? Developing robust, extensible plugin systems that seamlessly integrate Python with C++ can be a significant architectural challenge, involving complex bindings, event handling, and lifecycle management. This Skill simplifies the creation and management of Python plugins for C++ applications, enabling rapid feature expansion and customization without deep expertise in inter-language communication.

Core Features & Use Cases

  • Extension Point Implementation: Guide the creation of C++ Extension Points and their Python implementations using pybind11, bridging your core application with dynamic features.
  • Event-Driven Architecture: Design and utilize the Event Bus for asynchronous, thread-safe communication between core and plugins, ensuring responsive and stable interactions.
  • .kplugin Format Management: Structure, validate, and load plugins packaged in the .kplugin (ZIP) format with manifest.json, streamlining distribution and deployment.
  • Use Case: Develop a new "Advanced Analytics" plugin in Python that integrates with Kalahari's core C++ data models, leveraging the Event Bus to react to document changes and pybind11 to expose custom analysis functions to the UI, all while maintaining a clean separation of concerns.

Quick Start

Example: Basic Python plugin entry point

from kalahari import IExporter, event_bus

class MyExporter(IExporter): def get_file_extension(self) -> str: return "txt" def get_format_name(self) -> str: return "Plain Text" def export_document(self, document, file_path: str) -> bool: with open(file_path, 'w') as f: f.write(document.get_content()) return True

def plugin_init(kalahari_api): exporter = MyExporter() kalahari_api.register_exporter(exporter) event_bus.subscribe("document.saved", lambda data: print(f"Doc saved: {data}"))

Dependency Matrix

Required Modules

pybind11

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: kalahari-plugin-system
Download link: https://github.com/bartoszwarzocha/kalahari/archive/main.zip#kalahari-plugin-system

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.