initialize_python

Function initialize_python 

Source
pub fn initialize_python()
Expand description

Initializes the Python interpreter for use with the async runtime.

Python hosts the process when we build as an extension module. This function keeps the interpreter alive for the lifetime of the shared Tokio runtime so every worker thread sees a prepared PyO3 environment before using it.

This function is idempotent and safe to call multiple times.