pip install pythonnet import clr import clr clr.AddReference("System") from System import DateTime import clr clr.AddReference("System") from System import String net_string = String("Hello from .NET") python_string = clr.Reference[str](net_string)