Good evening, I'm new here and I've encountered a problem working with python, flask, peewee, and PostgreSQL that I can't seem to figure out. I have already received data from an API and placed the data into my data.json file. Now I'm trying to take the data that is currently in the data.json file and transfer it into PostgreSQL. The assignment is to get data from an API, import it to PostgreSQL, and then perform create and read methods on the PostgreSQL table.
import json
with open('./data.json', 'w') as data:
movies = json.dump(data)
This is how I've been approaching the problem, however, I haven't been successful in getting the data into PostgreSQL. Thank you!