So I am trying to create a binary file and save it into my database. I am using REDIS and SQLALCHEMY as a framework for my database. I can use send_file to send the actual file whenever the user accesses a URL but how do I make sure that the file is saved in the route and it could stay there every time a user accesses the URL.

I am sending the file from a client-python it's not in my
  directory

what I need in a nutshell is to save the file from the client-python to a database to "downloadable" it to the browser-client so it would actually be available for the browser-client is there any way of doing this? Maybe a different way that I didn't think about
I had to encode the data with base64, send it to the database and then decode it and send the file as binary data.
Python - save BytesIO in database