DynamoVisualProgramming.DynamoServices by Autodesk

<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="3.5.0-beta7096" />

 PythonEngine

public abstract class PythonEngine
This abstract class is intended to act as a base class for different python engines. When you derive from this class to implement a new python engine, ensure all referenced assemblies from the assembly that contains your python engine type are loadable at runtime or Dynamo will not load your python engine type.
public abstract object InputDataMarshaler { get; }

Data Marshaler for all data coming into a Python node.

public abstract string Name { get; }

Name of the Python engine

public abstract object OutputDataMarshaler { get; }

Data Marshaler for all data coming out of a Python node.

Add an event handler after the Python evaluation has finished

Add an event handler before the Python evaluation begins

protected PythonEngine()

public abstract object Evaluate(string code, IList bindingNames, IList bindingValues)

Executes a Python script with custom variable names. Script may be a string read from a file, for example. Pass a list of names (matching the variable names in the script) to bindingNames and pass a corresponding list of values to bindingValues.