I want to upload a entire JSON file to my Firebase Database, but I can't get it to run. I am new to Python and Firebase.
This is my code so far:
import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
import json
import requests
from pprint import pprint
cred = credentials.Certificate("path/to/serviceAccountKey.json")
firebase_admin.initialize_app(cred)
with open ('/Users/name/Desktop/Test.json') as data_file: data = json.load(data_file)
jsondata = json.dumps('/Users/name/Desktop/Test.json')
requests.put(url="https://myapp.firebaseio.com/", json= jsondata)
I get a error : <Response [400]>