/python-scripting

Bonsai Scripting Library for interfacing with the Python runtime

Primary LanguageC#MIT LicenseMIT

Bonsai - Python Scripting

Bonsai.Scripting.Python is a Bonsai interface for the Python programming language. It uses Python.NET under the hood to provide a seamless integration between the CPython runtime and data streaming in a Bonsai workflow.

You can use the Python Scripting package to run native Python scripts, import any module available to Python, and read or write to any variable in a named scope. The package is designed to work with any Python version from 3.7 onwards, and you can also use it in combination with Python virtual environments to fully isolate your project dependencies.

Documentation

Both conceptual and reference documentation can be found here.