I have written a consumer of data in C# that reads string data from python API script. The best performing method I have found so far is to get the data into a numpy-recarray in python, print it to the console and read it with StreamReader.
I end up with the following string in the reading C# routine. This is one long string (7,000 records) of stock quotes, (Date, Open, High, Low, Close). No carriage returns, no line feeds.
[(datetime.date(2020, 6, 1), 29.80, 30.65, 29.45, 30.24), (datetime.date(2020, 6, 2), 30.49, 31.43, 30.19, 31.17)...]
I now need to parse this somehow into something that I can easily use to insert this data into a SQL database. I know how to do the insert from a list, array, etc. I can see a brut force parsing routing that reads this character by character and rebuilds the records into a List. Then the SQL bulk insert is easy.
I feel like there might be a better approach to alter the python console writer to write this long string in a format that could be converted to a List in C# with Linq or some other assignment. I am a little confused on where to start. Any suggestions?