Skip to main content

Module python_bridge

Module python_bridge 

Source
Expand description

Python bridge initialization with venv-based configuration

This module handles lazy initialization of the Python bridge using the virtual environment’s configuration. It uses OnceCell for thread-safe singleton initialization.

§PYTHONHOME Resolution

PYTHONHOME is resolved from the venv’s pyvenv.cfg file, which contains the home field pointing to the Python installation used to create the venv. This ensures PyO3 (linked at build time) uses a compatible Python environment.

Structs§

Bridge
The Python bridge for plugin execution
PythonEnvCompat
Legacy compatibility struct for PythonEnvironment

Functions§

configure_python_venv
Configure the Python virtual environment (legacy API compatibility)