3

I am currently developing an app which is primarily based in .NET but need to integrate some math based code which is in Python3 and contains many references to the numpy, scipy and pandas packages.

I have read that IronPython will not support these packages and that pythonnet cannot be embedded into a C# application to use from .net.....

The python functions need to receive arguements of type dictionary, list and user defined class from the c# application and then return dictionaries that can be interpreted by the c# code.

Is there a way to integrate the two code bases in their current format or to maintain the functionality does the python code need to be re-scripted into another language?

Ali Bahrami
  • 5,935
  • 3
  • 34
  • 53
anna
  • 51
  • 3
  • Why don't you create some `Restful` services with Python and call them from `C#` application? – Ali Bahrami Jan 26 '18 at 15:00
  • If you need a lighter weight solution than a rest api, you could use sockets to send data between the two applications. – the_storyteller Jan 26 '18 at 16:39
  • @anna where did you see that pythonnet cannot be used for embedding python in .net? here is tutorial: https://github.com/pythonnet/pythonnet/blob/master/README.md – denfromufa Jan 27 '18 at 02:23
  • @denfromufa I saw that information here: https://www.quora.com/What-is-the-difference-between-Python-for-NET-and-IronPython – anna Jan 29 '18 at 09:20
  • @the_storyteller are sockest simpler than rest api? – cikatomo Aug 18 '21 at 02:12
  • @cikatomo, A rest API is a high level abstraction for moving structured data. Sockets are the things which actually move the data. A rest API can be used in concert with a text transport protocol and sockets to provide a nice way to send and receive data. However, it's also possible to send the raw data directly through the sockets, without the high level interface. – the_storyteller Aug 23 '21 at 15:19

0 Answers0