Normally in python, in a post request, you can read/open the file as normal, since it's likely already a bytesIO object.
See this flask example, where a user can upload a txt file
Although if the file is larger, I think you have to write it to disk temporarily
https://stackoverflow.com/questions/20015550/read-file-data-without-saving-it-in-flask