Skip to content
Advertisement

Tag: python

reading JavaScript object in a file into a Python array

I have a javascript file that has an object I’d like to be read by Python (Python 3 is just fine). Something like this: I want to convert myObject to a python dict object. Note I don’t really need the functions, just keys and values. I’m fine with (and capable) adding comment markers before/after and isolating the object. But I

Sending a profile picture from react frontend to flask-restful backend and storing

I want to store profile pictures on the file system (images/{username}_pfp.{extension} and store its location in the database as a string. My frontend react code is and my flask backend code is I have gotten the bits of code relevant to this from multiple sources (Flask – Get the name of an uploaded file minus the file extension, https://flask.palletsprojects.com/en/2.1.x/patterns/fileuploads/). When

Advertisement