orkcore-python
CommunityOrkid Python bindings & GIL-safe patterns
Authortweakoz
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Orkid's C++ engine exposes a rich but complex Python binding surface that requires consistent type conversion, safe callback handling across threads and interpreters, and repeatable module initialization patterns so developers can reliably interact with engine objects from Python.
Core Features & Use Cases
- Type Codec: Centralized encode/decode layer for converting between Orkid C++ types and Python objects, and registering custom pointer codecs.
- GIL-Safe Wrapper: A gil_safe_pyobj construct for storing Python callbacks in C++ and ensuring the GIL is acquired on destruction and invocation.
- Dual Adapter System: Support for both pybind11 (main interpreter) and nanobind (subinterpreters) via adapter templates and shared binding code.
- VarMap and Bindings: Dynamic attribute access and common bindings for math, crc strings, and VarMap semantics.
- Factory & Callback Patterns: Standard wfactory/uifactory statics for UI widget creation and recommended callback binding patterns for safety.
- Use Cases: Bind a new engine class to Python with proper type codec registration, expose UI widgets with wfactory/uifactory, and store long-lived Python callbacks safely from non-GIL threads.
Quick Start
Show me how to implement a pybind11 module initializer that registers a custom type codec, binds a widget with wfactory and uifactory statics, and uses gil_safe_pyobj for thread-safe callbacks.
Dependency Matrix
Required Modules
None requiredComponents
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: orkcore-python Download link: https://github.com/tweakoz/orkid/archive/main.zip#orkcore-python Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.