Reviews the options for using Python and Python packages from .NET programs

First need to consider which Python is needed:

  1. If the standard Python interpreter (“CPython”) is needed, need to consider it is a “native” non-CLR application and therefore handling of native code is necessary. This is the recommended route because it makes best use of the wealth of Python packages – one of the greatest benefits of Python.

  2. If non-standard Python is acceptible, can consider projects such as IronPython. This is not recommended because of lack of support and standard conformance

Next consider how tight of a coupling is needed:

  1. For tightest coupling with highest efficiency and simplicity, consider embedding Python directly into the NET process, e.g., with PythonNet. See this article.

  2. For looser connectivity can consider technologies like:

    1. gRPC
    2. Jupyter
    3. REST
Tags: