Cs2PythonProject Convert PageHeader Cs2PythonProject Convert

Cs2PythonProject Convert PageOverview Cs2PythonProject Convert C# to Python converter accepts a .Net assembly and produces a wheel package for Python.

Cs2PythonProject Convert Cs2PythonProject Step1

Cs2PythonProject Convert Cs2PythonProject Step1.1
  • Project target framework is netcoreapp3.1
  • Runtime win_x64
dotnet publish ${path} -c Release -r ${rid} -f ${targetFramework} --self-contained -o ${outputPath}

Cs2PythonProject Convert Cs2PythonProject Step2

Upload zipped binaries that was built as self-contained and runtime specific.

Cs2PythonProject Convert Cs2PythonProject Step3

An assembly file name that is converted to Python wheel and namespace part

Cs2PythonProject Convert Cs2PythonProject Step4

Start processing the specified assembly

Cs2PythonProject Convert Cs2PythonProject Step5

The converter produces whl-file as artifact

    Conversion of C# to Python exteb

    Unlike C# to C++ and C# to Java source-to-source converters the C# to Python converter produces an extension for Python. The extension hosts .Net runtine and provides API in Python that is similar to API of C# product. The source-to-source translation from C# to Python may produce a slow product. In general, the performance of Python(CPython) source code is worst compared to C# implementation because of JIT. The C# to Python extension converter benefits: